Merge branch 'develop' into develop

This commit is contained in:
Gareth J. Greenaway 2022-12-06 17:33:45 -08:00 committed by GitHub
commit 564ea55c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 168 additions and 91 deletions

View file

@ -145,16 +145,16 @@ jobs:
instances: '["git-master", "latest"]'
openbsd-6:
name: OpenBSD 6
openbsd-7:
name: OpenBSD 7
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-bsd.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: openbsd-6
display-name: OpenBSD 6
distro-slug: openbsd-7
display-name: OpenBSD 7
timeout: 20
runs-on: macos-10.15
instances: '["latest"]'
@ -173,7 +173,7 @@ jobs:
display-name: macOS 10.15
timeout: 20
runs-on: macos-10.15
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
macos-11:
@ -188,7 +188,7 @@ jobs:
display-name: macOS 11
timeout: 20
runs-on: macos-11
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
macos-12:
@ -203,7 +203,7 @@ jobs:
display-name: macOS 12
timeout: 20
runs-on: macos-12
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
@ -219,7 +219,7 @@ jobs:
display-name: Windows 2019
timeout: 20
runs-on: windows-2019
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
windows-2022:
@ -234,7 +234,7 @@ jobs:
display-name: Windows 2022
timeout: 20
runs-on: windows-2022
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
@ -249,7 +249,7 @@ jobs:
distro-slug: almalinux-8
display-name: AlmaLinux 8
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
amazon-2:
@ -263,7 +263,7 @@ jobs:
distro-slug: amazon-2
display-name: Amazon 2
timeout: 20
instances: '["stable-3003", "stable-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "git-master", "latest"]'
arch:
@ -291,7 +291,7 @@ jobs:
distro-slug: centos-7
display-name: CentOS 7
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
centos-stream8:
@ -305,7 +305,7 @@ jobs:
distro-slug: centos-stream8
display-name: CentOS Stream 8
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
debian-10:
@ -319,7 +319,7 @@ jobs:
distro-slug: debian-10
display-name: Debian 10
timeout: 20
instances: '["stable-3003", "stable-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "git-master", "latest"]'
debian-11:
@ -333,21 +333,7 @@ jobs:
distro-slug: debian-11
display-name: Debian 11
timeout: 20
instances: '["stable-3004", "git-master", "latest"]'
debian-9:
name: Debian 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: debian-9
display-name: Debian 9
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3004", "stable-3005", "onedir-3005", "git-master", "latest"]'
fedora-35:
@ -445,7 +431,7 @@ jobs:
distro-slug: oraclelinux-7
display-name: Oracle Linux 7
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
oraclelinux-8:
@ -459,7 +445,7 @@ jobs:
distro-slug: oraclelinux-8
display-name: Oracle Linux 8
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
rockylinux-8:
@ -473,7 +459,7 @@ jobs:
distro-slug: rockylinux-8
display-name: Rocky Linux 8
timeout: 20
instances: '["stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
ubuntu-1804:
@ -487,7 +473,7 @@ jobs:
distro-slug: ubuntu-1804
display-name: Ubuntu 18.04
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "stable-3005", "git-3005", "onedir-3005", "git-master", "latest"]'
ubuntu-2004:
@ -501,7 +487,7 @@ jobs:
distro-slug: ubuntu-2004
display-name: Ubuntu 20.04
timeout: 20
instances: '["stable-3003", "stable-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "git-master", "latest"]'
ubuntu-2204:
@ -515,7 +501,7 @@ jobs:
distro-slug: ubuntu-2204
display-name: Ubuntu 22.04
timeout: 20
instances: '["stable-3004", "git-master", "latest"]'
instances: '["stable-3004", "stable-3005", "onedir-3005", "git-master", "latest"]'
set-pipeline-exit-status:
@ -528,7 +514,7 @@ jobs:
- generate-actions-workflow
- freebsd-131
- freebsd-123
- openbsd-6
- openbsd-7
- macos-1015
- macos-11
- macos-12
@ -541,7 +527,6 @@ jobs:
- centos-stream8
- debian-10
- debian-11
- debian-9
- fedora-35
- fedora-36
- gentoo

View file

@ -15,7 +15,6 @@ LINUX_DISTROS = [
"centos-stream8",
"debian-10",
"debian-11",
"debian-9",
"fedora-35",
"fedora-36",
"gentoo",
@ -42,7 +41,7 @@ OSX = [
BSD = [
"freebsd-131",
"freebsd-123",
"openbsd-6",
"openbsd-7",
]
STABLE_DISTROS = [
@ -53,7 +52,6 @@ STABLE_DISTROS = [
"centos-stream8",
"debian-10",
"debian-11",
"debian-9",
"fedora-35",
"fedora-36",
"gentoo",
@ -108,6 +106,16 @@ BLACKLIST_3004 = [
"opensuse-tumbleweed",
]
BLACKLIST_3005 = [
"arch",
"fedora-35",
"fedora-36",
"gentoo",
"gentoo-systemd",
"opensuse-15",
"opensuse-tumbleweed",
]
BLACKLIST_GIT_3004 = [
"amazon-2",
"arch",
@ -124,16 +132,39 @@ BLACKLIST_GIT_3004 = [
"ubuntu-2204",
]
BLACKLIST_GIT_3005 = [
"amazon-2",
"arch",
"debian-10",
"debian-11",
"fedora-35",
"fedora-36",
"gentoo",
"gentoo-systemd",
"opensuse-15",
"opensuse-tumbleweed",
"ubuntu-2004",
"ubuntu-2110",
"ubuntu-2204",
]
SALT_VERSIONS = [
"3003",
"3004",
"3005",
"master",
"latest",
]
ONEDIR_SALT_VERSIONS = [
"3005",
"latest",
]
VERSION_DISPLAY_NAMES = {
"3003": "v3003",
"3004": "v3004",
"3005": "v3005",
"master": "Master",
"latest": "Latest",
}
@ -150,7 +181,6 @@ DISTRO_DISPLAY_NAMES = {
"centos-stream8": "CentOS Stream 8",
"debian-10": "Debian 10",
"debian-11": "Debian 11",
"debian-9": "Debian 9",
"fedora-35": "Fedora 35",
"fedora-36": "Fedora 36",
"gentoo": "Gentoo",
@ -168,7 +198,7 @@ DISTRO_DISPLAY_NAMES = {
"macos-12": "macOS 12",
"freebsd-131": "FreeBSD 13.1",
"freebsd-123": "FreeBSD 12.3",
"openbsd-6": "OpenBSD 6",
"openbsd-7": "OpenBSD 7",
"windows-2019": "Windows 2019",
"windows-2022": "Windows 2022",
}
@ -223,7 +253,7 @@ def generate_test_jobs():
instances.append(salt_version)
continue
if distro == "openbsd-6":
if distro == "openbsd-7":
# Only test latest on OpenBSD 6
continue
@ -381,7 +411,11 @@ def generate_test_jobs():
instances.append(salt_version)
continue
for bootstrap_type in ("stable", "git"):
for bootstrap_type in ("stable", "git", "onedir"):
if bootstrap_type == "onedir":
if salt_version not in ONEDIR_SALT_VERSIONS:
continue
if bootstrap_type == "stable":
if salt_version == "master":
# For the master branch there's no stable build
@ -399,11 +433,13 @@ def generate_test_jobs():
BLACKLIST = {
"3003": BLACKLIST_3003,
"3004": BLACKLIST_3004,
"3005": BLACKLIST_3005,
}
if bootstrap_type == "git":
BLACKLIST = {
"3003": BLACKLIST_GIT_3003,
"3004": BLACKLIST_GIT_3004,
"3005": BLACKLIST_GIT_3005,
}
# .0 versions are a virtual version for pinning to the first
@ -413,7 +449,7 @@ def generate_test_jobs():
continue
if (
salt_version in ("3003", "3004")
salt_version in ("3003", "3004", "3005")
and distro in BLACKLIST[salt_version]
):
continue

View file

@ -26,9 +26,10 @@ on:
jobs:
Test:
name: ${{ matrix.instance }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: ${{ inputs.timeout }}
strategy:
max-parallel: 2
fail-fast: false
matrix:
instance: ${{ fromJSON(inputs.instances) }}

View file

@ -1,3 +1,20 @@
# v2022.10.04
## What's Changed
- Update README for Windows installation by @eozer in https://github.com/saltstack/salt-bootstrap/pull/1860
- Update the bootstrap script to work with final onedir releases. by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1863
- Install Oracle's EPEL repo on Oracle Linux 7 and 8. by @pjcreath in https://github.com/saltstack/salt-bootstrap/pull/1839
- onedir install - correct version regex by @jeff350 in https://github.com/saltstack/salt-bootstrap/pull/1868
- Ensure the REPO_ARCH for Arm64 is correct. by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1867
## New Contributors
- @eozer made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1860
- @jeff350 made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1868
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2022.08.13...v2022.10.04
# v2022.08.13
## What's Changed

View file

@ -4,7 +4,7 @@ source "https://rubygems.org"
gem 'test-kitchen', '>= 3.2.2'
gem 'kitchen-salt', '>= 0.7.2'
gem 'kitchen-docker', git: 'https://github.com/test-kitchen/kitchen-docker.git'
gem 'kitchen-docker', :git => 'https://github.com/test-kitchen/kitchen-docker.git', :branch => 'main'
group :vagrant do
gem 'kitchen-vagrant'

View file

@ -32,6 +32,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
- 2022.10.04: ``d0686c2daeed18bb726e58eef75a69afe9ee56a1a23b2c32cd4e87d6005638e2``
- 2022.08.13: ``af922699c1a2bb3b89b6dac04397389999df1b3416b8d0b5c93766412f14c95c``
- 2022.08.12: ``b46f018bbf02f45c6096ab96e9261a9adb3a78ff65092c3976f32ffde909afcb``
- 2022.05.19: ``e92e1df6930285cf23eda188bee3cfa3dd6c577b4fb7aa91b29213ad820199b1``

View file

@ -23,7 +23,7 @@
#======================================================================================================================
set -o nounset # Treat unset variables as an error
__ScriptVersion="2022.08.13"
__ScriptVersion="2022.10.04"
__ScriptName="bootstrap-salt.sh"
__ScriptFullName="$0"
@ -639,11 +639,14 @@ elif [ "$ITYPE" = "onedir" ]; then
if [ "$(echo "$1" | grep -E '^(latest|3005)$')" != "" ]; then
ONEDIR_REV="$1"
shift
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then
# Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix
ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
elif [ "$(echo "$1" | grep -E '^(3005(\.[0-9]*)?)')" != "" ]; then
# Handle the 3005.0 version as 3005 archive (pin to minor) and strip the fake ".0" suffix
ONEDIR_REV=$(echo "$1" | sed -E 's/^(3005)\.0$/\1/')
ONEDIR_REV="minor/$ONEDIR_REV"
shift
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then
ONEDIR_REV="minor/$1"
shift
else
echo "Unknown stable version: $1 (valid: 3005, latest.)"
exit 1
@ -2096,20 +2099,13 @@ __rpm_import_gpg() {
#----------------------------------------------------------------------------------------------------------------------
__yum_install_noinput() {
ENABLE_EPEL_CMD=""
# Skip Amazon Linux for the first round, since EPEL is no longer required.
# See issue #724
if [ $_DISABLE_REPOS -eq $BS_FALSE ] && [ "$DISTRO_NAME_L" != "amazon_linux_ami" ]; then
ENABLE_EPEL_CMD="--enablerepo=${_EPEL_REPO}"
fi
if [ "$DISTRO_NAME_L" = "oracle_linux" ]; then
# We need to install one package at a time because --enablerepo=X disables ALL OTHER REPOS!!!!
for package in "${@}"; do
yum -y install "${package}" || yum -y install "${package}" ${ENABLE_EPEL_CMD} || return $?
yum -y install "${package}" || yum -y install "${package}" || return $?
done
else
yum -y install "${@}" ${ENABLE_EPEL_CMD} || return $?
yum -y install "${@}" || return $?
fi
} # ---------- end of function __yum_install_noinput ----------
@ -4312,9 +4308,9 @@ install_fedora_git_post() {
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Salt executables are located under `/usr/local/bin/` on Fedora 36+
if [ "${DISTRO_VERSION}" -ge 36 ]; then
sed -i -e 's:/usr/bin/:/usr/local/bin/:g' /lib/systemd/system/salt-*.service
fi
#if [ "${DISTRO_VERSION}" -ge 36 ]; then
# sed -i -e 's:/usr/bin/:/usr/local/bin/:g' /lib/systemd/system/salt-*.service
#fi
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue
@ -4371,30 +4367,6 @@ install_fedora_check_services() {
#
# CentOS Install Functions
#
__install_epel_repository() {
if [ ${_EPEL_REPOS_INSTALLED} -eq $BS_TRUE ]; then
return 0
fi
# Check if epel repo is already enabled and flag it accordingly
if yum repolist | grep -q "^[!]\\?${_EPEL_REPO}/"; then
_EPEL_REPOS_INSTALLED=$BS_TRUE
return 0
fi
# Download latest 'epel-next-release' package for the distro version directly
epel_next_repo_url="${HTTP_VAL}://dl.fedoraproject.org/pub/epel/epel-next-release-latest-${DISTRO_MAJOR_VERSION}.noarch.rpm"
# Download latest 'epel-release' package for the distro version directly
epel_repo_url="${HTTP_VAL}://dl.fedoraproject.org/pub/epel/epel-release-latest-${DISTRO_MAJOR_VERSION}.noarch.rpm"
yum -y install "${epel_next_repo_url}" "${epel_repo_url}"
_EPEL_REPOS_INSTALLED=$BS_TRUE
return 0
}
__install_saltstack_rhel_repository() {
if [ "$ITYPE" = "stable" ]; then
repo_rev="$STABLE_REV"
@ -4517,7 +4489,6 @@ install_centos_stable_deps() {
fi
if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ]; then
__install_epel_repository || return 1
__install_saltstack_rhel_repository || return 1
fi
@ -4559,6 +4530,8 @@ install_centos_stable_deps() {
fi
fi
__PACKAGES="${__PACKAGES} procps"
# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
@ -4821,7 +4794,6 @@ install_centos_onedir_deps() {
fi
if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ]; then
__install_epel_repository || return 1
__install_saltstack_rhel_onedir_repository || return 1
fi
@ -5345,6 +5317,11 @@ install_oracle_linux_git_post() {
return 0
}
install_oracle_linux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_oracle_linux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -5418,6 +5395,11 @@ install_almalinux_git_post() {
return 0
}
install_almalinux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_almalinux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -5491,6 +5473,11 @@ install_rocky_linux_git_post() {
return 0
}
install_rocky_linux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_rocky_linux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -5564,6 +5551,11 @@ install_scientific_linux_git_post() {
return 0
}
install_scientific_linux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_scientific_linux_testing_post() {
install_centos_testing_post || return 1
return 0

View file

@ -33,12 +33,16 @@ platforms:
- name: freebsd-123
driver:
box: bento/freebsd-12.3
- name: openbsd-6
- name: openbsd-7
driver:
box: generic/openbsd6
box: generic/openbsd7
ssh:
shell: /bin/ksh
synced_folders: []
transport:
name: ssh
username: vagrant
password: vagrant
provisioner:
init_environment: |
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf

View file

@ -25,6 +25,9 @@ suites:
- name: stable-3004
provisioner:
salt_version: 3004.1
- name: stable-3005
provisioner:
salt_version: 3005.1
- name: latest
provisioner:
salt_version: latest

View file

@ -23,6 +23,9 @@ suites:
- name: stable-3004
provisioner:
salt_version: 3004.1-1
- name: stable-3005
provisioner:
salt_version: 3005.1-1
- name: latest
provisioner:
salt_version: latest

View file

@ -131,6 +131,20 @@ suites:
- freebsd-131
- freebsd-123
- openbsd-6
- name: git-3005
provisioner:
salt_version: 3005
salt_bootstrap_options: -x python3 -MPfq git %s
excludes:
- opensuse-15
- opensuse-tumbleweed
- debian-11
- arch
- gentoo
- gentoo-systemd
- freebsd-131
- freebsd-123
- openbsd-6
- name: stable-3003-0
provisioner:
salt_version: 3003
@ -186,6 +200,17 @@ suites:
- freebsd-131
- freebsd-123
- openbsd-6
- name: stable-3005
provisioner:
salt_version: 3005
salt_bootstrap_options: -x python3 -MP stable %s
excludes:
- opensuse-15
- opensuse-tumbleweed
- arch
- freebsd-131
- freebsd-123
- openbsd-6
- name: git-master
provisioner:
salt_version: master
@ -196,6 +221,16 @@ suites:
salt_version: latest
salt_bootstrap_options: -MP stable %s
- name: onedir-latest
provisioner:
salt_version: latest
salt_bootstrap_options: -MP onedir %s
- name: onedir-3005
provisioner:
salt_version: 3005
salt_bootstrap_options: -MP onedir %s
verifier:
name: shell
remote_exec: false