Skip to content

Commit

Permalink
add cluster stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell committed Oct 10, 2023
1 parent 751d679 commit 0038588
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .github/actions/cmx-versions/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7653,7 +7653,7 @@ async function getClusterVersions() {

// versions to test looks like this:
// [
// {distribution: k3s, version: v1.24},
// {distribution: k3s, version: v1.24, stage: 'stable'},
// ...
// ]
const versionsToTest = [];
Expand All @@ -7666,11 +7666,6 @@ async function getClusterVersions() {
return;
}

if (distroName === 'openshift') {
// it was recommended to exclude 4.10.0-okd from testing for now
distribution.versions = distribution.versions.filter((v) => v !== '4.10.0-okd');
}

const latestMinorVersions = {};
distribution.versions.forEach((version) => {
const parsed = semverCoerce(version);
Expand All @@ -7690,7 +7685,12 @@ async function getClusterVersions() {
});

Object.keys(latestMinorVersions[distroName]).forEach((minorVersion) => {
versionsToTest.push({ distribution: distroName, version: latestMinorVersions[distroName][minorVersion] });
let stage = 'stable';
if (distroName === 'openshift' && minorVersion === '4.10') {
stage = 'beta';
}

versionsToTest.push({ distribution: distroName, version: latestMinorVersions[distroName][minorVersion], stage });
});
});

Expand Down
15 changes: 7 additions & 8 deletions .github/actions/cmx-versions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function getClusterVersions() {

// versions to test looks like this:
// [
// {distribution: k3s, version: v1.24},
// {distribution: k3s, version: v1.24, stage: 'stable'},
// ...
// ]
const versionsToTest = [];
Expand All @@ -46,12 +46,6 @@ async function getClusterVersions() {
return;
}

// TODO: add a `stage` field or something to versionsToTest so we can conditionally continue-on-error
if (distroName === 'openshift') {
// it was recommended to exclude 4.10.0-okd from testing for now
distribution.versions = distribution.versions.filter((v) => v !== '4.10.0-okd');
}

const latestMinorVersions = {};
distribution.versions.forEach((version) => {
const parsed = semverCoerce(version);
Expand All @@ -71,7 +65,12 @@ async function getClusterVersions() {
});

Object.keys(latestMinorVersions[distroName]).forEach((minorVersion) => {
versionsToTest.push({ distribution: distroName, version: latestMinorVersions[distroName][minorVersion] });
let stage = 'stable';
if (distroName === 'openshift' && minorVersion === '4.10') {
stage = 'beta';
}

versionsToTest.push({ distribution: distroName, version: latestMinorVersions[distroName][minorVersion], stage });
});
});

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -697,6 +698,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -735,6 +737,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -972,6 +975,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_SLUG: minimal-rbac
APP_VERSION_LABEL: "0.0.1"
Expand Down Expand Up @@ -1080,6 +1084,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_SLUG: multi-namespace-yeti
steps:
Expand Down Expand Up @@ -1191,6 +1196,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_NAME: multi-namespace-yeti
APP_SLUG: multi-namespace
Expand Down Expand Up @@ -1458,6 +1464,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_SLUG: helm-install-order
steps:
Expand Down Expand Up @@ -1555,6 +1562,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_SLUG: yamlescape
steps:
Expand Down Expand Up @@ -2371,6 +2379,7 @@ jobs:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_SLUG: postgres-to-rqlite
BASE_KOTS_VERSION: v1.57.0
Expand Down

0 comments on commit 0038588

Please sign in to comment.