Skip to content

Commit bbb1ffa

Browse files
committed
Merge remote-tracking branch 'origin/main' into k0s-1-28
2 parents 2d74fe0 + c831306 commit bbb1ffa

File tree

109 files changed

+2201
-1237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2201
-1237
lines changed

.github/workflows/ci.yaml

Lines changed: 245 additions & 190 deletions
Large diffs are not rendered by default.

.github/workflows/dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: K0s
2424
run: |
2525
# Remove the '-ec.X' suffix and only update if the prefix (upstream k0s release) has changed.
26-
export CURVERSION=$(awk '/^K0S_VERSION/{split($3,a,"-"); print a[1]}' Makefile)
26+
export CURVERSION=$(make print-K0S_VERSION)
2727
export VERSION=`curl https://api.github.com/repos/k0sproject/k0s/releases/latest | jq -r .name`
2828
if [ "$CURVERSION" != "$VERSION" ]; then
2929
sed -i "/^K0S_VERSION/c\K0S_VERSION = $VERSION" Makefile

.github/workflows/image-scan.yaml

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ permissions:
1616

1717
jobs:
1818

19-
build-images:
19+
build-deps:
2020
outputs:
21-
local-artifact-mirror: ${{ steps.local-artifact-mirror.outputs.image }}
21+
local-artifact-mirror-image: ${{ steps.local-artifact-mirror.outputs.image }}
22+
operator-image: ${{ steps.operator.outputs.image }}
23+
operator-chart: ${{ steps.operator.outputs.chart }}
2224
runs-on: ubuntu-latest
2325
steps:
2426
- name: Checkout
@@ -30,7 +32,8 @@ jobs:
3032
uses: actions/cache@v4
3133
with:
3234
path: |
33-
build/.melange-cache
35+
local-artifact-mirror/cache/.melange-cache
36+
operator/cache/.melange-cache
3437
key: melange-cache
3538

3639
- name: Setup Melange
@@ -42,9 +45,38 @@ jobs:
4245
make -C local-artifact-mirror apko build-ttl.sh
4346
echo "image=$(cat local-artifact-mirror/build/image)" >> $GITHUB_OUTPUT
4447
48+
- name: Build and push operator image
49+
id: operator
50+
run: |
51+
make -C operator apko build-ttl.sh build-chart-ttl.sh
52+
echo "image=$(cat operator/build/image)" >> $GITHUB_OUTPUT
53+
echo "chart=$(cat operator/build/chart)" >> $GITHUB_OUTPUT
54+
55+
buildtools:
56+
name: Build buildtools
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v4
61+
- name: Setup go
62+
uses: actions/setup-go@v5
63+
with:
64+
go-version-file: go.mod
65+
cache-dependency-path: "**/*.sum"
66+
- name: Compile buildtools
67+
run: |
68+
make buildtools
69+
- name: Upload buildtools artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: buildtools
73+
path: output/bin/buildtools
74+
4575
output-matrix:
4676
runs-on: ubuntu-latest
47-
needs: [build-images]
77+
needs:
78+
- build-deps
79+
- buildtools
4880
outputs:
4981
matrix: ${{ steps.build-matrix.outputs.matrix }}
5082
steps:
@@ -57,9 +89,27 @@ jobs:
5789
go-version-file: go.mod
5890
cache-dependency-path: "**/*.sum"
5991

92+
- name: Download buildtools artifact
93+
uses: actions/download-artifact@v4
94+
with:
95+
name: buildtools
96+
path: output/bin
97+
98+
- name: Compile buildtools
99+
run: |
100+
make buildtools
101+
102+
- name: Update embedded-cluster-operator metadata.yaml
103+
env:
104+
IMAGES_REGISTRY_SERVER: ttl.sh
105+
OPERATOR_CHART: ${{ needs.build-deps.outputs.operator-chart }}
106+
OPERATOR_IMAGE: ${{ needs.build-deps.outputs.operator-image }}
107+
run: |
108+
./scripts/ci-update-operator-metadata.sh
109+
60110
- name: Build
61111
run: |
62-
export LOCAL_ARTIFACT_MIRROR_IMAGE=${{ needs.build-images.outputs.local-artifact-mirror }}
112+
export LOCAL_ARTIFACT_MIRROR_IMAGE=${{ needs.build-deps.outputs.local-artifact-mirror-image }}
63113
make embedded-cluster-linux-amd64
64114
65115
- name: List images

.github/workflows/release-prod.yaml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
uses: actions/cache@v4
6464
with:
6565
path: |
66-
build/.melange-cache
66+
operator/cache/.melange-cache
6767
key: melange-cache
6868

6969
- name: Setup Melange
@@ -113,7 +113,7 @@ jobs:
113113
uses: actions/cache@v4
114114
with:
115115
path: |
116-
build/.melange-cache
116+
local-artifact-mirror/cache/.melange-cache
117117
key: melange-cache
118118

119119
- name: Setup Melange
@@ -137,6 +137,13 @@ jobs:
137137
- name: Checkout
138138
uses: actions/checkout@v4
139139

140+
- name: Cache embedded bins
141+
uses: actions/cache@v4
142+
with:
143+
path: |
144+
output/bins
145+
key: bins-cache
146+
140147
- name: Setup Go
141148
uses: actions/setup-go@v5
142149
with:
@@ -151,22 +158,26 @@ jobs:
151158

152159
- name: Update embedded-cluster-operator metadata.yaml
153160
env:
154-
IMAGES_REGISTRY_SERVER: ttl.sh
161+
IMAGES_REGISTRY_SERVER: index.docker.io
162+
IMAGES_REGISTRY_USER: ${{ secrets.DOCKERHUB_USER }}
163+
IMAGES_REGISTRY_PASS: ${{ secrets.DOCKERHUB_PASSWORD }}
155164
OPERATOR_CHART: ${{ needs.publish-operator-chart.outputs.chart }}
156165
OPERATOR_IMAGE: ${{ needs.publish-operator-image.outputs.image }}
157166
run: |
158167
./scripts/ci-update-operator-metadata.sh
159168
160169
- name: Build linux-amd64
161170
run: |
171+
mkdir -p build
162172
make embedded-cluster-linux-amd64 \
163173
VERSION=${{ needs.get-tag.outputs.tag-name }} \
164174
LOCAL_ARTIFACT_MIRROR_IMAGE=proxy.replicated.com/anonymous/${{ needs.publish-images.outputs.local-artifact-mirror }}
165-
tar -C output/bin -czvf embedded-cluster-linux-amd64.tgz embedded-cluster
175+
tar -C output/bin -czvf build/embedded-cluster-linux-amd64.tgz embedded-cluster
166176
167177
- name: Output Metadata
168178
run: |
169-
./output/bin/embedded-cluster version metadata > metadata.json
179+
mkdir -p build
180+
./output/bin/embedded-cluster version metadata > build/metadata.json
170181
171182
- name: Cache Staging Files
172183
env:
@@ -176,10 +187,10 @@ jobs:
176187
AWS_REGION: "us-east-1"
177188
run: |
178189
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}"
179-
export OPERATOR_IMAGE=proxy.replicated.com/anonymous/${{ needs.publish-operator-image.outputs.image }}
180-
export OPERATOR_VERSION=$(echo "${{ needs.get-tag.outputs.tag-name }}" | sed 's/^v//')
190+
mkdir -p operator/build
191+
echo "${{ needs.publish-operator-image.outputs.image }}" > "operator/build/image-$EC_VERSION"
181192
182-
./scripts/cache-files.sh
193+
./scripts/ci-upload-binaries.sh
183194
184195
- name: Cache Prod Files
185196
env:
@@ -189,16 +200,16 @@ jobs:
189200
AWS_REGION: "us-east-1"
190201
run: |
191202
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}"
192-
export OPERATOR_IMAGE=proxy.replicated.com/anonymous/${{ needs.publish-operator-image.outputs.image }}
193-
export OPERATOR_VERSION=$(echo "${{ needs.get-tag.outputs.tag-name }}" | sed 's/^v//')
203+
mkdir -p operator/build
204+
echo "${{ needs.publish-operator-image.outputs.image }}" > "operator/build/image-$EC_VERSION"
194205
195-
./scripts/cache-files.sh
206+
./scripts/ci-upload-binaries.sh
196207
197208
- name: Publish release
198209
uses: marvinpinto/action-automatic-releases@latest
199210
with:
200211
repo_token: ${{ secrets.GITHUB_TOKEN }}
201212
prerelease: true
202213
files: |
203-
*.tgz
204-
metadata.json
214+
build/*.tgz
215+
build/metadata.json

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
output
21
bundle
3-
pkg/goods/bins
4-
pkg/goods/internal/bins
2+
pkg/goods/bins/*
3+
!pkg/goods/bins/.placeholder
4+
pkg/goods/internal/bins/*
5+
!pkg/goods/internal/bins/.placeholder
56
pkg/goods/images
6-
*tgz
77
.pre-commit-config.yaml
88
vendor
99
e2e/kots-release-install/license.yaml
10-
/build/
1110
/bin/
11+
/build/
12+
/output/
1213
go.work
1314
go.work.sum
15+
.gocache
16+
.gomodcache

.shellcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
external-sources=true

0 commit comments

Comments
 (0)