Skip to content

Commit fe5d647

Browse files
committed
Merge develop into stable for v2024.12.12 release
2 parents bf45a84 + db07164 commit fe5d647

File tree

9 files changed

+253
-151
lines changed

9 files changed

+253
-151
lines changed

.github/workflows/ci.yml

+37-5
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,36 @@ jobs:
180180

181181

182182

183+
amazonlinux-2023:
184+
name: Amazon 2023
185+
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
186+
uses: ./.github/workflows/test-linux.yml
187+
needs:
188+
- lint
189+
- generate-actions-workflow
190+
with:
191+
distro-slug: amazonlinux-2023
192+
display-name: Amazon 2023
193+
container-slug: amazonlinux-2023
194+
timeout: 20
195+
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
196+
197+
198+
debian-11:
199+
name: Debian 11
200+
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
201+
uses: ./.github/workflows/test-linux.yml
202+
needs:
203+
- lint
204+
- generate-actions-workflow
205+
with:
206+
distro-slug: debian-11
207+
display-name: Debian 11
208+
container-slug: debian-11
209+
timeout: 20
210+
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
211+
212+
183213
debian-12:
184214
name: Debian 12
185215
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
@@ -190,7 +220,7 @@ jobs:
190220
with:
191221
distro-slug: debian-12
192222
display-name: Debian 12
193-
container-slug: systemd-debian-12
223+
container-slug: debian-12
194224
timeout: 20
195225
instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
196226

@@ -205,7 +235,7 @@ jobs:
205235
with:
206236
distro-slug: photon-5
207237
display-name: Photon OS 5
208-
container-slug: systemd-photon-5
238+
container-slug: photon-5
209239
timeout: 20
210240
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
211241

@@ -220,7 +250,7 @@ jobs:
220250
with:
221251
distro-slug: rockylinux-8
222252
display-name: Rocky Linux 8
223-
container-slug: systemd-rockylinux-8
253+
container-slug: rockylinux-8
224254
timeout: 20
225255
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
226256

@@ -235,7 +265,7 @@ jobs:
235265
with:
236266
distro-slug: rockylinux-9
237267
display-name: Rocky Linux 9
238-
container-slug: systemd-rockylinux-9
268+
container-slug: rockylinux-9
239269
timeout: 20
240270
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
241271

@@ -250,7 +280,7 @@ jobs:
250280
with:
251281
distro-slug: ubuntu-2204
252282
display-name: Ubuntu 22.04
253-
container-slug: systemd-ubuntu-22.04
283+
container-slug: ubuntu-22.04
254284
timeout: 20
255285
instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
256286

@@ -267,6 +297,8 @@ jobs:
267297
- macos-13
268298
- macos-14
269299
- windows-2022
300+
- amazonlinux-2023
301+
- debian-11
270302
- debian-12
271303
- photon-5
272304
- rockylinux-8

.github/workflows/templates/generate.py

+20-27
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66

77
os.chdir(os.path.abspath(os.path.dirname(__file__)))
88

9-
# only test against current containers with systemd
10-
# will add these when they become available with systemd
119
# "amazonlinux-2",
12-
# "amazonlinux-2023",
13-
# "debian-11",
1410
# "debian-13",
1511
# "fedora-40",
1612
# "photon-4",
1713
# "ubuntu-2004",
1814
# "ubuntu-2404",
1915
LINUX_DISTROS = [
16+
"amazonlinux-2023",
17+
"debian-11",
2018
"debian-12",
2119
"photon-5",
2220
"rockylinux-8",
@@ -34,44 +32,38 @@
3432
"macos-14",
3533
]
3634

37-
# only test against current containers with systemd
38-
# will add these when they become available with systemd
3935
# "amazonlinux-2",
40-
# "amazonlinux-2023",
41-
# "debian-11",
4236
# "debian-13",
4337
# "fedora-40",
4438
# "photon-4",
4539
# "ubuntu-2004",
4640
# "ubuntu-2404",
4741
STABLE_DISTROS = [
42+
"amazonlinux-2023",
43+
"debian-11",
4844
"debian-12",
4945
"photon-5",
5046
"rockylinux-8",
5147
"rockylinux-9",
5248
"ubuntu-2204",
5349
]
5450

55-
# only test against current containers with systemd
56-
# will add these when they become available with systemd
5751
# "amazonlinux-2",
58-
# "amazonlinux-2023",
59-
# "debian-11",
6052
# "debian-13",
6153
# "fedora-40",
6254
# "photon-4",
6355
# "ubuntu-2004",
6456
# "ubuntu-2404",
6557
ONEDIR_DISTROS = [
58+
"amazonlinux-2023",
59+
"debian-11",
6660
"debian-12",
6761
"photon-5",
6862
"rockylinux-8",
6963
"rockylinux-9",
7064
"ubuntu-2204",
7165
]
7266

73-
# only test against current containers with systemd
74-
# will add these when they become available with systemd
7567
# "amazonlinux-2",
7668
# "amazonlinux-2023",
7769
# "photon-4",
@@ -102,6 +94,7 @@
10294
"amazonlinux-2023",
10395
"debian-11",
10496
"debian-12",
97+
"debian-13",
10598
"fedora-40",
10699
"photon-4",
107100
"photon-5",
@@ -217,19 +210,19 @@
217210
}
218211

219212
CONTAINER_SLUG_NAMES = {
220-
"amazonlinux-2": "systemd-amazonlinux-2",
221-
"amazonlinux-2023": "systemd-amazonlinux-2023",
222-
"debian-11": "systemd-debian-11",
223-
"debian-12": "systemd-debian-12",
224-
"debian-13": "systemd-debian-13",
225-
"fedora-40": "systemd-fedora-40",
226-
"photon-4": "systemd-photon-4",
227-
"photon-5": "systemd-photon-5",
228-
"rockylinux-8": "systemd-rockylinux-8",
229-
"rockylinux-9": "systemd-rockylinux-9",
230-
"ubuntu-2004": "systemd-ubuntu-20.04",
231-
"ubuntu-2204": "systemd-ubuntu-22.04",
232-
"ubuntu-2404": "systemd-ubuntu-24.04",
213+
"amazonlinux-2": "amazonlinux-2",
214+
"amazonlinux-2023": "amazonlinux-2023",
215+
"debian-11": "debian-11",
216+
"debian-12": "debian-12",
217+
"debian-13": "debian-13",
218+
"fedora-40": "fedora-40",
219+
"photon-4": "photon-4",
220+
"photon-5": "photon-5",
221+
"rockylinux-8": "rockylinux-8",
222+
"rockylinux-9": "rockylinux-9",
223+
"ubuntu-2004": "ubuntu-20.04",
224+
"ubuntu-2204": "ubuntu-22.04",
225+
"ubuntu-2404": "ubuntu-24.04",
233226
"macos-12": "macos-12",
234227
"macos-13": "macos-13",
235228
"macos-14": "macOS 14",

.github/workflows/test-linux.yml

+24-16
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jobs:
3232
Test:
3333
name: ${{ matrix.instance }}
3434
runs-on: ubuntu-latest
35-
container:
36-
image: ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }}
37-
options: --privileged
38-
3935
timeout-minutes: ${{ inputs.timeout }}
4036
strategy:
4137
max-parallel: 2
@@ -46,16 +42,6 @@ jobs:
4642
steps:
4743
- uses: actions/checkout@v4
4844

49-
- name: Install Python Dependencies with pip breakage
50-
if: ${{ ( inputs.distro-slug == 'debian-11' ) || ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) }}
51-
run: |
52-
python3 -m pip install --break-system-packages -r tests/requirements.txt
53-
54-
- name: Install Python Dependencies without pip breakage
55-
if: ${{ ( inputs.distro-slug != 'debian-11' ) && ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) }}
56-
run: |
57-
python3 -m pip install -r tests/requirements.txt
58-
5945
- name: Get Version
6046
run: |
6147
# We need to get the version here and make it an environment variable
@@ -65,17 +51,39 @@ jobs:
6551
vt_parm_ver=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
6652
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
6753
54+
- name: "Pull container ${{ inputs.container-slug }}"
55+
run: |
56+
docker pull ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }}
57+
58+
- name: "Create container ${{ inputs.container-slug }}"
59+
run: |
60+
/usr/bin/docker create --name ${{ github.run_id }}_salt-test --workdir /_w/ --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -e $GITHUB_ENV -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/salt-bootstrap/salt-bootstrap":"/_w/btstrap" --entrypoint "/usr/lib/systemd/systemd" ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }} --systemd --unit rescue.target
61+
62+
- name: "Start container ${{ inputs.container-slug }}"
63+
run: |
64+
/usr/bin/docker start ${{ github.run_id }}_salt-test
65+
66+
- name: "Install Python Dependencies with pip breakage in container ${{ inputs.container-slug }}"
67+
if: ${{ ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) }}
68+
run: |
69+
docker exec ${{ github.run_id}}_salt-test python3 -m pip install --break-system-packages -r /_w/btstrap/tests/requirements.txt
70+
71+
- name: "Install Python Dependencies without pip breakage in container ${{ inputs.container-slug }}"
72+
if: ${{ ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) }}
73+
run: |
74+
docker exec ${{ github.run_id}}_salt-test python3 -m pip install -r /_w/btstrap/tests/requirements.txt
75+
6876
- name: Bootstrap Salt
6977
run: |
7078
# sed 1st - becomes space, 2nd - becomes dot
7179
bt_arg1=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $1}')
7280
bt_arg2=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
7381
echo "bt parms ,$bt_parms, bt_arg1 ,$bt_arg1, bt_arg2 ,$bt_arg2,"
74-
sh -x ./bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
82+
docker exec ${{ github.run_id}}_salt-test sh -x /_w/btstrap/bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
7583
7684
- name: Test Bootstrap
7785
run: |
78-
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
86+
docker exec ${{ github.run_id}}_salt-test pytest --cache-clear -v -s -ra --log-cli-level=debug /_w/btstrap/tests/integration/
7987
8088
- name: Set Exit Status
8189
if: always()

.pre-commit-config.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ repos:
4141
rev: v3.15.0
4242
hooks:
4343
- id: pyupgrade
44-
name: Rewrite Code to be Py3.9+
45-
args: [--py39-plus]
44+
name: Rewrite Code to be Py3.6+
45+
args: [--py36-plus]
46+
## DGM name: Rewrite Code to be Py3.9+
47+
## DGM args: [--py39-plus]
4648

4749
- repo: https://github.com/asottile/reorder_python_imports
4850
rev: v3.12.0

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# v2024.12.12
2+
3+
## What's Changed
4+
5+
- Restrict use of dnf to Fedora only, otherwise use yum when dealing with RedHat family by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2070
6+
- Updating container usage to that used in new Salt pipelines for CI/CD, fix Amazon Linux by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2071
7+
8+
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.12.09...v2024.12.12
9+
110
# v2024.12.09
211

312
## What's Changed

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
3737

3838
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
3939

40+
- 2024.12.09: ``44f9405a6d9622ad8fa7c93e83a52e01ca328f27e4e9dea4a52268c6a22dbe6d``
4041
- 2024.11.29: ``0ac87384dee051aceded69704485a5de0e4a308551a462b10c262111b57acff0``
4142
- 2024.11.27: ``e972bd1ef01d09cd1d9294374ef974c9e3dd9a2aee37cf3859144585fd8bf1d0``
4243
- 2024.11.26: ``832c7a20b96e1df171d715323df9afff8a11aef42d15598c007f240bc89d723c``

bootstrap-salt.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ if ($help) {
108108
exit 0
109109
}
110110

111-
$__ScriptVersion = "2024.12.09"
111+
$__ScriptVersion = "2024.12.12"
112112
$ScriptName = $myInvocation.MyCommand.Name
113113

114114
# We'll check for the Version next, because it also has no requirements

0 commit comments

Comments
 (0)