From 9cd1c2e13c028306084c7d0e8de66c72f883036a Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Tue, 23 Jan 2024 16:24:28 +0000 Subject: [PATCH] Only run tests against k3s and OpenShift --- .github/actions/cmx-versions/action.yaml | 4 ++++ .github/actions/cmx-versions/dist/index.js | 13 ++++++++++++- .github/actions/cmx-versions/index.js | 11 +++++++++++ .github/dependabot.yml | 9 +++++++++ .github/workflows/build-test.yaml | 1 + 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/actions/cmx-versions/action.yaml b/.github/actions/cmx-versions/action.yaml index 91a1a79b30..41f253a5e7 100644 --- a/.github/actions/cmx-versions/action.yaml +++ b/.github/actions/cmx-versions/action.yaml @@ -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: diff --git a/.github/actions/cmx-versions/dist/index.js b/.github/actions/cmx-versions/dist/index.js index 6a28fb5826..e41112482a 100644 --- a/.github/actions/cmx-versions/dist/index.js +++ b/.github/actions/cmx-versions/dist/index.js @@ -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'}, @@ -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; @@ -7710,4 +7721,4 @@ getClusterVersions(); module.exports = __webpack_exports__; /******/ })() -; +; \ No newline at end of file diff --git a/.github/actions/cmx-versions/index.js b/.github/actions/cmx-versions/index.js index 213ffe0939..90c9fe16f6 100644 --- a/.github/actions/cmx-versions/index.js +++ b/.github/actions/cmx-versions/index.js @@ -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'}, @@ -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; diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dd6e50f1ff..01b8e0357d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,7 @@ updates: # Npm - package-ecosystem: "npm" directory: "/web" + open-pull-requests-limit: 2 schedule: interval: "weekly" day: "saturday" @@ -23,6 +24,7 @@ updates: - package-ecosystem: "gomod" directory: "/" + open-pull-requests-limit: 2 schedule: interval: "weekly" day: "saturday" @@ -40,6 +42,7 @@ updates: - package-ecosystem: "gomod" directory: "/kurl_proxy" + open-pull-requests-limit: 2 schedule: interval: "weekly" day: "saturday" @@ -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" diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 918bd4cf34..5deb27b466 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -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 }}