Skip to content

Commit

Permalink
Don't use separate jobs, just use the matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
  • Loading branch information
s0undt3ch committed Sep 25, 2023
1 parent b22be75 commit dedce82
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 205 deletions.
43 changes: 2 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ jobs:
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

photonos-4-arm64-pkg-tests:
name: Photon OS 4 Arm64 Package Tests
Expand All @@ -698,25 +699,6 @@ jobs:
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}

photonos-4-pkg-tests-fips:
name: Photon OS 4 Package Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-rpm-pkgs
uses: ./.github/workflows/test-packages-action.yml
with:
distro-slug: photonos-4
platform: linux
arch: x86_64
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
pkg-type: rpm
nox-version: 2022.8.7
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

ubuntu-2004-pkg-tests:
Expand Down Expand Up @@ -1288,6 +1270,7 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}
fips: true

photonos-4-arm64:
name: Photon OS 4 Arm64
Expand All @@ -1307,25 +1290,6 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}

photonos-4-fips:
name: Photon OS 4(FIPS)
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-salt-onedir
uses: ./.github/workflows/test-action.yml
with:
distro-slug: photonos-4
nox-session: ci-test-onedir
platform: linux
arch: x86_64
nox-version: 2022.8.7
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
skip-junit-reports: ${{ github.event_name == 'pull_request' }}
fips: true

ubuntu-2004:
Expand Down Expand Up @@ -1430,7 +1394,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand Down Expand Up @@ -1508,7 +1471,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand All @@ -1523,7 +1485,6 @@ jobs:
- photonos-3-pkg-tests
- photonos-4-pkg-tests
- photonos-4-arm64-pkg-tests
- photonos-4-pkg-tests-fips
- ubuntu-2004-pkg-tests
- ubuntu-2004-arm64-pkg-tests
- ubuntu-2204-pkg-tests
Expand Down
43 changes: 2 additions & 41 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ jobs:
skip-code-coverage: false
skip-junit-reports: false
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

photonos-4-arm64-pkg-tests:
name: Photon OS 4 Arm64 Package Tests
Expand All @@ -753,25 +754,6 @@ jobs:
skip-code-coverage: false
skip-junit-reports: false
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}

photonos-4-pkg-tests-fips:
name: Photon OS 4 Package Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-rpm-pkgs
uses: ./.github/workflows/test-packages-action.yml
with:
distro-slug: photonos-4
platform: linux
arch: x86_64
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
pkg-type: rpm
nox-version: 2022.8.7
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

ubuntu-2004-pkg-tests:
Expand Down Expand Up @@ -1343,6 +1325,7 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false
fips: true

photonos-4-arm64:
name: Photon OS 4 Arm64
Expand All @@ -1362,25 +1345,6 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false

photonos-4-fips:
name: Photon OS 4(FIPS)
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-salt-onedir
uses: ./.github/workflows/test-action.yml
with:
distro-slug: photonos-4
nox-session: ci-test-onedir
platform: linux
arch: x86_64
nox-version: 2022.8.7
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false
fips: true

ubuntu-2004:
Expand Down Expand Up @@ -1485,7 +1449,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand Down Expand Up @@ -2194,7 +2157,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand Down Expand Up @@ -2262,7 +2224,6 @@ jobs:
- photonos-3-pkg-tests
- photonos-4-pkg-tests
- photonos-4-arm64-pkg-tests
- photonos-4-pkg-tests-fips
- ubuntu-2004-pkg-tests
- ubuntu-2004-arm64-pkg-tests
- ubuntu-2204-pkg-tests
Expand Down
43 changes: 2 additions & 41 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ jobs:
skip-code-coverage: false
skip-junit-reports: false
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

photonos-4-arm64-pkg-tests:
name: Photon OS 4 Arm64 Package Tests
Expand All @@ -732,25 +733,6 @@ jobs:
skip-code-coverage: false
skip-junit-reports: false
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}

photonos-4-pkg-tests-fips:
name: Photon OS 4 Package Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-rpm-pkgs
uses: ./.github/workflows/test-packages-action.yml
with:
distro-slug: photonos-4
platform: linux
arch: x86_64
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
pkg-type: rpm
nox-version: 2022.8.7
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

ubuntu-2004-pkg-tests:
Expand Down Expand Up @@ -1322,6 +1304,7 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false
fips: true

photonos-4-arm64:
name: Photon OS 4 Arm64
Expand All @@ -1341,25 +1324,6 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false

photonos-4-fips:
name: Photon OS 4(FIPS)
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-salt-onedir
uses: ./.github/workflows/test-action.yml
with:
distro-slug: photonos-4
nox-session: ci-test-onedir
platform: linux
arch: x86_64
nox-version: 2022.8.7
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: false
skip-junit-reports: false
fips: true

ubuntu-2004:
Expand Down Expand Up @@ -1464,7 +1428,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand Down Expand Up @@ -1544,7 +1507,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand All @@ -1559,7 +1521,6 @@ jobs:
- photonos-3-pkg-tests
- photonos-4-pkg-tests
- photonos-4-arm64-pkg-tests
- photonos-4-pkg-tests-fips
- ubuntu-2004-pkg-tests
- ubuntu-2004-arm64-pkg-tests
- ubuntu-2204-pkg-tests
Expand Down
42 changes: 2 additions & 40 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ jobs:
skip-code-coverage: true
skip-junit-reports: true
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

photonos-4-arm64-pkg-tests:
name: Photon OS 4 Arm64 Package Tests
Expand All @@ -748,25 +749,6 @@ jobs:
skip-code-coverage: true
skip-junit-reports: true
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}

photonos-4-pkg-tests-fips:
name: Photon OS 4 Package Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-rpm-pkgs
uses: ./.github/workflows/test-packages-action.yml
with:
distro-slug: photonos-4
platform: linux
arch: x86_64
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
pkg-type: rpm
nox-version: 2022.8.7
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: true
skip-junit-reports: true
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
fips: true

ubuntu-2004-pkg-tests:
Expand Down Expand Up @@ -1338,6 +1320,7 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: true
skip-junit-reports: true
fips: true

photonos-4-arm64:
name: Photon OS 4 Arm64
Expand All @@ -1357,25 +1340,6 @@ jobs:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: true
skip-junit-reports: true

photonos-4-fips:
name: Photon OS 4(FIPS)
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-salt-onedir
uses: ./.github/workflows/test-action.yml
with:
distro-slug: photonos-4
nox-session: ci-test-onedir
platform: linux
arch: x86_64
nox-version: 2022.8.7
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
skip-code-coverage: true
skip-junit-reports: true
fips: true

ubuntu-2004:
Expand Down Expand Up @@ -2887,7 +2851,6 @@ jobs:
- photonos-3
- photonos-4
- photonos-4-arm64
- photonos-4-fips
- ubuntu-2004
- ubuntu-2004-arm64
- ubuntu-2204
Expand All @@ -2902,7 +2865,6 @@ jobs:
- photonos-3-pkg-tests
- photonos-4-pkg-tests
- photonos-4-arm64-pkg-tests
- photonos-4-pkg-tests-fips
- ubuntu-2004-pkg-tests
- ubuntu-2004-arm64-pkg-tests
- ubuntu-2204-pkg-tests
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/templates/test-salt-pkg.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,16 @@
("debian-11", "Debian 11", "x86_64", "deb", False),
("debian-11-arm64", "Debian 11 Arm64", "aarch64", "deb", False),
("photonos-3", "Photon OS 3", "x86_64", "rpm", False),
("photonos-4", "Photon OS 4", "x86_64", "rpm", False),
("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "rpm", False),
("photonos-4", "Photon OS 4", "x86_64", "rpm", True),
("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "rpm", True),
("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "deb", False),
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "deb", False),
("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "deb", False),
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "deb", False)
) %>

<%- for slug, display_name, arch, pkg_type, fips in linux_pkg_tests %>

<%- if fips %>
<%- set job_name = "{}-pkg-tests-fips".format(slug.replace(".", "")) %>
<%- else %>
<%- set job_name = "{}-pkg-tests".format(slug.replace(".", "")) %>
<%- endif %>
<%- set job_name = "{}-pkg-tests".format(slug.replace(".", "")) %>

<{ job_name }>:
<%- do test_salt_pkg_needs.append(job_name) %>
Expand Down
Loading

0 comments on commit dedce82

Please sign in to comment.