Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run tests against k3s and openshift #4392

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/cmx-versions/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
replicated-api-token:
description: 'Replicated API token for CMX'
required: true
distros:
description: 'A comma-separated list of distros to test against. If not provided, all distros will be tested.'
required: false
default: ''

outputs:
versions-to-test:
Expand Down
13 changes: 12 additions & 1 deletion .github/actions/cmx-versions/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7651,6 +7651,12 @@ async function getClusterVersions() {
return;
}

let distrosToTest = new Set(); // tests all distros if empty
const distrosInput = core.getInput('distros') || '';
if (distrosInput !== '') {
distrosToTest = new Set(distrosInput.split(','));
}

// versions to test looks like this:
// [
// {distribution: k3s, version: v1.24, stage: 'stable'},
Expand All @@ -7661,6 +7667,11 @@ async function getClusterVersions() {
clusterVersions.forEach((distribution) => {
const distroName = distribution.short_name;

if (distrosToTest.size > 0 && !distrosToTest.has(distroName)) {
// distribution is not in the distros array, skip it
return;
}

if (distroName === 'helmvm' || distroName === 'kurl') {
// excluding the embedded distributions
return;
Expand Down Expand Up @@ -7710,4 +7721,4 @@ getClusterVersions();

module.exports = __webpack_exports__;
/******/ })()
;
;
11 changes: 11 additions & 0 deletions .github/actions/cmx-versions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ async function getClusterVersions() {
return;
}

let distrosToTest = new Set(); // tests all distros if empty
const distrosInput = core.getInput('distros') || '';
if (distrosInput !== '') {
distrosToTest = new Set(distrosInput.split(','));
}

// versions to test looks like this:
// [
// {distribution: k3s, version: v1.24, stage: 'stable'},
Expand All @@ -41,6 +47,11 @@ async function getClusterVersions() {
clusterVersions.forEach((distribution) => {
const distroName = distribution.short_name;

if (distrosToTest.size > 0 && !distrosToTest.has(distroName)) {
// distribution is not in the distros array, skip it
return;
}

if (distroName === 'helmvm' || distroName === 'kurl') {
// excluding the embedded distributions
return;
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ updates:
# Npm
- package-ecosystem: "npm"
directory: "/web"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
day: "saturday"
Expand All @@ -23,6 +24,7 @@ updates:

- package-ecosystem: "gomod"
directory: "/"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
day: "saturday"
Expand All @@ -40,6 +42,7 @@ updates:

- package-ecosystem: "gomod"
directory: "/kurl_proxy"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
day: "saturday"
Expand All @@ -48,11 +51,17 @@ updates:
- "dependabot"
- "go"
- "type::security"
groups:
security:
update-types:
- "patch"
- "minor"

## GitHub Actions

- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
day: "saturday"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ jobs:
uses: ./.github/actions/cmx-versions
with:
replicated-api-token: ${{ secrets.C11Y_MATRIX_TOKEN }}
distros: 'k3s,openshift'
outputs:
versions-to-test: ${{ steps.cmx-versions-to-test.outputs.versions-to-test }}

Expand Down
Loading