Skip to content

Commit

Permalink
Added container_slug
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurphy18 committed Nov 15, 2024
1 parent c7e11a7 commit 906d38d
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 30 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
with:
distro-slug: macos-12
display-name: macOS 12
container-slug: macos-12
timeout: 20
runs-on: macos-12
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
Expand All @@ -139,6 +140,7 @@ jobs:
with:
distro-slug: macos-13
display-name: macOS 13
container-slug: macos-13
timeout: 20
runs-on: macos-13
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
Expand All @@ -155,6 +157,7 @@ jobs:
with:
distro-slug: windows-2022
display-name: Windows 2022
container-slug: windows-2022
timeout: 20
runs-on: windows-2022
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
Expand All @@ -171,6 +174,7 @@ jobs:
with:
distro-slug: amazonlinux-2
display-name: Amazon 2
container-slug: amazonlinux-2
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'

Expand All @@ -185,6 +189,7 @@ jobs:
with:
distro-slug: amazonlinux-2023
display-name: Amazon 2023
container-slug: amazonlinux-2023
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'

Expand All @@ -199,6 +204,7 @@ jobs:
with:
distro-slug: debian-11
display-name: Debian 11
container-slug: debian-11
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'

Expand All @@ -213,6 +219,7 @@ jobs:
with:
distro-slug: debian-12
display-name: Debian 12
container-slug: debian-12
timeout: 20
instances: '["stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'

Expand All @@ -227,6 +234,7 @@ jobs:
with:
distro-slug: debian-13
display-name: Debian 13
container-slug: debian-13
timeout: 20
instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'

Expand All @@ -241,6 +249,7 @@ jobs:
with:
distro-slug: fedora-40
display-name: Fedora 40
container-slug: fedora-40
timeout: 20
instances: '["stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'

Expand All @@ -255,6 +264,7 @@ jobs:
with:
distro-slug: photon-4
display-name: Photon OS 4
container-slug: photon-4
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]'

Expand All @@ -269,6 +279,7 @@ jobs:
with:
distro-slug: photon-5
display-name: Photon OS 5
container-slug: photon-5
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]'

Expand All @@ -283,6 +294,7 @@ jobs:
with:
distro-slug: rockylinux-8
display-name: Rocky Linux 8
container-slug: rockylinux-8
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'

Expand All @@ -297,48 +309,52 @@ jobs:
with:
distro-slug: rockylinux-9
display-name: Rocky Linux 9
container-slug: rockylinux-9
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'


ubuntu-20.04:
ubuntu-2004:
name: Ubuntu 20.04
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: ubuntu-20.04
distro-slug: ubuntu-2004
display-name: Ubuntu 20.04
container-slug: ubuntu-20.04
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'


ubuntu-22.04:
ubuntu-2204:
name: Ubuntu 22.04
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: ubuntu-22.04
distro-slug: ubuntu-2204
display-name: Ubuntu 22.04
container-slug: ubuntu-22.04
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'


ubuntu-24.04:
ubuntu-2404:
name: Ubuntu 24.04
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: ubuntu-24.04
distro-slug: ubuntu-2404
display-name: Ubuntu 24.04
container-slug: ubuntu-24.04
timeout: 20
instances: '["stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'

Expand All @@ -364,9 +380,9 @@ jobs:
- photon-5
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-2004
- ubuntu-2204
- ubuntu-2404
if: always()
steps:

Expand Down
63 changes: 43 additions & 20 deletions .github/workflows/templates/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-20.04",
"ubuntu-22.04",
"ubuntu-24.04",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]

WINDOWS = [
Expand All @@ -43,9 +43,9 @@
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-20.04",
"ubuntu-22.04",
"ubuntu-24.04",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]

ONEDIR_DISTROS = [
Expand All @@ -61,9 +61,9 @@
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-20.04",
"ubuntu-22.04",
"ubuntu-24.04",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]

ONEDIR_RC_DISTROS = [
Expand All @@ -73,13 +73,13 @@
"photon-4",
"photon-5",
"rockylinux-9",
"ubuntu-24.04",
"ubuntu-2404",
]

BLACKLIST_3006 = [
"debian-12",
"fedora-40",
"ubuntu-24.04",
"ubuntu-2404",
]

BLACKLIST_3007 = [
Expand All @@ -96,9 +96,9 @@
"photon-4",
"photon-5",
"rockylinux-9",
"ubuntu-20.04",
"ubuntu-22.04",
"ubuntu-24.04",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]

BLACKLIST_GIT_3007 = [
Expand All @@ -111,9 +111,9 @@
"photon-4",
"photon-5",
"rockylinux-9",
"ubuntu-20.04",
"ubuntu-22.04",
"ubuntu-24.04",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]

BLACKLIST_GIT_MASTER = [
Expand Down Expand Up @@ -193,14 +193,33 @@
"photon-5": "Photon OS 5",
"rockylinux-8": "Rocky Linux 8",
"rockylinux-9": "Rocky Linux 9",
"ubuntu-20.04": "Ubuntu 20.04",
"ubuntu-22.04": "Ubuntu 22.04",
"ubuntu-24.04": "Ubuntu 24.04",
"ubuntu-2004": "Ubuntu 20.04",
"ubuntu-2204": "Ubuntu 22.04",
"ubuntu-2404": "Ubuntu 24.04",
"macos-12": "macOS 12",
"macos-13": "macOS 13",
"windows-2022": "Windows 2022",
}

CONTAINER_SLUG_NAMES = {
"amazonlinux-2": "amazonlinux-2",
"amazonlinux-2023": "amazonlinux-2023",
"debian-11": "debian-11",
"debian-12": "debian-12",
"debian-13": "debian-13",
"fedora-40": "fedora-40",
"photon-4": "photon-4",
"photon-5": "photon-5",
"rockylinux-8": "rockylinux-8",
"rockylinux-9": "rockylinux-9",
"ubuntu-2004": "ubuntu-20.04",
"ubuntu-2204": "ubuntu-22.04",
"ubuntu-2404": "ubuntu-24.04",
"macos-12": "macos-12",
"macos-13": "macos-13",
"windows-2022": "windows-2022",
}

TIMEOUT_DEFAULT = 20
TIMEOUT_OVERRIDES = {}
VERSION_ONLY_OVERRIDES = []
Expand All @@ -215,6 +234,7 @@
with:
distro-slug: {distro}
display-name: {display_name}
container-slug: {container_name}
timeout: {timeout_minutes}{runs_on}
instances: '{instances}'
"""
Expand Down Expand Up @@ -265,6 +285,7 @@ def generate_test_jobs():
ifcheck=ifcheck,
instances=json.dumps(instances),
display_name=DISTRO_DISPLAY_NAMES[distro],
container_name=CONTAINER_SLUG_NAMES[distro],
timeout_minutes=timeout_minutes,
)

Expand Down Expand Up @@ -310,6 +331,7 @@ def generate_test_jobs():
ifcheck=ifcheck,
instances=json.dumps(instances),
display_name=DISTRO_DISPLAY_NAMES[distro],
container_name=CONTAINER_SLUG_NAMES[distro],
timeout_minutes=timeout_minutes,
)

Expand Down Expand Up @@ -409,6 +431,7 @@ def generate_test_jobs():
ifcheck=ifcheck,
instances=json.dumps(instances),
display_name=DISTRO_DISPLAY_NAMES[distro],
container_name=CONTAINER_SLUG_NAMES[distro],
timeout_minutes=timeout_minutes,
)

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
required: true
description: The Instances To Test

container-slug:
type: string
required: true
description: The Container Slug

timeout:
type: number
required: false
Expand All @@ -28,7 +33,7 @@ jobs:
name: ${{ matrix.instance }}
runs-on: ubuntu-latest
container:
image: ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.distro-slug}}
image: ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }}

timeout-minutes: ${{ inputs.timeout }}
strategy:
Expand Down

0 comments on commit 906d38d

Please sign in to comment.