Skip to content

Commit 852cc99

Browse files
committed
Merge remote-tracking branch 'origin/main' into k0s-1-29
2 parents f977017 + 255f9dc commit 852cc99

File tree

24 files changed

+868
-134
lines changed

24 files changed

+868
-134
lines changed

.github/workflows/ci.yaml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@ jobs:
5959
run: |
6060
make unit-tests
6161
62+
int-tests:
63+
name: Integration tests
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v4
68+
- name: Setup go
69+
uses: actions/setup-go@v5
70+
with:
71+
go-version-file: go.mod
72+
cache-dependency-path: "**/*.sum"
73+
- name: Install kind
74+
run: |
75+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
76+
chmod +x ./kind
77+
sudo mv ./kind /usr/local/bin/kind
78+
- name: Run tests
79+
run: |
80+
make -C tests/integration test
81+
6282
dryrun-tests:
6383
name: Dryrun tests
6484
runs-on: ubuntu-latest
@@ -255,9 +275,9 @@ jobs:
255275
echo "K0S_VERSION=\"$K0S_VERSION\""
256276
echo "k0s_version=$K0S_VERSION" >> "$GITHUB_OUTPUT"
257277
258-
build-previous-stable:
259-
name: Build previous stable
260-
runs-on: embedded-cluster
278+
find-previous-stable:
279+
name: Determine previous stable version
280+
runs-on: ubuntu-latest
261281
needs:
262282
- git-sha
263283
outputs:
@@ -272,6 +292,9 @@ jobs:
272292
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
273293
run: |
274294
k0s_majmin_version="$(make print-PREVIOUS_K0S_VERSION | sed 's/v\([0-9]*\.[0-9]*\).*/\1/')"
295+
if [ "$k0s_majmin_version" == "1.28" ]; then
296+
k0s_majmin_version="1.29"
297+
fi
275298
EC_VERSION="$(gh release list --repo replicatedhq/embedded-cluster \
276299
--exclude-drafts --exclude-pre-releases --json name \
277300
--jq '.[] | .name' \
@@ -418,7 +441,7 @@ jobs:
418441
- build-current
419442
- build-previous-k0s
420443
- build-upgrade
421-
- build-previous-stable
444+
- find-previous-stable
422445
steps:
423446
- name: Checkout
424447
uses: actions/checkout@v4
@@ -452,7 +475,7 @@ jobs:
452475
replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}"
453476
454477
# promote a release containing the previous stable version of embedded-cluster to test upgrades
455-
export EC_VERSION="${{ needs.build-previous-stable.outputs.ec_version }}"
478+
export EC_VERSION="${{ needs.find-previous-stable.outputs.ec_version }}"
456479
export APP_VERSION="appver-${SHORT_SHA}-previous-stable"
457480
export RELEASE_YAML_DIR=e2e/kots-release-install-stable
458481
./scripts/ci-release-app.sh
@@ -492,7 +515,7 @@ jobs:
492515
export SHORT_SHA=dev-${{ needs.git-sha.outputs.git_sha }}
493516
494517
# promote a release containing the previous stable version of embedded-cluster to test upgrades
495-
export EC_VERSION="${{ needs.build-previous-stable.outputs.ec_version }}"
518+
export EC_VERSION="${{ needs.find-previous-stable.outputs.ec_version }}"
496519
export APP_VERSION="appver-${SHORT_SHA}-previous-stable"
497520
export RELEASE_YAML_DIR=e2e/kots-release-install-stable
498521
./scripts/ci-release-app.sh
@@ -550,7 +573,7 @@ jobs:
550573
- build-current
551574
- build-previous-k0s
552575
- build-upgrade
553-
- build-previous-stable
576+
- find-previous-stable
554577
- release-app
555578
- export-version-specifier
556579
strategy:
@@ -627,7 +650,7 @@ jobs:
627650
DR_AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
628651
EXPECT_K0S_VERSION: ${{ needs.build-current.outputs.k0s_version }}
629652
EXPECT_K0S_VERSION_PREVIOUS: ${{ needs.build-previous-k0s.outputs.k0s_version }}
630-
EXPECT_K0S_VERSION_PREVIOUS_STABLE: ${{ needs.build-previous-stable.outputs.k0s_version }}
653+
EXPECT_K0S_VERSION_PREVIOUS_STABLE: ${{ needs.find-previous-stable.outputs.k0s_version }}
631654
run: |
632655
make e2e-test TEST_NAME=${{ matrix.test }}
633656
- name: Troubleshoot
@@ -643,7 +666,7 @@ jobs:
643666
- build-current
644667
- build-previous-k0s
645668
- build-upgrade
646-
- build-previous-stable
669+
- find-previous-stable
647670
- release-app
648671
- export-version-specifier
649672
strategy:
@@ -701,7 +724,7 @@ jobs:
701724
dr-aws-secret-access-key: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
702725
k0s-version: ${{ needs.build-current.outputs.k0s_version }}
703726
k0s-version-previous: ${{ needs.build-previous-k0s.outputs.k0s_version }}
704-
k0s-version-previous-stable: ${{ needs.build-previous-stable.outputs.k0s_version }}
727+
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
705728
version-specifier: ${{ needs.export-version-specifier.outputs.version_specifier }}
706729

707730
# this job will validate that all the tests passed
@@ -714,6 +737,8 @@ jobs:
714737
- e2e-docker
715738
- sanitize
716739
- test
740+
- int-tests
741+
- dryrun-tests
717742
- check-images
718743
- check-operator-crds
719744
if: always()

.github/workflows/release-prod.yaml

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ jobs:
212212
build/*.tgz
213213
build/metadata.json
214214
215-
build-previous-stable:
216-
name: Build previous stable
217-
runs-on: embedded-cluster
215+
find-previous-stable:
216+
name: Determine previous stable version
217+
runs-on: ubuntu-latest
218218
needs:
219219
- get-tag
220220
outputs:
@@ -229,6 +229,9 @@ jobs:
229229
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
230230
run: |
231231
k0s_majmin_version="$(make print-PREVIOUS_K0S_VERSION | sed 's/v\([0-9]*\.[0-9]*\).*/\1/')"
232+
if [ "$k0s_majmin_version" == "1.28" ]; then
233+
k0s_majmin_version="1.29"
234+
fi
232235
EC_VERSION="$(gh release list --repo replicatedhq/embedded-cluster \
233236
--exclude-drafts --exclude-pre-releases --json name \
234237
--jq '.[] | .name' \
@@ -251,7 +254,7 @@ jobs:
251254
needs:
252255
- release
253256
- get-tag
254-
- build-previous-stable
257+
- find-previous-stable
255258
steps:
256259
- name: Checkout
257260
uses: actions/checkout@v4
@@ -272,13 +275,19 @@ jobs:
272275
APP_CHANNEL: CI
273276
USES_DEV_BUCKET: "0"
274277
run: |
278+
# re-promote a release containing an old version of embedded-cluster to test upgrades
279+
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-1.8.0-k8s-1.28"
280+
replicated release promote 11615 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}"
281+
replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}"
282+
275283
# install the current k0s version
276284
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}"
277285
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}"
278286
export RELEASE_YAML_DIR=e2e/kots-release-install
279287
./scripts/ci-release-app.sh
288+
280289
# and finally an app upgrade
281-
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}-upgrade"
290+
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}"
282291
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-upgrade"
283292
export RELEASE_YAML_DIR=e2e/kots-release-upgrade
284293
./scripts/ci-release-app.sh
@@ -290,13 +299,8 @@ jobs:
290299
APP_CHANNEL: CI-airgap
291300
USES_DEV_BUCKET: "0"
292301
run: |
293-
# re-promote a release containing an old version of embedded-cluster to test upgrades
294-
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-1.8.0-k8s-1.28"
295-
replicated release promote 11615 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}"
296-
replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}"
297-
298302
# promote a release containing the previous stable version of embedded-cluster to test upgrades
299-
export EC_VERSION="${{ needs.build-previous-stable.outputs.ec_version }}"
303+
export EC_VERSION="${{ needs.find-previous-stable.outputs.ec_version }}"
300304
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-previous-stable"
301305
export RELEASE_YAML_DIR=e2e/kots-release-install-stable
302306
./scripts/ci-release-app.sh
@@ -315,20 +319,52 @@ jobs:
315319
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-upgrade"
316320
export RELEASE_YAML_DIR=e2e/kots-release-upgrade
317321
./scripts/ci-release-app.sh
322+
323+
download-current:
324+
name: Download the current release binary
325+
runs-on: ubuntu-latest
326+
needs:
327+
- release-app
328+
- get-tag
329+
steps:
330+
- name: Download current binary
331+
env:
332+
LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
333+
run: |
334+
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}"
335+
curl -L "https://ec-e2e-replicated-app.testcluster.net/embedded/embedded-cluster-smoke-test-staging-app/ci/${APP_VERSION}" -H "Authorization: $LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz
336+
tar -xzf embedded-cluster-smoke-test-staging-app-ci.tgz
337+
mv embedded-cluster-smoke-test-staging-app embedded-cluster
338+
mkdir -p output/bin
339+
mv embedded-cluster output/bin
340+
341+
- name: Upload release
342+
uses: actions/upload-artifact@v4
343+
with:
344+
name: current-release
345+
path: |
346+
output/bin/embedded-cluster
347+
318348
e2e:
319349
name: E2E
320350
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
321351
needs:
322352
- release
323353
- release-app
324354
- get-tag
325-
- build-previous-stable
355+
- download-current
356+
- find-previous-stable
326357
strategy:
327358
fail-fast: false
328359
matrix:
329360
test:
330361
- TestResetAndReinstallAirgap
331362
- TestSingleNodeAirgapUpgrade
363+
- TestSingleNodeDisasterRecoveryWithProxy
364+
- TestProxiedEnvironment
365+
- TestProxiedCustomCIDR
366+
- TestInstallWithPrivateCAs
367+
- TestInstallWithMITMProxy
332368
include:
333369
- test: TestMultiNodeAirgapUpgrade
334370
runner: embedded-cluster
@@ -339,6 +375,11 @@ jobs:
339375
steps:
340376
- name: Checkout
341377
uses: actions/checkout@v4
378+
- name: Download current binary
379+
uses: actions/download-artifact@v4
380+
with:
381+
name: current-release
382+
path: output/bin
342383

343384
- uses: ./.github/actions/e2e
344385
with:
@@ -356,11 +397,10 @@ jobs:
356397

357398
k0s-version: ${{ needs.get-tag.outputs.k0s_version }}
358399
k0s-version-previous: ${{ needs.get-tag.outputs.k0s_version }} # we do not run k8s upgrade tests on release
359-
k0s-version-previous-stable: ${{ needs.build-previous-stable.outputs.k0s_version }}
400+
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
360401
upgrade-target-ec-version: ${{ needs.get-tag.outputs.tag-name }}
361402

362403
# this job will validate that all the tests passed
363-
# it is used for the github branch protection rule
364404
validate-release-success:
365405
name: Validate success
366406
runs-on: ubuntu-20.04

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Additionally, it includes a Registry when deployed in air gap mode.
2323
- Dagger
2424
- shasum
2525
- jq
26+
- Kubectl (for integration tests)
27+
- Kind (for integration tests)
2628

2729
### Running the Development Environment
2830

0 commit comments

Comments
 (0)