Compare commits

...

160 commits

Author SHA1 Message Date
Salt Project Packaging
dd49d607b9 Update README.rst with 2025.02.24 release sha256sum 2025-02-24 22:10:42 +00:00
Salt Project Packaging
b5c92f7a28 Update develop branch for the v2025.02.24 release 2025-02-24 22:09:49 +00:00
Shane Lee
420dc293c6
Merge pull request #2076 from dmurphy18/fix_2075
Remove support for macos-12, as deprecated by github
2025-02-24 14:42:21 -07:00
David Murphy
4498c20596
Remove support for macos-12, as deprecated by github 2025-02-24 14:27:07 -07:00
David Murphy
911349a8d3
Merge pull request #2074 from twangboy/fix_windows
Fix powershell instructions
2025-02-24 13:30:07 -07:00
Twangboy
fba522c464
Fix powershell instructions 2025-02-24 12:54:58 -07:00
David Murphy
bb988c99d6
Merge pull request #2022 from mrichar1/shallow_clone
Use treeless clone to 'shallow' clone again.
2025-01-29 15:25:37 -07:00
David Murphy
b626403ace
Merge branch 'develop' into shallow_clone 2025-01-29 14:44:31 -07:00
David Murphy
b58596dec3
Merge pull request #2073 from twangboy/update_reqs
Update requirements to address security issues
2025-01-29 14:29:11 -07:00
twangboy
a2b422512d
Update requirements to address security issues 2025-01-13 14:38:57 -07:00
Matthew Richardson
82faed1938
Merge remote-tracking branch 'upstream/develop' into shallow_clone
Fixed to use GIT_REV_ADJ
2024-12-21 22:33:51 +00:00
Salt Project Packaging
2058991403 Update README.rst with 2024.12.12 release sha256sum 2024-12-12 20:17:42 +00:00
Salt Project Packaging
db07164315 Update develop branch for the v2024.12.12 release 2024-12-12 20:16:55 +00:00
David Murphy
e85ff18bbc
Merge pull request #2071 from dmurphy18/adj_containers_used
Updating container usage to that used in new Salt pipelines for CI/CD, fix Amazon Linux
2024-12-12 13:15:24 -07:00
David Murphy
73475d2505
Removed Debian-13 container and cleaned up debug statements 2024-12-12 12:24:29 -07:00
David Murphy
1040775f56
Added Debian 11 and 13 containers, removed Amazon Linux 2 container, updated test 2024-12-12 10:55:42 -07:00
David Murphy
316e65a979
Updated tests, and debugging, min Python version 3.6 2024-12-12 10:24:19 -07:00
David Murphy
0075aa9902
Updated Amazon dependencies, and tests 2024-12-11 16:56:41 -07:00
David Murphy
651d50aa05
Updated tests to allow for older Python versions, add Amazon containers 2024-12-11 16:02:26 -07:00
David Murphy
f47986ffd5
Update tests - debugging 2024-12-11 16:02:25 -07:00
David Murphy
dc01eea317
More actions work 2024-12-11 16:02:25 -07:00
David Murphy
d4cc7c1184
Updating actions 2024-12-11 16:02:25 -07:00
David Murphy
a3971ee993
More actions usage 2024-12-11 16:02:24 -07:00
David Murphy
b6683d5e5e
More actions work 2024-12-11 16:02:24 -07:00
David Murphy
9d69e8a49d
Working on actions 2024-12-11 16:02:23 -07:00
David Murphy
a0285f3e6e
Fixing actions 2024-12-11 16:02:23 -07:00
David Murphy
852a98fce4
Updating github actions used 2024-12-11 16:02:23 -07:00
David Murphy
ac14d1d0fe
Updating container usage to reflect that used in new Salt pipelines for CI/CD 2024-12-11 16:02:22 -07:00
David Murphy
fa5ae443bc
Merge pull request #2070 from dmurphy18/fix_amzn2_yum
Restrict use of dnf to Fedora only, otherwise use yum when dealing with RedHat family
2024-12-11 15:50:15 -07:00
David Murphy
a4c84236d8
Adjust Amazon support since their yum (v3) doesn't support config-manager 2024-12-11 11:08:54 -07:00
David Murphy
e5c03a53aa
Restrict use of dnf to Fedora only, otherwise use yum when dealing with RedHat family 2024-12-10 11:26:38 -07:00
Salt Project Packaging
54243fea9c Update README.rst with 2024.12.09 release sha256sum 2024-12-09 23:11:16 +00:00
Salt Project Packaging
0bd577de50 Update develop branch for the v2024.12.09 release 2024-12-09 23:10:33 +00:00
David Murphy
04c959b723
Merge pull request #2066 from dmurphy18/upd_suse_support
Utilize salt-project packages with SUSE
2024-12-09 16:09:15 -07:00
David Murphy
644dfd1c57
Updates to correctly support SLES 15 (sled), with allowance for minor versions 2024-12-09 13:59:19 -07:00
David Murphy
1b98100152
Removed unused variable 2024-12-04 10:33:09 -07:00
David Murphy
e4b43b099b
Merge pull request #2065 from twangboy/update_quickstart
Fix quickstart for Windows with new repo
2024-12-04 10:13:09 -07:00
twangboy
c4fdafaef3
Fix quickstart for Windows with new repo 2024-12-04 08:40:04 -07:00
Salt Project Packaging
bbaa32a888 Update README.rst with 2024.11.29 release sha256sum 2024-11-29 17:58:54 +00:00
Salt Project Packaging
ce687f4066 Update develop branch for the v2024.11.29 release 2024-11-29 17:58:13 +00:00
David Murphy
1a016b6ed7
Merge pull request #2061 from dmurphy18/fix_release
Updated date
2024-11-29 10:56:58 -07:00
David Murphy
5689a93c79
Updated date 2024-11-29 10:41:05 -07:00
David Murphy
670c0bfdd6
Merge pull request #2060 from dmurphy18/revert_force_git_tag
Revert forcing git tag, other issues with check sums calculated, easiest solution is wait a day to release
2024-11-27 12:51:14 -07:00
David Murphy
777c3ad055
Revert forcing git tag, other issues with check sums calculated, easy solution is wait a day to release 2024-11-27 12:47:45 -07:00
Salt Project Packaging
ab523a74dc Update develop branch for the v2024.11.27 release 2024-11-27 19:40:25 +00:00
David Murphy
5b183f4111
Merge pull request #2059 from dmurphy18/fix_date_tag
Fix date tag
2024-11-27 12:38:17 -07:00
David Murphy
eaf75272b7
Merge branch 'develop' into fix_date_tag 2024-11-27 12:36:55 -07:00
David Murphy
72254edd67
Forcing git tag for release 2024.11.27 due to existing tag which was set by accident 2024-11-27 12:31:39 -07:00
Salt Project Packaging
578ee0eeeb Update develop branch for the v2024.11.27 release 2024-11-27 19:20:52 +00:00
David Murphy
70219648f8
Merge pull request #2058 from dmurphy18/fix_date_tag
Updated date to overcome issue with existing tag for 2024.11.27
2024-11-27 12:19:37 -07:00
David Murphy
677ecee801
Updated date to overcome issue with existing tag for 2024.11.27 2024-11-27 12:04:52 -07:00
David Murphy
ff5d46dddd
Merge branch 'develop' into fix_date_tag 2024-11-27 12:03:56 -07:00
David Murphy
535a53ea36
Updated date to overcome issue with existing tag for 2024.11.27 2024-11-27 12:01:16 -07:00
Salt Project Packaging
5339251d59 Update README.rst with 2024.11.27 release sha256sum 2024-11-27 18:57:41 +00:00
Salt Project Packaging
fdcfec993b Update develop branch for the v2024.11.27 release 2024-11-27 18:57:26 +00:00
Salt Project Packaging
7492ff27f3 Update develop branch for the v2024.11.27 release 2024-11-27 18:56:47 +00:00
David Murphy
bd9d776046
Merge pull request #2057 from dmurphy18/fix_git_rh
Testing git install methods
2024-11-27 11:48:40 -07:00
David Murphy
3c0f302b77
Added support for AlmaLinux, removed Rocky Linux 9 from git testing 2024-11-27 11:26:48 -07:00
David Murphy
d0bd4612a6
Testing pip installs from PyPI 2024-11-26 17:32:02 -07:00
David Murphy
9b3055b1bd
Testing fixes for PyPI requirements clashes 2024-11-26 15:06:24 -07:00
David Murphy
e4b3164136
Updated containers, and added back in AlmaLinux 2024-11-26 11:40:09 -07:00
David Murphy
a79cd05fa0
Updated to install jaraco.functools v4.0.0 for splat on Linux 2024-11-26 10:45:49 -07:00
David Murphy
b96a669d39
Testin ggit install methods 2024-11-26 09:57:47 -07:00
Salt Project Packaging
124e62e9fa Update README.rst with 2024.11.26 release sha256sum 2024-11-26 16:41:23 +00:00
Salt Project Packaging
7a445852b4 Update develop branch for the v2024.11.26 release 2024-11-26 16:40:38 +00:00
David Murphy
8e3f5e1c83
Merge pull request #2056 from ScriptAutomate/update-readme-help
Update README script help output and scriptversions
2024-11-26 09:25:02 -07:00
ScriptAutomate
a336478623
Update README script help output and scriptversions 2024-11-26 10:16:06 -06:00
David Murphy
40e91846d8
Merge pull request #2052 from dmurphy18/fix_bt2049
Updated URLs in README, and fix deps download issue on RedHat family
2024-11-26 09:12:01 -07:00
David Murphy
13e00e0bbc
Limited the containers tested on, and skip git testing till Salt requirements fixed 2024-11-25 19:01:19 -07:00
David Murphy
ba0a5f2759
Added back more containers to test on, revised git usage due to Salt git errors, see https://github.com/saltstack/salt/issues/67070 2024-11-25 17:28:36 -07:00
David Murphy
6629b40bfc
Trying using requirements pkg file 2024-11-25 17:11:35 -07:00
David Murphy
6b27fc3e97
Restored pip check, updated README and Windows ps1 for packages.broadcom.com 2024-11-25 16:52:36 -07:00
David Murphy
d7d03738da
Adjusting install from git 2024-11-25 16:35:33 -07:00
David Murphy
f8da32f34b
Upgrade pip using python3 -m pip install 2024-11-25 13:29:21 -07:00
David Murphy
6360fd19f2
Adjust version test to allow for git versions of salt 2024-11-25 13:07:35 -07:00
David Murphy
543d831312
Fixed typo 2024-11-25 12:58:58 -07:00
David Murphy
8fa55b714e
Adjust allowing for git version input 3006 or 3007 2024-11-25 12:32:09 -07:00
David Murphy
86d1bb9662
Added missing procps for Debian / Ubuntu container, and reduced containers used 2024-11-25 12:15:39 -07:00
David Murphy
344b942c28
Fixed git build issue with deps on RedHat family, and added more systemd containers to test against 2024-11-25 11:35:17 -07:00
David Murphy
320b3b787e
Fixed help output and README 2024-11-22 15:02:06 -07:00
David Murphy
c2071bd443
Update README.rst
Co-authored-by: Derek Ardolf <ScriptAutomate@users.noreply.github.com>
2024-11-22 14:13:48 -07:00
David Murphy
b5d70f024c
Update README.rst
Co-authored-by: Derek Ardolf <ScriptAutomate@users.noreply.github.com>
2024-11-22 14:13:39 -07:00
David Murphy
d0d73fa9f4
Update README.rst
Co-authored-by: Derek Ardolf <ScriptAutomate@users.noreply.github.com>
2024-11-22 14:13:17 -07:00
David Murphy
360a923190
Update README.rst
Co-authored-by: Derek Ardolf <ScriptAutomate@users.noreply.github.com>
2024-11-22 14:13:07 -07:00
David Murphy
6c22d58dac
Update README.rst
Co-authored-by: Derek Ardolf <ScriptAutomate@users.noreply.github.com>
2024-11-22 14:12:46 -07:00
David Murphy
e894ebce3e
Update README.rst
Co-authored-by: Derek Ardolf <ScriptAutomate@users.noreply.github.com>
2024-11-22 14:12:30 -07:00
David Murphy
0e00e1d3ca
Updated RUL for downloading the bootstrap script etc to GitHub repository 2024-11-22 12:38:27 -07:00
Salt Project Packaging
6ac1dcddaa Update README.rst with 2024.11.21 release sha256sum 2024-11-21 22:10:53 +00:00
Salt Project Packaging
f2abbd4e2f Update develop branch for the v2024.11.21 release 2024-11-21 22:10:08 +00:00
David Murphy
aca7925571
Merge pull request #2048 from ruslantum/fix_2047
[WIP] hwclock check missing additional condition on major version
2024-11-21 15:04:10 -07:00
David Murphy
007c9663e6
Merge branch 'develop' into fix_2047 2024-11-21 14:10:39 -07:00
David Murphy
b37f1d8f32
Merge pull request #2039 from dmurphy18/fix_2038
Update bootstrap shell CI/CD to utilize containers and clean up
2024-11-21 14:09:40 -07:00
David Murphy
edaa710bcb
Updated date for bootstrap script 2024-11-21 13:57:55 -07:00
David Murphy
c7705ab73e
Add quiet option for wget, and hand-tested Photon usage 2024-11-21 13:56:18 -07:00
David Murphy
bcffbb3aff
Updated for MacOS 14 and pip 2024-11-21 12:34:43 -07:00
David Murphy
9ef4b48bc5
Added testing for macos-14 2024-11-21 12:19:48 -07:00
David Murphy
27461c79bb
Clean up of most of the debug code and commented out code 2024-11-19 14:13:01 -07:00
David Murphy
a9cddcf5c6
Removed Rocky 9 from testing with git master 2024-11-19 13:55:50 -07:00
David Murphy
035d769e60
more debuging 2024-11-19 13:19:44 -07:00
David Murphy
cc583da80c
More debugging 2024-11-19 12:48:24 -07:00
David Murphy
f6906be830
debugging 2024-11-19 12:18:28 -07:00
David Murphy
95ff9355c5
Updated Redhat family minor salt version commands 2024-11-19 11:28:37 -07:00
Ruslan Tumarkin
8f07647b1e
fix issue 2047
hwclock check missing additional condition on major version
2024-11-19 18:48:40 +01:00
David Murphy
3de9da512b
Updated minor verson handling for RedHat families 2024-11-19 10:33:08 -07:00
David Murphy
12dd54c332
Fixed up script to better allow for Redhat family minor versions of salt 2024-11-18 16:15:26 -07:00
David Murphy
5bd00aca9c
Debugging install for minor version 2024-11-18 15:32:01 -07:00
David Murphy
db5d548d1a
debugging 2024-11-18 14:48:55 -07:00
David Murphy
0c1de07494
Updated date, and makecache for RedHat family 2024-11-18 14:22:26 -07:00
David Murphy
f2b7f56ceb
Minor updates to README, remove support for Redhat 7, Raspbian 8 & 9 2024-11-18 10:17:55 -07:00
David Murphy
e16cda4c14
Updated to use _REPO_URL instead of explicit packages.broadcom.com when accessing 2024-11-15 13:59:12 -07:00
David Murphy
043f8e0b78
Updated container-slug to prefix systemd- for Linux containers 2024-11-15 13:59:12 -07:00
David Murphy
2a72acf0e4
Updated to install sudo, needed for testing 2024-11-15 13:59:11 -07:00
David Murphy
f33f58e6c4
Container does not have sudo 2024-11-15 13:59:11 -07:00
David Murphy
8a5c2d8598
Attempting using systemd container, only Ubuntu 22.04 is currently valid 2024-11-15 13:59:10 -07:00
David Murphy
623b50e826
Revert to using containers, cleaned up MacOS workflow 2024-11-15 13:59:10 -07:00
David Murphy
90c19c02f7
Fix typo 2024-11-15 13:59:10 -07:00
David Murphy
447e01db26
Allow for specifying minor version of Salt 2024-11-15 13:59:09 -07:00
David Murphy
d0d9fa7ed1
Allow for minor version on MacOS and Debian family 2024-11-15 13:59:09 -07:00
David Murphy
0bbe715ad8
Fix MacOS grep -E pattern to allow for no '.x' versions 2024-11-15 13:59:08 -07:00
David Murphy
5a704ec503
adjusting for command line arguments 2024-11-15 13:59:08 -07:00
David Murphy
ce84347128
Fixed typo 2024-11-15 13:59:08 -07:00
David Murphy
f52fea9e1d
Added debugging and setting test version as github environment variable 2024-11-15 13:59:07 -07:00
David Murphy
736e8c0bc3
Linux using Ubuntu runner till systemd support on containers 2024-11-15 13:59:07 -07:00
David Murphy
a50227f2fe
Running script as sudo 2024-11-15 13:59:06 -07:00
David Murphy
dbfd3b0f19
Updated testing 2024-11-15 13:59:06 -07:00
David Murphy
22c7173a22
Fixing test 2024-11-15 13:59:06 -07:00
David Murphy
ba77751f99
Adjusted test 2024-11-15 13:59:05 -07:00
David Murphy
c1e7783a84
trying sudo 2024-11-15 13:59:05 -07:00
David Murphy
f2a5fc19a4
Update testing 2024-11-15 13:59:04 -07:00
David Murphy
1f885ee091
Debug tests output 2024-11-15 13:59:04 -07:00
David Murphy
55f219224c
Fixed using ' in conditional github actions 2024-11-15 13:59:04 -07:00
David Murphy
03fd45ba97
Fix typo 2024-11-15 13:59:03 -07:00
David Murphy
1fa8125a51
Playing with conditionals 2024-11-15 13:59:03 -07:00
David Murphy
90fc657e71
more debug 2024-11-15 13:59:02 -07:00
David Murphy
03d451820d
More debugging parm usage 2024-11-15 13:59:02 -07:00
David Murphy
5776297744
Debugging pip conditional 2024-11-15 13:59:02 -07:00
David Murphy
ef3d82c1a8
Adding conditionals for needing break-system-packages on Linux wiht pip 2024-11-15 13:59:01 -07:00
David Murphy
0c255cfb80
Testing 2024-11-15 13:59:01 -07:00
David Murphy
e1e8f208a0
Added '--break-system-packages' for pip install 2024-11-15 13:59:00 -07:00
David Murphy
5d0e68b3ee
Updated Python dependencies 2024-11-15 13:59:00 -07:00
David Murphy
a902af3c53
Added container-slug to MacOS and Windows workflows (unused on those platforms) 2024-11-15 13:59:00 -07:00
David Murphy
906d38d941
Added container_slug 2024-11-15 13:58:59 -07:00
David Murphy
c7e11a7637
Using Salt CI containers, removed OSs not supported by them 2024-11-15 13:58:59 -07:00
David Murphy
9dc22a8178
fixed yaml 2024-11-15 13:58:58 -07:00
David Murphy
78b4b24b42
More linux debugging 2024-11-15 13:58:58 -07:00
David Murphy
62040848a8
Debugging linux tests 2024-11-15 13:58:58 -07:00
David Murphy
a8b1804f18
[WIP] initial testing for CI/CD clean up 2024-11-15 13:58:57 -07:00
David Murphy
8782a3b79a
Merge pull request #2045 from twangboy/update_bootstrap
Make universal repo url
2024-11-15 13:55:58 -07:00
twangboy
e6e5cd64e9
Make universal repo url 2024-11-15 10:43:48 -07:00
Salt Project Packaging
b2545a20a7 Update README.rst with 2024.11.07 release sha256sum 2024-11-07 21:42:26 +00:00
Salt Project Packaging
bf7943e78c Update develop branch for the v2024.11.07 release 2024-11-07 21:41:35 +00:00
David Murphy
b01acd2fa4
Merge pull request #2037 from dmurphy18/fix_release_3
Fixing git tag signing issue
2024-11-07 14:40:20 -07:00
David Murphy
cda77be3a3
Fixing git tag signing issue 2024-11-07 14:38:49 -07:00
Salt Project Packaging
549a47f94b Update develop branch for the v2024.11.07 release 2024-11-07 21:35:23 +00:00
David Murphy
b13e9279d6
Merge pull request #2036 from dmurphy18/fix_release_2
Forcing git tag to not sign
2024-11-07 14:33:57 -07:00
David Murphy
ced8291c04
Forcing git tag to not sign 2024-11-07 14:32:08 -07:00
Salt Project Packaging
2fe253a9c0 Update develop branch for the v2024.11.07 release 2024-11-07 21:21:20 +00:00
Shane Lee
24a275494a
Merge pull request #2035 from dmurphy18/fix_release
Changed release runners and shell script date
2024-11-07 14:19:34 -07:00
David Murphy
ee72db1f2a
Changed release runners and sheel script date 2024-11-07 14:13:39 -07:00
Matthew Richardson
699ade0c04
Use treeless clone to do a 'shallow' clone preserving metadata for version.py 2024-10-17 21:03:41 +01:00
16 changed files with 1581 additions and 1116 deletions

View file

@ -114,21 +114,6 @@ jobs:
macos-12:
name: macOS 12
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-macos.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: macos-12
display-name: macOS 12
timeout: 20
runs-on: macos-12
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
macos-13:
name: macOS 13
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
@ -139,11 +124,28 @@ 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"]'
macos-14:
name: macOS 14
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-macos.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: macos-14
display-name: macOS 14
container-slug: macOS 14
timeout: 20
runs-on: macos-14
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
windows-2022:
name: Windows 2022
@ -155,68 +157,28 @@ 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"]'
almalinux-8:
name: AlmaLinux 8
amazonlinux-2023:
name: Amazon 2023
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: almalinux-8
display-name: AlmaLinux 8
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"]'
almalinux-9:
name: AlmaLinux 9
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: almalinux-9
display-name: AlmaLinux 9
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
amazon-2:
name: Amazon 2
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: amazon-2
display-name: Amazon 2
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
centos-stream9:
name: CentOS Stream 9
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: centos-stream9
display-name: CentOS Stream 9
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
debian-11:
name: Debian 11
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
@ -227,8 +189,9 @@ 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"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
debian-12:
@ -241,92 +204,9 @@ 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"]'
fedora-39:
name: Fedora 39
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: fedora-39
display-name: Fedora 39
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]'
fedora-40:
name: Fedora 40
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: fedora-40
display-name: Fedora 40
timeout: 20
instances: '["stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
opensuse-15:
name: Opensuse 15
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: opensuse-15
display-name: Opensuse 15
timeout: 20
instances: '["latest", "default"]'
oraclelinux-8:
name: Oracle Linux 8
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: oraclelinux-8
display-name: Oracle Linux 8
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
oraclelinux-9:
name: Oracle Linux 9
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: oraclelinux-9
display-name: Oracle Linux 9
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
photon-4:
name: Photon OS 4
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: photon-4
display-name: Photon OS 4
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]'
instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
photon-5:
@ -339,8 +219,9 @@ 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"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
rockylinux-8:
@ -353,6 +234,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"]'
@ -367,22 +249,9 @@ 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-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-2004
display-name: Ubuntu 20.04
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
ubuntu-2204:
@ -395,22 +264,9 @@ jobs:
with:
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-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-2404
display-name: Ubuntu 24.04
timeout: 20
instances: '["stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
set-pipeline-exit-status:
@ -421,27 +277,16 @@ jobs:
needs:
- lint
- generate-actions-workflow
- macos-12
- macos-13
- macos-14
- windows-2022
- almalinux-8
- almalinux-9
- amazon-2
- centos-stream9
- amazonlinux-2023
- debian-11
- debian-12
- fedora-39
- fedora-40
- opensuse-15
- oraclelinux-8
- oraclelinux-9
- photon-4
- photon-5
- rockylinux-8
- rockylinux-9
- ubuntu-2004
- ubuntu-2204
- ubuntu-2404
if: always()
steps:

View file

@ -41,61 +41,3 @@ jobs:
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
fi
update-s3-bucket:
name: Update S3 Bucket
if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }}
runs-on:
- self-hosted
- linux
- repo-release
needs:
- workflow-requirements
environment: release
steps:
- uses: actions/checkout@v4
- name: Get Salt Project GitHub Actions Bot Environment
run: |
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
- name: Setup GnuPG
run: |
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
GNUPGHOME="$(mktemp -d -p /run/gpg)"
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
cat <<EOF > "${GNUPGHOME}/gpg.conf"
batch
no-tty
pinentry-mode loopback
EOF
- name: Get Secrets
id: get-secrets
env:
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
run: |
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
--query SecretString --output text | jq .default_key -r | base64 -d \
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
| gpg --import -
sync
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
sync
rm "$SECRETS_KEY_FILE"
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
- name: Install Requirements
run: |
python3 -m pip install -r requirements/release.txt
- name: Upload Develop to S3
run: |
tools release s3-publish --key-id 64CBBC8173D76B3F develop

View file

@ -51,10 +51,7 @@ jobs:
update-develop:
name: Update CHANGELOG.md and bootstrap-salt.sh
runs-on:
- self-hosted
- linux
- repo-release
runs-on: ubuntu-latest
permissions:
contents: write # To be able to publish the release
environment: release
@ -74,36 +71,6 @@ jobs:
python3 -m pip install -r requirements/release.txt
pre-commit install --install-hooks
## - name: Setup GnuPG
## run: |
## sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
## GNUPGHOME="$(mktemp -d -p /run/gpg)"
## echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
## cat <<EOF > "${GNUPGHOME}/gpg.conf"
## batch
## no-tty
## pinentry-mode loopback
## EOF
## - name: Get Secrets
## id: get-secrets
## env:
## SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
## run: |
## SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
## echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text | jq .default_key -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
## | gpg --import -
## sync
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text| jq .default_passphrase -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
## sync
## rm "$SECRETS_KEY_FILE"
## echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
- name: Configure Git
shell: bash
run: |
@ -111,8 +78,6 @@ jobs:
git config --global user.name "Salt Project Packaging"
git config --global user.email saltproject-packaging@vmware.com
git config --global commit.gpgsign false
## git config --global user.signingkey 64CBBC8173D76B3F
## git config --global commit.gpgsign true
- name: Update Repository
id: update-repo
@ -150,10 +115,7 @@ jobs:
merge-develop-into-stable:
name: Merge develop into stable
runs-on:
- self-hosted
- linux
- repo-release
runs-on: ubuntu-latest
needs:
- update-develop
environment: release
@ -167,36 +129,6 @@ jobs:
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
fetch-depth: 0
## - name: Setup GnuPG
## run: |
## sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
## GNUPGHOME="$(mktemp -d -p /run/gpg)"
## echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
## cat <<EOF > "${GNUPGHOME}/gpg.conf"
## batch
## no-tty
## pinentry-mode loopback
## EOF
## - name: Get Secrets
## id: get-secrets
## env:
## SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
## run: |
## SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
## echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text | jq .default_key -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
## | gpg --import -
## sync
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text| jq .default_passphrase -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
## sync
## rm "$SECRETS_KEY_FILE"
## echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
- name: Configure Git
shell: bash
run: |
@ -204,8 +136,6 @@ jobs:
git config --global user.name "Salt Project Packaging"
git config --global user.email saltproject-packaging@vmware.com
git config --global commit.gpgsign false
## git config --global user.signingkey 64CBBC8173D76B3F
## git config --global commit.gpgsign true
- name: Download Release Details
uses: actions/download-artifact@v4
@ -229,7 +159,7 @@ jobs:
- name: Tag The ${{ needs.update-develop.outputs.release-version }} Release
run: |
git tag -m "Release ${{ needs.update-develop.outputs.release-version }}" -as ${{ needs.update-develop.outputs.release-version }}
git tag --no-sign -m "Release ${{ needs.update-develop.outputs.release-version }}" -a ${{ needs.update-develop.outputs.release-version }}
- name: Update bootstrap-salt.sh sha256sum's
run: |
@ -248,9 +178,7 @@ jobs:
publish-release:
name: Create GitHub Release
runs-on:
- self-hosted
- linux
runs-on: ubuntu-latest
needs:
- merge-develop-into-stable
environment: release
@ -296,73 +224,9 @@ jobs:
name: release-details
failOnError: false
update-s3-bucket:
name: Update S3 Bucket
runs-on:
- self-hosted
- linux
- repo-release
needs:
- publish-release
environment: release
steps:
- uses: actions/checkout@v4
with:
ref: stable
repository: ${{ github.repository }}
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
- name: Get Salt Project GitHub Actions Bot Environment
run: |
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
## - name: Setup GnuPG
## run: |
## sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
## GNUPGHOME="$(mktemp -d -p /run/gpg)"
## echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
## cat <<EOF > "${GNUPGHOME}/gpg.conf"
## batch
## no-tty
## pinentry-mode loopback
## EOF
## - name: Get Secrets
## id: get-secrets
## env:
## SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
## run: |
## SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
## echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text | jq .default_key -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
## | gpg --import -
## sync
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text| jq .default_passphrase -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
## sync
## rm "$SECRETS_KEY_FILE"
## echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
## - name: Install Requirements
## run: |
## python3 -m pip install -r requirements/release.txt
## - name: Upload Stable Release to S3
## run: |
## tools release s3-publish --key-id 64CBBC8173D76B3F stable
update-develop-checksums:
name: Update Release Checksums on Develop
runs-on:
- self-hosted
- linux
- repo-release
runs-on: ubuntu-latest
needs:
- publish-release
environment: release
@ -388,36 +252,6 @@ jobs:
repository: ${{ github.repository }}
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
## - name: Setup GnuPG
## run: |
## sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
## GNUPGHOME="$(mktemp -d -p /run/gpg)"
## echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
## cat <<EOF > "${GNUPGHOME}/gpg.conf"
## batch
## no-tty
## pinentry-mode loopback
## EOF
## - name: Get Secrets
## id: get-secrets
## env:
## SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
## run: |
## SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
## echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text | jq .default_key -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
## | gpg --import -
## sync
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
## --query SecretString --output text| jq .default_passphrase -r | base64 -d \
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
## sync
## rm "$SECRETS_KEY_FILE"
## echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
- name: Configure Git
shell: bash
run: |
@ -425,8 +259,6 @@ jobs:
git config --global user.name "Salt Project Packaging"
git config --global user.email saltproject-packaging@vmware.com
git config --global commit.gpgsign false
## git config --global user.signingkey 64CBBC8173D76B3F
## git config --global commit.gpgsign true
- name: Update Latest Release on README
run: |

View file

@ -6,25 +6,20 @@ import pathlib
os.chdir(os.path.abspath(os.path.dirname(__file__)))
# "amazonlinux-2",
# "debian-13",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
LINUX_DISTROS = [
"almalinux-8",
"almalinux-9",
"amazon-2",
"centos-stream9",
"amazonlinux-2023",
"debian-11",
"debian-12",
"fedora-39",
"fedora-40",
"opensuse-15",
"oraclelinux-8",
"oraclelinux-9",
"photon-4",
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]
WINDOWS = [
@ -32,117 +27,106 @@ WINDOWS = [
]
OSX = [
"macos-12",
"macos-13",
"macos-14",
]
# "amazonlinux-2",
# "debian-13",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
STABLE_DISTROS = [
"almalinux-8",
"almalinux-9",
"amazon-2",
"centos-stream9",
"amazonlinux-2023",
"debian-11",
"debian-12",
"fedora-39",
"fedora-40",
"opensuse-15",
"oraclelinux-8",
"oraclelinux-9",
"photon-4",
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]
# "amazonlinux-2",
# "debian-13",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
ONEDIR_DISTROS = [
"almalinux-8",
"almalinux-9",
"amazon-2",
"centos-stream9",
"amazonlinux-2023",
"debian-11",
"debian-12",
"fedora-39",
"fedora-40",
"oraclelinux-8",
"oraclelinux-9",
"photon-4",
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]
# "amazonlinux-2",
# "amazonlinux-2023",
# "photon-4",
# "photon-5",
# "rockylinux-8",
# "ubuntu-2404",
ONEDIR_RC_DISTROS = [
"almalinux-9",
"amazon-2",
"centos-stream9",
"debian-12",
"oraclelinux-9",
"photon-4",
"photon-5",
"rockylinux-9",
"ubuntu-2404",
"ubuntu-2204",
]
BLACKLIST_3006 = [
"debian-12",
"fedora-40",
"opensuse-15",
"ubuntu-2404",
]
# "photon-5",
BLACKLIST_3007 = [
"fedora-39",
"opensuse-15",
"photon-4",
"photon-5",
]
# "ubuntu-2204",
BLACKLIST_GIT_3006 = [
"almalinux-9",
"amazon-2",
"centos-stream9",
"amazonlinux-2",
"amazonlinux-2023",
"debian-11",
"debian-12",
"debian-13",
"fedora-40",
"opensuse-15",
"oraclelinux-9",
"photon-4",
"photon-5",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]
# "debian-12",
# "ubuntu-2204",
BLACKLIST_GIT_3007 = [
"almalinux-9",
"amazon-2",
"centos-stream9",
"amazonlinux-2",
"amazonlinux-2023",
"debian-11",
"debian-12",
"fedora-39",
"debian-13",
"fedora-40",
"opensuse-15",
"oraclelinux-9",
"photon-4",
"photon-5",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
"ubuntu-2404",
]
# "debian-12",
BLACKLIST_GIT_MASTER = [
"amazon-2",
"fedora-39",
"amazonlinux-2",
"amazonlinux-2023",
"debian-11",
"debian-13",
"fedora-40",
"photon-4",
"photon-5",
"rockylinux-9",
]
SALT_VERSIONS = [
@ -199,27 +183,18 @@ GIT_VERSION_BLACKLIST = [
# Use build and pip and other standards-based tools.
#
GIT_DISTRO_BLACKLIST = [
"almalinux-8",
"fedora-39",
"opensuse-15",
"oraclelinux-8",
"rockylinux-8",
]
LATEST_PKG_BLACKLIST = []
DISTRO_DISPLAY_NAMES = {
"almalinux-8": "AlmaLinux 8",
"almalinux-9": "AlmaLinux 9",
"amazon-2": "Amazon 2",
"centos-stream9": "CentOS Stream 9",
"amazonlinux-2": "Amazon 2",
"amazonlinux-2023": "Amazon 2023",
"debian-11": "Debian 11",
"debian-12": "Debian 12",
"fedora-39": "Fedora 39",
"debian-13": "Debian 13",
"fedora-40": "Fedora 40",
"opensuse-15": "Opensuse 15",
"oraclelinux-8": "Oracle Linux 8",
"oraclelinux-9": "Oracle Linux 9",
"photon-4": "Photon OS 4",
"photon-5": "Photon OS 5",
"rockylinux-8": "Rocky Linux 8",
@ -227,11 +202,30 @@ DISTRO_DISPLAY_NAMES = {
"ubuntu-2004": "Ubuntu 20.04",
"ubuntu-2204": "Ubuntu 22.04",
"ubuntu-2404": "Ubuntu 24.04",
"macos-12": "macOS 12",
"macos-13": "macOS 13",
"macos-14": "macOS 14",
"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-13": "macos-13",
"macos-14": "macOS 14",
"windows-2022": "windows-2022",
}
TIMEOUT_DEFAULT = 20
TIMEOUT_OVERRIDES = {}
VERSION_ONLY_OVERRIDES = []
@ -246,6 +240,7 @@ TEMPLATE = """
with:
distro-slug: {distro}
display-name: {display_name}
container-slug: {container_name}
timeout: {timeout_minutes}{runs_on}
instances: '{instances}'
"""
@ -296,6 +291,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,
)
@ -341,6 +337,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,
)
@ -440,6 +437,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,
)

View file

@ -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
@ -26,11 +31,7 @@ on:
jobs:
Test:
name: ${{ matrix.instance }}
## runs-on: ubuntu-20.04
runs-on: ubuntu-latest
container:
image: ghcr.io/saltstack/salt-ci-containers/packaging:ubuntu-22.04
timeout-minutes: ${{ inputs.timeout }}
strategy:
max-parallel: 2
@ -41,18 +42,48 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Pytest
- name: Get Version
run: |
pip install -U pytest
# We need to get the version here and make it an environment variable
# It is used to install via bootstrap and in the test
# The version is in the instance name
# sed 1st - becomes space, 2nd - becomes dot
vt_parm_ver=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
## TBD Disabled until CI/CD is functional
## - name: Bootstrap Salt
## run: |
## sh -x ./bootstrap-salt.sh
- name: "Pull container ${{ inputs.container-slug }}"
run: |
docker pull ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }}
## - name: Test Bootstrap
## run: |
## pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
- name: "Create container ${{ inputs.container-slug }}"
run: |
/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
- name: "Start container ${{ inputs.container-slug }}"
run: |
/usr/bin/docker start ${{ github.run_id }}_salt-test
- name: "Install Python Dependencies with pip breakage in container ${{ inputs.container-slug }}"
if: ${{ ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) }}
run: |
docker exec ${{ github.run_id}}_salt-test python3 -m pip install --break-system-packages -r /_w/btstrap/tests/requirements.txt
- name: "Install Python Dependencies without pip breakage in container ${{ inputs.container-slug }}"
if: ${{ ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) }}
run: |
docker exec ${{ github.run_id}}_salt-test python3 -m pip install -r /_w/btstrap/tests/requirements.txt
- name: Bootstrap Salt
run: |
# sed 1st - becomes space, 2nd - becomes dot
bt_arg1=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $1}')
bt_arg2=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
echo "bt parms ,$bt_parms, bt_arg1 ,$bt_arg1, bt_arg2 ,$bt_arg2,"
docker exec ${{ github.run_id}}_salt-test sh -x /_w/btstrap/bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
- name: Test Bootstrap
run: |
docker exec ${{ github.run_id}}_salt-test pytest --cache-clear -v -s -ra --log-cli-level=debug /_w/btstrap/tests/integration/
- name: Set Exit Status
if: always()

View file

@ -22,6 +22,11 @@ on:
required: true
description: The Instances To Test
container-slug:
type: string
required: true
description: The Container Slug
timeout:
type: number
required: false
@ -31,8 +36,8 @@ on:
jobs:
Test:
name: ${{ matrix.instance }}
## runs-on: ${{ inputs.runs-on }}
runs-on: macos-13
runs-on: ${{ inputs.runs-on }}
## runs-on: macos-13
timeout-minutes: ${{ inputs.timeout }}
strategy:
fail-fast: false
@ -42,18 +47,37 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Pytest
- name: Install Python Dependencies with pip breakage
if: ${{ inputs.distro-slug != 'macos-13' }}
run: |
pip install -U pytest
python3 -m pip install --break-system-packages -r tests/requirements.txt
- name: Install Python Dependencies without pip breakage
if: ${{ inputs.distro-slug == 'macos-13' }}
run: |
python3 -m pip install -r tests/requirements.txt
- name: Get Version
run: |
# We need to get the version here and make it an environment variable
# It is used to install via bootstrap and in the test
# The version is in the instance name
# sed 1st - becomes space, 2nd - becomes dot
vt_parms=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./')
vt_parm_ver=$(echo "$vt_parms" | awk -F ' ' '{print $2}')
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
- name: Bootstrap Salt
run: |
sudo sh -x ./bootstrap-salt.sh
# sed 1st - becomes space, 2nd - becomes dot
bt_parms=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./')
bt_arg1=$(echo "$bt_parms" | awk -F ' ' '{print $1}')
bt_arg2=$(echo "$bt_parms" | awk -F ' ' '{print $2}')
sudo sh ./bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
## TBD Disabled until CI/CD is functional
## - name: Test Bootstrap
## run: |
## pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
- name: Test Bootstrap
run: |
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
- name: Set Exit Status
if: always()

View file

@ -22,6 +22,11 @@ on:
required: true
description: The Instances To Test
container-slug:
type: string
required: true
description: The Container Slug
timeout:
type: number
required: false
@ -46,9 +51,9 @@ jobs:
with:
python-version: "3.10"
- name: Install Pytest
- name: Install Python Dependencies
run: |
pip install -r tests\requirements.txt
python3 -m pip install -r tests/requirements.txt
- name: Get Version
run: |

View file

@ -30,7 +30,7 @@ repos:
- actionlint
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
rev: 7.4.1
hooks:
- id: pip-compile
files: ^requirements/release\.(in|txt)$
@ -41,8 +41,10 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.9+
args: [--py39-plus]
name: Rewrite Code to be Py3.6+
args: [--py36-plus]
## DGM name: Rewrite Code to be Py3.9+
## DGM args: [--py39-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0

View file

@ -1,3 +1,117 @@
# v2025.02.24
## What's Changed
- Update requirements to address security issues by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2073
- Use treeless clone to 'shallow' clone again. by @mrichar1 in https://github.com/saltstack/salt-bootstrap/pull/2022
- Fix powershell instructions by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2074
- Remove support for macos-12, as deprecated by github by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2076
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.12.12...v2025.02.24
# v2024.12.12
## What's Changed
- 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
- 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
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.12.09...v2024.12.12
# v2024.12.09
## What's Changed
- Fix quickstart for Windows with new repo by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2065
- Utilize salt-project packages with SUSE by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2066
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.29...v2024.12.09
# v2024.11.29
## What's Changed
- Updated date to overcome issue with existing tag for 2024.11.27 by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2058
- Fix date tag by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2059
- Revert forcing git tag, other issues with check sums calculated, easiest solution is wait a day to release by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2060
- Updated date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2061
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.27...v2024.11.29
# v2024.11.27
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.27...v2024.11.27
# v2024.11.27
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.27...v2024.11.27
# v2024.11.27
## What's Changed
- Testing git install methods by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2057
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.26...v2024.11.27
# v2024.11.27
## What's Changed
- Testing git install methods by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2057
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.26...v2024.11.27
# v2024.11.26
## What's Changed
- Updated URLs in README, and fix deps download issue on RedHat family by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2052
- Update README script help output and scriptversions by @ScriptAutomate in https://github.com/saltstack/salt-bootstrap/pull/2056
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.21...v2024.11.26
# v2024.11.21
## What's Changed
- Make universal repo url by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2045
- Update bootstrap shell CI/CD to utilize containers and clean up by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2039
- \[WIP\] hwclock check missing additional condition on major version by @ruslantum in https://github.com/saltstack/salt-bootstrap/pull/2048
## New Contributors
- @ruslantum made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/2048
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.07...v2024.11.21
# v2024.11.07
## What's Changed
- Changed release runners and shell script date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2035
- Forcing git tag to not sign by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2036
- Fixing git tag signing issue by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2037
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.06...v2024.11.07
# v2024.11.07
## What's Changed
- Changed release runners and shell script date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2035
- Forcing git tag to not sign by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2036
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.06...v2024.11.07
# v2024.11.07
## What's Changed
- Changed release runners and shell script date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2035
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.06...v2024.11.07
# v2024.09.24
## What's Changed

View file

@ -37,6 +37,14 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
- 2025.02.24: ``a0e3a58fc6358a7c6f708ee4910229e72fbdab7161819514b0696146a2edb62d``
- 2024.12.12: ``7cc91adfa5a15ff57d203dc2b79608c773efc639d4e9bf03861198903e11becd``
- 2024.12.09: ``44f9405a6d9622ad8fa7c93e83a52e01ca328f27e4e9dea4a52268c6a22dbe6d``
- 2024.11.29: ``0ac87384dee051aceded69704485a5de0e4a308551a462b10c262111b57acff0``
- 2024.11.27: ``e972bd1ef01d09cd1d9294374ef974c9e3dd9a2aee37cf3859144585fd8bf1d0``
- 2024.11.26: ``832c7a20b96e1df171d715323df9afff8a11aef42d15598c007f240bc89d723c``
- 2024.11.21: ``ddf624c3a94d721da3f7629402a6c7ecc9dd96d13c1ead2a626314e97cee982a``
- 2024.11.07: ``70a9783649e129985563d1a86cf28b8984499643e62ae1dc47dc008bd204fcbb``
- 2024.09.24: ``88e4e4cad4b115a7b721dd9c21d5ee5df390b5b73b63de48f99399146f43f371``
- 2024.07.23: ``7212b6b497b5c3d2bf15bfe5301625ec7bc1bf3e2949cd47d8e2073614935bf8``
- 2024.07.18: ``92a74e7ff8a9032a7713c2b3955991d66aaca08a4eb9494ce3dd66b5044f6bc3``
@ -57,8 +65,9 @@ If you're looking for a *one-liner* to install Salt, please scroll to the bottom
instructions for `Installing via an Insecure One-Liner`_.
There are also .sha256 files for verifying against in the repo for the stable branch. You can also
get the correct sha256 sum for the stable release from https://bootstrap.saltproject.io/sha256 and
https://winbootstrap.saltproject.io/sha256
get the correct sha256 sum for the stable release from
https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh.sha256 and
https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.ps1.sha256
Contributing
------------
@ -81,112 +90,123 @@ To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` a
Usage : bootstrap-salt.sh [options] <install-type> [install-type-args]
Installation types:
- stable Install latest stable release. This is the default
install type
- stable [branch] Install latest version on a branch. Only supported
for packages available at repo.saltproject.io
- stable [version] Install a specific version. Only supported for
packages available at repo.saltproject.io
To pin a 3xxx minor version, specify it as 3xxx.0
- testing RHEL-family specific: configure EPEL testing repo
- git Install from the head of the master branch
- git [ref] Install from any git ref (such as a branch, tag, or
commit)
- stable Install latest stable release. This is the default
install type
- stable [branch] Install latest version on a branch. Only supported
for packages available at packages.broadcom.com
- stable [version] Install a specific version. Only supported for
packages available at packages.broadcom.com
To pin a 3xxx minor version, specify it as 3xxx.0
- testing RHEL-family specific: configure EPEL testing repo
- git Install from the head of the master branch
- git [ref] Install from any git ref (such as a branch, tag, or
commit)
- onedir Install latest onedir release.
- onedir [version] Install a specific version. Only supported for
onedir packages available at packages.broadcom.com
- onedir_rc Install latest onedir RC release.
- onedir_rc [version] Install a specific version. Only supported for
onedir RC packages available at packages.broadcom.com
Examples:
- bootstrap-salt.sh
- bootstrap-salt.sh stable
- bootstrap-salt.sh stable 3006.7
- bootstrap-salt.sh stable v3006.8
- bootstrap-salt.sh stable 3006
- bootstrap-salt.sh stable 3006.1
- bootstrap-salt.sh testing
- bootstrap-salt.sh git
- bootstrap-salt.sh git 3006.7
- bootstrap-salt.sh git v3006.8
- bootstrap-salt.sh git 3007.1
- bootstrap-salt.sh git v3007.1
- bootstrap-salt.sh git 06f249901a2e2f1ed310d58ea3921a129f214358
- bootstrap-salt.sh onedir
- bootstrap-salt.sh onedir 3006
- bootstrap-salt.sh onedir_rc
- bootstrap-salt.sh onedir_rc 3008
Options:
-h Display this message
-v Display script version
-n No colours
-D Show debug output
-a Pip install all Python pkg dependencies for Salt. Requires -V to install
all pip pkgs into the virtualenv.
(Only available for Ubuntu based distributions)
-A Pass the salt-master DNS name or IP. This will be stored under
\${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf
-b Assume that dependencies are already installed and software sources are
set up. If git is selected, git tree is still checked out as dependency
step.
-c Temporary configuration directory
-g Salt Git repository URL. Default: https://github.com/saltstack/salt.git
-w Install packages from downstream package repository rather than
upstream, saltstack package repository. This is currently only
implemented for SUSE.
-k Temporary directory holding the minion keys which will pre-seed
the master.
-s Sleep time used when waiting for daemons to start, restart and when
checking for the services running. Default: 3
-L Also install salt-cloud and required python-libcloud package
-M Also install salt-master
-S Also install salt-syndic
-W Also install salt-api
-N Do not install salt-minion
-X Do not start daemons after installation
-C Only run the configuration function. Implies -F (forced overwrite).
To overwrite Master, Syndic or Api configs, -M,-S or -W, respectively, must
also be specified. Salt installation will be ommitted, but some of the
dependencies could be installed to write configuration with -j or -J.
-d Disables checking if Salt services are enabled to start on system boot.
You can also do this by touching /tmp/disable_salt_checks on the target
host. Default: ${BS_FALSE}
-P Allow pip based installations. On some distributions the required salt
packages or its dependencies are not available as a package for that
distribution. Using this flag allows the script to use pip as a last
resort method. NOTE: This only works for functions which actually
implement pip based installations.
-U If set, fully upgrade the system prior to bootstrapping Salt
host. Default: \${BS_FALSE}
-D Show debug output
-f Force shallow cloning for git installations.
This may result in an "n/a" in the version number.
-F Allow copied files to overwrite existing (config, init.d, etc)
-g Salt Git repository URL. Default: https://github.com/saltstack/salt.git
-h Display this message
-H Use the specified HTTP proxy for all download URLs (including https://).
For example: http://myproxy.example.com:3128
-i Pass the salt-minion id. This will be stored under
\${BS_SALT_ETC_DIR}/minion_id
-I If set, allow insecure connections while downloading any files. For
example, pass '--no-check-certificate' to 'wget' or '--insecure' to
'curl'. On Debian and Ubuntu, using this option with -U allows obtaining
GnuPG archive keys insecurely if distro has changed release signatures.
-F Allow copied files to overwrite existing (config, init.d, etc)
-K If set, keep the temporary files in the temporary directories specified
with -c and -k
-C Only run the configuration function. Implies -F (forced overwrite).
To overwrite Master or Syndic configs, -M or -S, respectively, must
also be specified. Salt installation will be ommitted, but some of the
dependencies could be installed to write configuration with -j or -J.
-A Pass the salt-master DNS name or IP. This will be stored under
${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf
-i Pass the salt-minion id. This will be stored under
${BS_SALT_ETC_DIR}/minion_id
-p Extra-package to install while installing Salt dependencies. One package
per -p flag. You are responsible for providing the proper package name.
-H Use the specified HTTP proxy for all download URLs (including https://).
For example: http://myproxy.example.com:3128
-b Assume that dependencies are already installed and software sources are
set up. If git is selected, git tree is still checked out as dependency
step.
-f Force shallow cloning for git installations.
This may result in an "n/a" in the version number.
-l Disable ssl checks. When passed, switches "https" calls to "http" where
possible.
-V Install Salt into virtualenv
(only available for Ubuntu based distributions)
-a Pip install all Python pkg dependencies for Salt. Requires -V to install
all pip pkgs into the virtualenv.
(Only available for Ubuntu based distributions)
-r Disable all repository configuration performed by this script. This
option assumes all necessary repository configuration is already present
on the system.
-R Specify a custom repository URL. Assumes the custom repository URL
points to a repository that mirrors Salt packages located at
repo.saltproject.io. The option passed with -R replaces the
"repo.saltproject.io". If -R is passed, -r is also set. Currently only
works on CentOS/RHEL and Debian based distributions.
-J Replace the Master config file with data passed in as a JSON string. If
a Master config file is found, a reasonable effort will be made to save
the file with a ".bak" extension. If used in conjunction with -C or -F,
no ".bak" file will be created as either of those options will force
a complete overwrite of the file.
-j Replace the Minion config file with data passed in as a JSON string. If
a Minion config file is found, a reasonable effort will be made to save
the file with a ".bak" extension. If used in conjunction with -C or -F,
no ".bak" file will be created as either of those options will force
a complete overwrite of the file.
-J Replace the Master config file with data passed in as a JSON string. If
a Master config file is found, a reasonable effort will be made to save
the file with a ".bak" extension. If used in conjunction with -C or -F,
no ".bak" file will be created as either of those options will force
a complete overwrite of the file.
-k Temporary directory holding the minion keys which will pre-seed
the master.
-K If set, keep the temporary files in the temporary directories specified
with -c and -k
-l Disable ssl checks. When passed, switches "https" calls to "http" where
possible.
-L Also install salt-cloud and required python-libcloud package
-M Also install salt-master
-n No colours
-N Do not install salt-minion
-p Extra-package to install while installing Salt dependencies. One package
per -p flag. You are responsible for providing the proper package name.
-P Allow pip based installations. On some distributions the required salt
packages or its dependencies are not available as a package for that
distribution. Using this flag allows the script to use pip as a last
resort method. NOTE: This only works for functions which actually
implement pip based installations.
-q Quiet salt installation from git (setup.py install -q)
-x Changes the Python version used to install Salt (default: Python 3)
Python 2.7 is not longer supported.
-Q Quickstart, install the Salt master and the Salt minion.
And automatically accept the minion key.
-R Specify a custom repository URL. Assumes the custom repository URL
points to a repository that mirrors Salt packages located at
packages.broadcom.com. The option passed with -R replaces the
"packages.broadcom.com". If -R is passed, -r is also set. Currently only
works on CentOS/RHEL and Debian based distributions and macOS.
-s Sleep time used when waiting for daemons to start, restart and when
checking for the services running. Default: 3
-S Also install salt-syndic
-r Disable all repository configuration performed by this script. This
option assumes all necessary repository configuration is already present
on the system.
-U If set, fully upgrade the system prior to bootstrapping Salt
-v Display script version
-V Install Salt into virtualenv
(only available for Ubuntu based distributions)
-W Also install salt-api
-x Changes the Python version used to install Salt (default: Python 3).
Python 2.7 is no longer supported.
-X Do not start daemons after installation
The Salt Bootstrap script has a wide variety of options that can be passed as
well as several ways of obtaining the bootstrap script itself. Note that the use of ``sudo``
@ -206,35 +226,35 @@ If you want to install a package of a specific release version, from the Salt Pr
.. code:: console
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh -P stable 3006.1
If you want to install a specific release version, based on the Git tags:
.. code:: console
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh git v3006.1
Using ``curl`` to install latest development version from GitHub:
.. code:: console
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh git master
To install a specific branch from a Git fork:
.. code:: console
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh -g https://github.com/myuser/salt.git git mybranch
If all you want is to install a ``salt-master`` using latest Git:
.. code:: console
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh -M -N git master
If your host has Internet access only via HTTP proxy, from the Salt Project repo:
@ -242,7 +262,7 @@ If your host has Internet access only via HTTP proxy, from the Salt Project repo
.. code:: console
PROXY='http://user:password@myproxy.example.com:3128'
curl -o bootstrap-salt.sh -L -x "$PROXY" https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L -x "$PROXY" https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh -P -H "$PROXY" stable
If your host has Internet access only via HTTP proxy, installing via Git:
@ -250,7 +270,7 @@ If your host has Internet access only via HTTP proxy, installing via Git:
.. code:: console
PROXY='http://user:password@myproxy.example.com:3128'
curl -o bootstrap-salt.sh -L -x "$PROXY" https://bootstrap.saltproject.io
curl -o bootstrap-salt.sh -L -x "$PROXY" https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh -H "$PROXY" git
@ -261,22 +281,22 @@ Using ``wget`` to install your distribution's stable packages:
.. code:: console
wget -O bootstrap-salt.sh https://bootstrap.saltproject.io
wget -O bootstrap-salt.sh https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh
Installing a specific version from git using ``wget``:
.. code:: console
wget -O bootstrap-salt.sh https://bootstrap.saltproject.io
sudo sh bootstrap-salt.sh git v3004.1
wget -O bootstrap-salt.sh https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh git v3006.8
Installing a specific version package from the Salt Project repo using ``wget``:
.. code:: console
wget -O bootstrap-salt.sh https://bootstrap.saltproject.io
sudo sh bootstrap-salt.sh -P stable 3006.1
wget -O bootstrap-salt.sh https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
sudo sh bootstrap-salt.sh -P stable 3006.8
**NOTE**
@ -291,14 +311,14 @@ If you already have Python installed, ``python 3.10``, then it's as easy as:
.. code:: console
python -m urllib "https://bootstrap.saltproject.io" > bootstrap-salt.sh
python -m urllib "https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh" > bootstrap-salt.sh
sudo sh bootstrap-salt.sh -P stable 3006.1
With python version 3:
.. code:: console
python3 -c 'import urllib.request; print(urllib.request.urlopen("https://bootstrap.saltproject.io").read().decode("ascii"))' > bootstrap-salt.sh
python3 -c 'import urllib.request; print(urllib.request.urlopen("https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh").read().decode("ascii"))' > bootstrap-salt.sh
sudo sh bootstrap-salt.sh git v3006.1
Note: Python 2.x is no longer supported given it reached it's End-Of-Life Jan. 1st, 2020
@ -321,25 +341,25 @@ Installing the latest stable release of Salt (default):
.. code:: console
curl -L https://bootstrap.saltproject.io | sudo sh
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh
Using ``wget`` to install your distribution's stable packages:
.. code:: console
wget -O - https://bootstrap.saltproject.io | sudo sh
wget -O - https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh
Installing a target version package of Salt from the Salt Project repo:
.. code:: console
curl -L https://bootstrap.saltproject.io | sudo sh -s -- stable 3006.8
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- stable 3006.8
Installing the latest master branch of Salt from git:
.. code:: console
curl -L https://bootstrap.saltproject.io | sudo sh -s -- git master
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- git master
Note: use of git is recommended for development environments, for example: testing new features of
Salt which have not yet been released.
@ -354,9 +374,8 @@ Using ``PowerShell`` to install latest stable version:
.. code:: powershell
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
Invoke-WebRequest -Uri https://winbootstrap.saltproject.io -OutFile "$env:TEMP\bootstrap-salt.ps1"
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
& "$env:TEMP\bootstrap-salt.ps1"
Invoke-WebRequest -Uri https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.ps1 -OutFile "$env:TEMP\bootstrap-salt.ps1"
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; & "$env:TEMP\bootstrap-salt.ps1"
Display information about the install script parameters:
@ -368,7 +387,7 @@ Using ``cygwin`` to install latest stable version:
.. code:: console
curl -o bootstrap-salt.ps1 -L https://winbootstrap.saltproject.io
curl -o bootstrap-salt.ps1 -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.ps1
"/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ./bootstrap-salt.ps1"
@ -378,13 +397,13 @@ Supported Operating Systems
The salt-bootstrap script officially supports the distributions outlined in
`Salt's Supported Operating Systems
<https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-supported-operating-systems.html>`_
document, (BSD-based OSs, Solaris and AIX are no longer
supported). The operating systems listed below should reflect this document but may become out of
date. If an operating system is listed below, but is not listed on the official supported operating
document, (BSD-based OSs, Solaris and AIX are no longer supported).
The operating systems listed below should reflect this document but may become out of date.
If an operating system is listed below, but is not listed on the official supported operating
systems document, the level of support is "best-effort".
Since Salt is written in Python, the packages available from the `Salt Project's repository
<https://repo.saltproject.io/salt/py3>`_ are
<packages.broadcom.com>`_ are
CPU architecture independent and could be installed on any hardware supported by Linux kernel.
However, the Salt Project does package Salt's binary dependencies only for ``x86_64`` (``amd64``)
and ``AArch64`` (``arm64``).
@ -413,21 +432,19 @@ Debian and derivatives
- Devuan GNU/Linux 1/2/3/4/5
- Kali Linux 1.0 (based on Debian 7)
- Linux Mint Debian Edition 1 (based on Debian 8)
- Raspbian 8 (``armhf`` packages) and 9 (using ``git`` installation mode only)
Red Hat family
~~~~~~~~~~~~~~
- Amazon Linux 2012.3 and later
- Amazon Linux 2
- Amazon Linux 2023
- CentOS 7/8/9
- CentOS 8/9
- Cloud Linux 6/7
- Fedora 38/39/40 (install latest stable from standard repositories)
- Oracle Linux 7/8/9
- Red Hat Enterprise Linux 7/8/9
- Scientific Linux 7/8/9
- Fedora 40 (install latest stable from standard repositories)
- Oracle Linux 8/9
- Red Hat Enterprise Linux 8/9
- Scientific Linux 8/9
SUSE family
@ -460,8 +477,8 @@ repositories are not provided on the `Salt Project's Ubuntu repository`_ for the
the bootstrap script will attempt to install the packages for the most closely related LTS Ubuntu
release instead.
For example, when installing Salt on Ubuntu 21.10, the bootstrap script will setup the repository
for Ubuntu 20.04 from the `Salt Project's Ubuntu repository`_ and install the 20.04 packages.
For example, when installing Salt on Ubuntu 24.10, the bootstrap script will setup the repository
for Ubuntu 24.04 from the `Salt Project's Ubuntu repository`_ and install the 24.04 packages.
Non-LTS Ubuntu releases are not supported once the release reaches End-of-Life as defined by
`Ubuntu's release schedule`_.

View file

@ -39,7 +39,8 @@
Salt Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-bootstrap
Original Vagrant Provisioner Project - https://github.com/saltstack/salty-vagrant
Vagrant Project (utilizes this script) - https://github.com/mitchellh/vagrant
Salt Download Location - https://repo.saltproject.io/salt/py3/windows
Salt Download Location - https://packages.broadcom.com/artifactory/saltproject-generic/windows/
Salt Manual Install Directions (Windows) - https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/windows.html
#>
#===============================================================================
@ -48,7 +49,6 @@
[CmdletBinding()]
param(
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
[ValidatePattern('^(\d{4}(\.\d{1,2}){0,2}(\-\d{1})?)|(latest)$', Options=1)]
[Alias("v")]
# The version of the Salt minion to install. Default is "latest" which will
# install the latest version of Salt minion available. Doesn't support
@ -108,7 +108,7 @@ if ($help) {
exit 0
}
$__ScriptVersion = "2024.09.24"
$__ScriptVersion = "2025.02.24"
$ScriptName = $myInvocation.MyCommand.Name
# We'll check for the Version next, because it also has no requirements
@ -153,34 +153,116 @@ function Get-MajorVersion {
return ( $Version -split "\." )[0]
}
function Convert-PSObjectToHashtable {
param (
[Parameter(ValueFromPipeline)]
$InputObject
)
if ($null -eq $InputObject) { return $null }
function Get-AvailableVersions {
# Get available versions from a remote location specified in the Source
# Parameter
Write-Verbose "Getting version information from the repo"
Write-Verbose "base_url: $base_url"
$is_enum = $InputObject -is [System.Collections.IEnumerable]
$not_string = $InputObject -isnot [string]
if ($is_enum -and $not_string) {
$collection = @(
foreach ($object in $InputObject) {
Convert-PSObjectToHashtable $object
}
)
$available_versions = [System.Collections.ArrayList]@()
Write-Host -NoEnumerate $collection
} elseif ($InputObject -is [PSObject]) {
$hash = @{}
foreach ($property in $InputObject.PSObject.Properties) {
$hash[$property.Name] = Convert-PSObjectToHashtable $property.Value
if ( $base_url.StartsWith("http") -or $base_url.StartsWith("ftp") ) {
# We're dealing with HTTP, HTTPS, or FTP
$response = Invoke-WebRequest "$base_url" -UseBasicParsing
try {
$response = Invoke-WebRequest "$base_url" -UseBasicParsing
} catch {
Write-Host "Failed to get version information" -ForegroundColor Red
exit 1
}
$hash
if ( $response.StatusCode -ne 200 ) {
Write-Host "There was an error getting version information" -ForegroundColor Red
Write-Host "Error: $($response.StatusCode)" -ForegroundColor red
exit 1
}
$response.links | ForEach-Object {
if ( $_.href.Length -gt 8) {
Write-Host "The content at this location is unexpected" -ForegroundColor Red
Write-Host "Should be a list of directories where the name is a version of Salt" -ForegroundColor Red
exit 1
}
}
# Getting available versions from response
Write-Verbose "Getting available versions from response"
$filtered = $response.Links | Where-Object -Property href -NE "../"
$filtered | Select-Object -Property href | ForEach-Object {
$available_versions.Add($_.href.Trim("/")) | Out-Null
}
} elseif ( $base_url.StartsWith("\\") -or $base_url -match "^[A-Za-z]:\\" ) {
# We're dealing with a local directory or SMB source
Get-ChildItem -Path $base_url -Directory | ForEach-Object {
$available_versions.Add($_.Name) | Out-Null
}
} else {
$InputObject
Write-Host "Unknown Source Type" -ForegroundColor Red
Write-Host "Must be one of HTTP, HTTPS, FTP, SMB Share, Local Directory" -ForegroundColor Red
exit 1
}
Write-Verbose "Available versions:"
$available_versions | ForEach-Object {
Write-Verbose "- $_"
}
# Get the latest version, should be the last in the list
Write-Verbose "Getting latest available version"
$latest = $available_versions | Select-Object -Last 1
Write-Verbose "Latest available version: $latest"
# Create a versions table
# This will have the latest version available, the latest version available
# for each major version, and every version available. This makes the
# version lookup logic easier. The contents of the versions table can be
# found by running -Verbose
Write-Verbose "Populating the versions table"
$versions_table = [ordered]@{"latest"=$latest}
$available_versions | ForEach-Object {
$versions_table[$(Get-MajorVersion $_)] = $_
$versions_table[$_.ToLower()] = $_.ToLower()
}
Write-Verbose "Versions Table:"
$versions_table | Sort-Object Name | Out-String | ForEach-Object {
Write-Verbose "$_"
}
return $versions_table
}
function Get-HashFromArtifactory {
# This function uses the artifactory API to get the SHA265 Hash for the file
# If Source is NOT artifactory, the sha will not be checked
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[String] $SaltVersion,
[Parameter(Mandatory=$true)]
[String] $SaltFileName
)
if ( $api_url ) {
$full_url = "$api_url/$SaltVersion/$SaltFileName"
Write-Verbose "Querying Artifactory API for hash:"
Write-Verbose $full_url
try {
$response = Invoke-RestMethod $full_url -UseBasicParsing
return $response.checksums.sha256
} catch {
Write-Verbose "Artifactory API Not available or file not"
Write-Verbose "available at specified location"
Write-Verbose "Hash will not be checked"
return ""
}
Write-Verbose "No hash found for this file: $SaltFileName"
Write-Verbose "Hash will not be checked"
return ""
}
Write-Verbose "No artifactory API defined"
Write-Verbose "Hash will not be checked"
return ""
}
function Get-FileHash {
@ -313,10 +395,8 @@ if ($majorVersion -lt "3006") {
#===============================================================================
$ConfDir = "$RootDir\conf"
$PkiDir = "$ConfDir\pki\minion"
$RootDir = "$env:ProgramData\Salt Project\Salt"
$DfltUrl = "https://packages.broadcom.com/artifactory/saltproject-generic/windows/"
$ApiUrl = "https://packages.broadcom.com/artifactory/api/storage/saltproject-generic/windows"
$RootDir = "$env:ProgramData\Salt Project\Salt"
# Check for existing installation where RootDir is stored in the registry
$SaltRegKey = "HKLM:\SOFTWARE\Salt Project\Salt"
if (Test-Path -Path $SaltRegKey) {
@ -325,6 +405,18 @@ if (Test-Path -Path $SaltRegKey) {
}
}
# Get repo and api URLs. An artifactory URL will have "artifactory" in it
$domain, $target = $RepoUrl -split "/artifactory/"
if ( $target ) {
# Create $base_url and $api_url
$base_url = "$domain/artifactory/$target"
$api_url = "$domain/artifactory/api/storage/$target"
} else {
# This is a non-artifactory url, there is no api
$base_url = $domain
$api_url = ""
}
#===============================================================================
# Verify Parameters
#===============================================================================
@ -335,8 +427,8 @@ Write-Verbose "version: $Version"
Write-Verbose "runservice: $RunService"
Write-Verbose "master: $Master"
Write-Verbose "minion: $Minion"
Write-Verbose "repourl: $RepoUrl"
Write-Verbose "apiurl: $ApiUrl"
Write-Verbose "repourl: $base_url"
Write-Verbose "apiurl: $api_url"
Write-Verbose "ConfDir: $ConfDir"
Write-Verbose "RootDir: $RootDir"
@ -393,90 +485,34 @@ if ( $ConfigureOnly ) {
#===============================================================================
# Detect architecture
#===============================================================================
if ([IntPtr]::Size -eq 4) {
$arch = "x86"
} else {
$arch = "AMD64"
}
if ([IntPtr]::Size -eq 4) { $arch = "x86" } else { $arch = "AMD64" }
#===============================================================================
# Getting version information from the repo
#===============================================================================
if ( $RepoUrl -eq $DfltUrl ) {
Write-Verbose "Getting version information from Artifactory"
$response = Invoke-WebRequest $ApiUrl -UseBasicParsing
# Convert the output to a powershell object
$psobj = $response.ToString() | ConvertFrom-Json
$versions = Get-AvailableVersions
# Filter the object for folders
$filtered = $psobj.children | Where-Object -Property folder -EQ $true
# Get each uri and add it to the list of versions
$available_versions = [System.Collections.ArrayList]@()
$filtered | Select-Object -Property uri | ForEach-Object {
$available_versions.Add($_.uri.Trim("/")) | Out-Null
}
# Create a versions table, similar to repo.json
# This will have the latest version available, the latest version available for
# each major version, and every version available. This makes the version
# lookup logic easier. You can view the contents of the versions table by
# passing the -Verbose command
$latest = $available_versions | Select-Object -Last 1
$versions_table = [ordered]@{"latest"=$latest}
$available_versions | ForEach-Object {
$versions_table[$(Get-MajorVersion $_)] = $_
$versions_table[$_.ToLower()] = $_.ToLower()
}
Write-Verbose "Available versions:"
$available_versions | ForEach-Object {
Write-Verbose "- $_"
}
Write-Verbose "Versions Table:"
$versions_table | Sort-Object Name | Out-String | Write-Verbose
#===============================================================================
# Validate passed version
#===============================================================================
if ( $versions_table.Contains($Version.ToLower()) ) {
$Version = $versions_table[$Version.ToLower()]
} else {
Write-Host "Version $Version is not available" -ForegroundColor Red
Write-Host "Available versions are:" -ForegroundColor Yellow
$available_versions | ForEach-Object { Write-Host "- $_" -ForegroundColor Yellow }
exit 1
}
#===============================================================================
# Get file url and sha256
#===============================================================================
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
$response = Invoke-WebRequest "$ApiUrl/$Version/$saltFileName" -UseBasicParsing
$psobj = $response.ToString() | ConvertFrom-Json
$saltFileUrl = $psobj.downloadUri
$saltSha256 = $psobj.checksums.sha256
if ( $saltFileName -and $saltVersion -and $saltSha256) {
Write-Verbose "Found Name, Version, and Sha"
} else {
# We will guess the name of the installer
Write-Verbose "Failed to get Name, Version, and Sha from Artifactory API"
Write-Verbose "We'll try to find the file in standard paths"
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
$saltVersion = $Version
}
#===============================================================================
# Validate passed version
#===============================================================================
Write-Verbose "Looking up version: $Version"
if ( $versions.Contains($Version.ToLower()) ) {
$Version = $versions[$Version.ToLower()]
Write-Verbose "Found version: $Version"
} else {
# If we're using a custom RepoUrl, we're going to assum that the binary is
# in the reoot of the RepoUrl/Version. We will not check the sha on custom
# repos
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
$saltFileUrl = "$RepoUrl/$Version/$saltFileName"
$saltVersion = $Version
$saltSha256 = ""
Write-Host "Version $Version is not available" -ForegroundColor Red
Write-Host "Available versions are:" -ForegroundColor Yellow
$versions
exit 1
}
#===============================================================================
# Get file url and sha256
#===============================================================================
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
$saltFileUrl = "$base_url/$Version/$saltFileName"
$saltSha256 = Get-HashFromArtifactory -SaltVersion $Version -SaltFileName $saltFileName
#===============================================================================
# Download minion setup file
#===============================================================================
@ -484,7 +520,7 @@ Write-Host "====================================================================
Write-Host " Bootstrapping Salt Minion" -ForegroundColor Green
Write-Host " - version: $Version"
Write-Host " - file name: $saltFileName"
Write-Host " - file url: $saltFileUrl"
Write-Host " - file url : $saltFileUrl"
Write-Host " - file hash: $saltSha256"
Write-Host " - master: $Master"
Write-Host " - minion id: $Minion"
@ -498,9 +534,11 @@ Write-Verbose ""
Write-Verbose "Salt File URL: $saltFileUrl"
Write-Verbose "Local File: $localFile"
if ( Test-Path -Path $localFile ) {Remove-Item -Path $localFile -Force}
Invoke-WebRequest -Uri $saltFileUrl -OutFile $localFile
# Remove existing local file
if ( Test-Path -Path $localFile ) { Remove-Item -Path $localFile -Force }
# Download the file
Invoke-WebRequest -Uri $saltFileUrl -OutFile $localFile
if ( Test-Path -Path $localFile ) {
Write-Host "Success" -ForegroundColor Green
} else {
@ -508,6 +546,7 @@ if ( Test-Path -Path $localFile ) {
exit 1
}
# Compare the hash if there is a hash to compare
if ( $saltSha256 ) {
$localSha256 = (Get-FileHash -Path $localFile -Algorithm SHA256).Hash
Write-Host "Comparing Hash: " -NoNewline
@ -546,13 +585,13 @@ $process = Start-Process $localFile `
-NoNewWindow -PassThru
# Sometimes the installer hangs... we'll wait 5 minutes and then kill it
Write-Verbose ""
Write-Verbose "Waiting for installer to finish"
$process | Wait-Process -Timeout 300 -ErrorAction SilentlyContinue
$process.Refresh()
if ( !$process.HasExited ) {
Write-Host "Installer Timeout" -ForegroundColor Yellow
Write-Verbose "Installer Timeout"
Write-Host ""
Write-Host "Killing hung installer: " -NoNewline
$process | Stop-Process
$process.Refresh()

File diff suppressed because it is too large Load diff

View file

@ -4,27 +4,31 @@
#
# pip-compile requirements/release.in
#
attrs==23.1.0
annotated-types==0.7.0
# via pydantic
attrs==24.3.0
# via python-tools-scripts
boto3==1.28.79
boto3==1.35.98
# via -r requirements/release.in
botocore==1.31.79
botocore==1.35.98
# via
# boto3
# s3transfer
certifi==2023.7.22
certifi==2024.12.14
# via requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
charset-normalizer==3.4.1
# via requests
distlib==0.3.7
distlib==0.3.9
# via virtualenv
filelock==3.13.1
# via virtualenv
identify==2.5.31
filelock==3.16.1
# via
# python-tools-scripts
# virtualenv
identify==2.6.5
# via pre-commit
idna==3.4
idna==3.10
# via requests
jmespath==1.0.1
# via
@ -34,36 +38,41 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
nodeenv==1.8.0
nodeenv==1.9.1
# via pre-commit
platformdirs==3.11.0
platformdirs==4.3.6
# via virtualenv
pre-commit==3.5.0
pre-commit==4.0.1
# via -r requirements/release.in
pygments==2.16.1
pydantic==2.10.5
# via python-tools-scripts
pydantic-core==2.27.2
# via pydantic
pygments==2.19.1
# via rich
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via botocore
python-tools-scripts==0.18.6
python-tools-scripts==0.20.5
# via -r requirements/release.in
pyyaml==6.0.1
pyyaml==6.0.2
# via pre-commit
requests==2.31.0
requests==2.32.3
# via python-tools-scripts
rich==13.6.0
rich==13.9.4
# via python-tools-scripts
s3transfer==0.7.0
s3transfer==0.10.4
# via boto3
six==1.16.0
six==1.17.0
# via python-dateutil
typing-extensions==4.8.0
# via python-tools-scripts
urllib3==2.0.7
typing-extensions==4.12.2
# via
# pydantic
# pydantic-core
# python-tools-scripts
# rich
urllib3==2.3.0
# via
# botocore
# requests
virtualenv==20.24.6
virtualenv==20.28.1
# via pre-commit
# The following packages are considered to be unsafe in a requirements file:
# setuptools

View file

@ -1,39 +1,31 @@
function Convert-PSObjectToHashtable {
param (
[Parameter(ValueFromPipeline)]
$InputObject
)
if ($null -eq $InputObject) { return $null }
<#
.SYNOPSIS
A simple Powershell script to quickly start using Salt.
$is_enum = $InputObject -is [System.Collections.IEnumerable]
$not_string = $InputObject -isnot [string]
if ($is_enum -and $not_string) {
$collection = @(
foreach ($object in $InputObject) {
Convert-PSObjectToHashtable $object
}
)
.DESCRIPTION
This script will download the latest onedir version of Salt and extract it
into the same directory where the script is run. The script sets up an
environment that will allow you to run salt-call commands. To remove, just
delete the `salt` directory. The environment variables will only be set for
the current powershell session.
Write-Host -NoEnumerate $collection
} elseif ($InputObject -is [PSObject]) {
$hash = @{}
.EXAMPLE
./salt-quick-start.ps1
foreach ($property in $InputObject.PSObject.Properties) {
$hash[$property.Name] = Convert-PSObjectToHashtable $property.Value
}
.LINK
Salt Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-bootstrap
Original Vagrant Provisioner Project - https://github.com/saltstack/salty-vagrant
Vagrant Project (utilizes this script) - https://github.com/mitchellh/vagrant
Salt Download Location - https://packages.broadcom.com/artifactory/saltproject-generic/windows/
Salt Manual Install Directions (Windows) - https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/windows.html
#>
$hash
} else {
$InputObject
}
}
# This is so the -Verbose parameter will work
[CmdletBinding()] param()
function Expand-ZipFile {
# Extract a zip file
#
# Used by:
# - Install-SaltMinion
#
# Args:
# ZipFile (string): The file to extract
# Destination (string): The location to extract to
@ -81,60 +73,151 @@ function Expand-ZipFile {
Write-Debug "Finished unzipping '$ZipFile' to '$Destination'"
}
function Get-FileHash {
# Get-FileHash is a built-in cmdlet in powershell 5+ but we need to support
# powershell 3. This will overwrite the powershell 5 commandlet only for
# this script. But it will provide the missing cmdlet for powershell 3
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[String] $Path,
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
[Parameter(Mandatory=$false)]
[ValidateSet(
"SHA1",
"SHA256",
"SHA384",
"SHA512",
# https://serverfault.com/questions/820300/
# why-isnt-mactripledes-algorithm-output-in-powershell-stable
"MACTripleDES", # don't use
"MD5",
"RIPEMD160",
IgnoreCase=$true)]
[String] $Algorithm = "SHA256"
)
$global:ProgressPreference = 'SilentlyContinue'
$RepoUrl = "https://repo.saltproject.io/salt/py3/onedir"
if ([IntPtr]::Size -eq 4) {
$arch = "x86"
} else {
$arch = "amd64"
}
$enc = [System.Text.Encoding]::UTF8
try {
$response = Invoke-WebRequest -Uri "$RepoUrl/repo.json" -UseBasicParsing
if ($response.Content.GetType().Name -eq "Byte[]") {
$psobj = $enc.GetString($response.Content) | ConvertFrom-Json
} else {
$psobj = $response.Content | ConvertFrom-Json
if ( !(Test-Path $Path) ) {
Write-Verbose "Invalid path for hashing: $Path"
return @{}
}
$hash = Convert-PSObjectToHashtable $psobj
} catch {
Write-Host "repo.json not found at: $RepoUrl"
$hash = @{}
}
$searchVersion = "latest"
if ( $hash.Contains($searchVersion)) {
foreach ($item in $hash.($searchVersion).Keys) {
if ( $item.EndsWith(".zip") ) {
if ( $item.Contains($arch) ) {
$saltFileName = $hash.($searchVersion).($item).name
$saltVersion = $hash.($searchVersion).($item).version
$saltSha512 = $hash.($searchVersion).($item).SHA512
}
if ( (Get-Item -Path $Path) -isnot [System.IO.FileInfo]) {
Write-Verbose "Not a file for hashing: $Path"
return @{}
}
$Path = Resolve-Path -Path $Path
Switch ($Algorithm) {
SHA1 {
$hasher = [System.Security.Cryptography.SHA1CryptoServiceProvider]::Create()
}
SHA256 {
$hasher = [System.Security.Cryptography.SHA256]::Create()
}
SHA384 {
$hasher = [System.Security.Cryptography.SHA384]::Create()
}
SHA512 {
$hasher = [System.Security.Cryptography.SHA512]::Create()
}
MACTripleDES {
$hasher = [System.Security.Cryptography.MACTripleDES]::Create()
}
MD5 {
$hasher = [System.Security.Cryptography.MD5]::Create()
}
RIPEMD160 {
$hasher = [System.Security.Cryptography.RIPEMD160]::Create()
}
}
Write-Verbose "Hashing using $Algorithm algorithm"
try {
$data = [System.IO.File]::OpenRead($Path)
$hash = $hasher.ComputeHash($data)
$hash = [System.BitConverter]::ToString($hash) -replace "-",""
return @{
Path = $Path;
Algorithm = $Algorithm.ToUpper();
Hash = $hash
}
} catch {
Write-Verbose "Error hashing: $Path"
Write-Verbose "ERROR: $_"
return @{}
} finally {
if ($null -ne $data) {
$data.Close()
}
}
}
if ( $saltFileName -and $saltVersion -and $saltSha512 ) {
if ( $RepoUrl.Contains("minor") ) {
$saltFileUrl = @($RepoUrl, $saltVersion, $saltFileName) -join "/"
} else {
$saltFileUrl = @($RepoUrl, "minor", $saltVersion, $saltFileName) -join "/"
}
#===============================================================================
# Script settings
#===============================================================================
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
$global:ProgressPreference = 'SilentlyContinue'
#===============================================================================
# Declare Variables
#===============================================================================
$ApiUrl = "https://packages.broadcom.com/artifactory/api/storage/saltproject-generic/onedir"
# Detect architecture ($arch)
if ([IntPtr]::Size -eq 4) { $arch = "x86" } else { $arch = "amd64" }
#===============================================================================
# Setting up quickstart environment
#===============================================================================
Write-Host ""
Write-Host "Setting up quickstart environment for Salt" -ForegroundColor Cyan
Write-Verbose "Getting version information from Artifactory"
$response = Invoke-WebRequest $ApiUrl -UseBasicParsing
# Convert the output to a powershell object
$psobj = $response.ToString() | ConvertFrom-Json
$Version = $psobj.children[-1].uri.Trim("/")
Write-Verbose "Getting sha256 hash and download url from Artifactory"
$saltFileName = "salt-$Version-onedir-windows-$arch.zip"
$response = Invoke-WebRequest "$ApiUrl/$Version/$saltFileName" -UseBasicParsing
$psobj = $response.ToString() | ConvertFrom-Json
$saltFileUrl = $psobj.downloadUri
$saltSha256 = $psobj.checksums.sha256
Write-Verbose "URL: $saltFileUrl"
Write-Host "* INFO: Downloading Salt: " -NoNewline
Invoke-WebRequest -Uri $saltFileUrl -OutFile .\salt.zip
if ( Test-Path -Path .\salt.zip ) {
Write-Host "Success" -ForegroundColor Green
} else {
Write-Host "Failed" -ForegroundColor Red
exit 1
}
$localSha256 = (Get-FileHash -Path .\salt.zip -Algorithm SHA256).Hash
Write-Verbose "Local Hash: $localSha256"
Write-Verbose "Remote Hash: $saltSha256"
Write-Host "* INFO: Comparing Hash: " -NoNewline
if ( $localSha256 -eq $saltSha256 ) {
Write-Host "Success" -ForegroundColor Green
} else {
Write-Host "Failed" -ForegroundColor Red
exit 1
}
Write-Host "* INFO: Downloading Salt"
Invoke-WebRequest -Uri $saltFileUrl -OutFile .\salt.zip
Write-Host "* INFO: Extracting Salt"
Write-Host "* INFO: Extracting Salt: " -NoNewline
Expand-ZipFile -ZipFile .\salt.zip -Destination .
if ( Test-Path -Path .\salt\Scripts\python.exe ) {
Write-Host "Success" -ForegroundColor Green
} else {
Write-Host "Failed" -ForegroundColor Red
exit 1
}
Write-Host "* INFO: Creating Saltfile: " -NoNewline
$PATH = $(Get-Location).Path
$saltfile_contents = @"
salt-call:
local: True
@ -143,20 +226,42 @@ salt-call:
cachedir: $PATH\salt\var\cache\salt
file_root: $PATH\salt\srv\salt
"@
Set-Content -Path .\salt\Saltfile -Value $saltfile_contents
if ( Test-Path -Path .\salt\Saltfile ) {
Write-Host "Success" -ForegroundColor Green
} else {
Write-Host "Failed" -ForegroundColor Red
exit 1
}
New-Item -Path "$PATH\salt\var\log\salt" -Type Directory -Force | Out-Null
New-Item -Path "$PATH\salt\conf" -Type Directory -Force | Out-Null
New-Item -Path "$PATH\salt\var\cache\salt" -Type Directory -Force | Out-Null
New-Item -Path "$PATH\salt\srv\salt" -Type Directory -Force | Out-Null
Write-Host "* INFO: Adding Salt to current path"
Write-Host "* INFO: $PATH\salt"
Write-Host "* INFO: Adding Salt to current path: " -NoNewline
$env:Path = "$PATH\salt;$env:PATH"
Write-Verbose $env:Path
if ( $env:PATH -Like "*$PATH\salt*" ) {
Write-Host "Success" -ForegroundColor Green
} else {
Write-Host "Failed" -ForegroundColor Red
exit 1
}
Write-Host "* INFO: $PATH\salt"
Write-Host "* INFO: Setting the SALT_SALTFILE environment variable"
Write-Host "* INFO: $PATH\salt\Saltfile"
Write-Host "* INFO: Setting the SALT_SALTFILE environment variable: "-NoNewline
$env:SALT_SALTFILE="$PATH\salt\Saltfile"
if ( Test-Path -Path $env:SALT_SALTFILE ) {
Write-Host "Success" -ForegroundColor Green
} else {
Write-Host "Failed" -ForegroundColor Red
exit 1
}
Write-Host "* INFO: $PATH\salt\Saltfile"
Write-Host ""
Write-Host "You can now run simple salt-call commands" -ForegroundColor Cyan
Write-Host "* INFO: Create Salt states in $PATH\salt\srv\salt"
Write-Host "* INFO: Try running salt-call test.ping"
Write-Host ""

View file

@ -18,7 +18,6 @@ def target_python_version():
def target_salt_version():
target_salt = os.environ.get("SaltVersion", "")
html_response = requests.get(API_URL)
content = json.loads(html_response.text)
folders = content["children"]
@ -36,6 +35,14 @@ def target_salt_version():
target_salt = target_salt[1:]
if target_salt not in versions:
pytest.skip(f"Invalid testing version: {target_salt}")
if target_salt in ("default", "latest", "master", "nightly"):
if target_salt in (
"default",
"latest",
"master",
"nightly",
"stable",
"onedir",
"git",
):
pytest.skip("Don't have a specific salt version to test against")
return versions[target_salt]

View file

@ -15,7 +15,9 @@ def path():
salt_path = "C:\\Program Files\\Salt Project\\Salt"
if salt_path not in os.environ["path"]:
os.environ["path"] = f'{os.environ["path"]};{salt_path}'
yield os.environ["path"]
yield os.environ["path"]
else:
yield ""
def run_salt_call(cmd):
@ -23,9 +25,36 @@ def run_salt_call(cmd):
Runs salt call command and returns a dictionary
Accepts cmd as a list
"""
cmd.append("--out=json")
result = subprocess.run(cmd, capture_output=True, text=True)
json_data = json.loads(result.stdout)
json_data = {"local": {}}
if platform.system() == "Windows":
cmd.append("--out=json")
result = subprocess.run(cmd, capture_output=True, text=True)
if 0 == result.returncode:
json_data = json.loads(result.stdout)
else:
log.error(f"failed to produce output result, '{result}'")
else:
if platform.system() == "Darwin":
cmdl = ["sudo"]
else:
cmdl = []
cmdl.extend(cmd)
cmdl.append("--out=json")
try:
result = subprocess.run(cmdl, capture_output=True, text=True)
except TypeError:
result = subprocess.run(
cmdl,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
if 0 == result.returncode:
json_data = json.loads(result.stdout)
else:
log.error(f"failed to produce output result, '{result}'")
return json_data["local"]
@ -49,4 +78,5 @@ def test_target_salt_version(path, target_salt_version):
cmd = ["salt-call", "--local", "grains.item", "saltversion", "--timeout=120"]
result = run_salt_call(cmd)
# Returns: {'saltversion': '3006.9+217.g53cfa53040'}
assert result["saltversion"] == target_salt_version
adj_saltversion = result["saltversion"].split("+")[0]
assert adj_saltversion == target_salt_version