Skip to content

Commit 088bf8d

Browse files
authored
run online ci tests against tagged releases (#1486)
* give build-previous-stable a better name * do not run build-previous-stable on large runners * disable CI * add online multinode custom-cidr proxy test * download from custom hostname, use correct binary name * actually download the binary * rename tasks * add more online tests * tests again * disable CI again * rearrange app promotions * f * reenable all tests again
1 parent 39a600f commit 088bf8d

File tree

2 files changed

+61
-24
lines changed

2 files changed

+61
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ jobs:
275275
echo "K0S_VERSION=\"$K0S_VERSION\""
276276
echo "k0s_version=$K0S_VERSION" >> "$GITHUB_OUTPUT"
277277
278-
build-previous-stable:
279-
name: Build previous stable
280-
runs-on: embedded-cluster
278+
find-previous-stable:
279+
name: Determine previous stable version
280+
runs-on: ubuntu-latest
281281
needs:
282282
- git-sha
283283
outputs:
@@ -441,7 +441,7 @@ jobs:
441441
- build-current
442442
- build-previous-k0s
443443
- build-upgrade
444-
- build-previous-stable
444+
- find-previous-stable
445445
steps:
446446
- name: Checkout
447447
uses: actions/checkout@v4
@@ -475,7 +475,7 @@ jobs:
475475
replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}"
476476
477477
# promote a release containing the previous stable version of embedded-cluster to test upgrades
478-
export EC_VERSION="${{ needs.build-previous-stable.outputs.ec_version }}"
478+
export EC_VERSION="${{ needs.find-previous-stable.outputs.ec_version }}"
479479
export APP_VERSION="appver-${SHORT_SHA}-previous-stable"
480480
export RELEASE_YAML_DIR=e2e/kots-release-install-stable
481481
./scripts/ci-release-app.sh
@@ -515,7 +515,7 @@ jobs:
515515
export SHORT_SHA=dev-${{ needs.git-sha.outputs.git_sha }}
516516
517517
# promote a release containing the previous stable version of embedded-cluster to test upgrades
518-
export EC_VERSION="${{ needs.build-previous-stable.outputs.ec_version }}"
518+
export EC_VERSION="${{ needs.find-previous-stable.outputs.ec_version }}"
519519
export APP_VERSION="appver-${SHORT_SHA}-previous-stable"
520520
export RELEASE_YAML_DIR=e2e/kots-release-install-stable
521521
./scripts/ci-release-app.sh
@@ -573,7 +573,7 @@ jobs:
573573
- build-current
574574
- build-previous-k0s
575575
- build-upgrade
576-
- build-previous-stable
576+
- find-previous-stable
577577
- release-app
578578
- export-version-specifier
579579
strategy:
@@ -650,7 +650,7 @@ jobs:
650650
DR_AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
651651
EXPECT_K0S_VERSION: ${{ needs.build-current.outputs.k0s_version }}
652652
EXPECT_K0S_VERSION_PREVIOUS: ${{ needs.build-previous-k0s.outputs.k0s_version }}
653-
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 }}
654654
run: |
655655
make e2e-test TEST_NAME=${{ matrix.test }}
656656
- name: Troubleshoot
@@ -666,7 +666,7 @@ jobs:
666666
- build-current
667667
- build-previous-k0s
668668
- build-upgrade
669-
- build-previous-stable
669+
- find-previous-stable
670670
- release-app
671671
- export-version-specifier
672672
strategy:
@@ -724,7 +724,7 @@ jobs:
724724
dr-aws-secret-access-key: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
725725
k0s-version: ${{ needs.build-current.outputs.k0s_version }}
726726
k0s-version-previous: ${{ needs.build-previous-k0s.outputs.k0s_version }}
727-
k0s-version-previous-stable: ${{ needs.build-previous-stable.outputs.k0s_version }}
727+
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
728728
version-specifier: ${{ needs.export-version-specifier.outputs.version_specifier }}
729729

730730
# this job will validate that all the tests passed

.github/workflows/release-prod.yaml

Lines changed: 51 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:
@@ -254,7 +254,7 @@ jobs:
254254
needs:
255255
- release
256256
- get-tag
257-
- build-previous-stable
257+
- find-previous-stable
258258
steps:
259259
- name: Checkout
260260
uses: actions/checkout@v4
@@ -275,13 +275,19 @@ jobs:
275275
APP_CHANNEL: CI
276276
USES_DEV_BUCKET: "0"
277277
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+
278283
# install the current k0s version
279284
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}"
280285
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}"
281286
export RELEASE_YAML_DIR=e2e/kots-release-install
282287
./scripts/ci-release-app.sh
288+
283289
# and finally an app upgrade
284-
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}-upgrade"
290+
export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}"
285291
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-upgrade"
286292
export RELEASE_YAML_DIR=e2e/kots-release-upgrade
287293
./scripts/ci-release-app.sh
@@ -293,13 +299,8 @@ jobs:
293299
APP_CHANNEL: CI-airgap
294300
USES_DEV_BUCKET: "0"
295301
run: |
296-
# re-promote a release containing an old version of embedded-cluster to test upgrades
297-
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-1.8.0-k8s-1.28"
298-
replicated release promote 11615 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}"
299-
replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}"
300-
301302
# promote a release containing the previous stable version of embedded-cluster to test upgrades
302-
export EC_VERSION="${{ needs.build-previous-stable.outputs.ec_version }}"
303+
export EC_VERSION="${{ needs.find-previous-stable.outputs.ec_version }}"
303304
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-previous-stable"
304305
export RELEASE_YAML_DIR=e2e/kots-release-install-stable
305306
./scripts/ci-release-app.sh
@@ -318,20 +319,52 @@ jobs:
318319
export APP_VERSION="appver-${{ needs.get-tag.outputs.tag-name }}-upgrade"
319320
export RELEASE_YAML_DIR=e2e/kots-release-upgrade
320321
./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+
321348
e2e:
322349
name: E2E
323350
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
324351
needs:
325352
- release
326353
- release-app
327354
- get-tag
328-
- build-previous-stable
355+
- download-current
356+
- find-previous-stable
329357
strategy:
330358
fail-fast: false
331359
matrix:
332360
test:
333361
- TestResetAndReinstallAirgap
334362
- TestSingleNodeAirgapUpgrade
363+
- TestSingleNodeDisasterRecoveryWithProxy
364+
- TestProxiedEnvironment
365+
- TestProxiedCustomCIDR
366+
- TestInstallWithPrivateCAs
367+
- TestInstallWithMITMProxy
335368
include:
336369
- test: TestMultiNodeAirgapUpgrade
337370
runner: embedded-cluster
@@ -342,6 +375,11 @@ jobs:
342375
steps:
343376
- name: Checkout
344377
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
345383

346384
- uses: ./.github/actions/e2e
347385
with:
@@ -359,11 +397,10 @@ jobs:
359397

360398
k0s-version: ${{ needs.get-tag.outputs.k0s_version }}
361399
k0s-version-previous: ${{ needs.get-tag.outputs.k0s_version }} # we do not run k8s upgrade tests on release
362-
k0s-version-previous-stable: ${{ needs.build-previous-stable.outputs.k0s_version }}
400+
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
363401
upgrade-target-ec-version: ${{ needs.get-tag.outputs.tag-name }}
364402

365403
# this job will validate that all the tests passed
366-
# it is used for the github branch protection rule
367404
validate-release-success:
368405
name: Validate success
369406
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)