Skip to content

Commit

Permalink
Added Debian 11 and 13 containers, removed Amazon Linux 2 container, …
Browse files Browse the repository at this point in the history
…updated test
  • Loading branch information
dmurphy18 committed Dec 12, 2024
1 parent 316e65a commit 1040775
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 110 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,32 +180,32 @@ jobs:



amazonlinux-2:
name: Amazon 2
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: amazonlinux-2
display-name: Amazon 2
container-slug: amazonlinux-2
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"]'


amazonlinux-2023:
name: Amazon 2023
debian-11:
name: Debian 11
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: amazonlinux-2023
display-name: Amazon 2023
container-slug: amazonlinux-2023
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", "latest", "default"]'

Expand All @@ -225,6 +225,21 @@ jobs:
instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'


debian-13:
name: Debian 13
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-13
display-name: Debian 13
container-slug: debian-13
timeout: 20
instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'


photon-5:
name: Photon OS 5
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
Expand Down Expand Up @@ -297,9 +312,10 @@ jobs:
- macos-13
- macos-14
- windows-2022
- amazonlinux-2
- amazonlinux-2023
- debian-11
- debian-12
- debian-13
- photon-5
- rockylinux-8
- rockylinux-9
Expand Down
39 changes: 9 additions & 30 deletions .github/workflows/templates/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@

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

# only test against current containers with systemd
# will add these when they become available with systemd
# "debian-11",
# "debian-13",
# "amazonlinux-2",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
LINUX_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-11",
"debian-12",
"debian-13",
"photon-5",
"rockylinux-8",
"rockylinux-9",
Expand All @@ -34,44 +32,38 @@
"macos-14",
]

# only test against current containers with systemd
# will add these when they become available with systemd
# "debian-11",
# "debian-13",
# "amazonlinux-2",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
STABLE_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-11",
"debian-12",
"debian-13",
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2204",
]

# only test against current containers with systemd
# will add these when they become available with systemd
# "debian-11",
# "debian-13",
# "amazonlinux-2",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
ONEDIR_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-11",
"debian-12",
"debian-13",
"photon-5",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2204",
]

# only test against current containers with systemd
# will add these when they become available with systemd
# "amazonlinux-2",
# "amazonlinux-2023",
# "photon-4",
Expand Down Expand Up @@ -216,19 +208,6 @@
"windows-2022": "Windows 2022",
}

## "amazonlinux-2": "systemd-amazonlinux-2",
## "amazonlinux-2023": "systemd-amazonlinux-2023",
## "debian-11": "systemd-debian-11",
## "debian-12": "systemd-debian-12",
## "debian-13": "systemd-debian-13",
## "fedora-40": "systemd-fedora-40",
## "photon-4": "systemd-photon-4",
## "photon-5": "systemd-photon-5",
## "rockylinux-8": "systemd-rockylinux-8",
## "rockylinux-9": "systemd-rockylinux-9",
## "ubuntu-2004": "systemd-ubuntu-20.04",
## "ubuntu-2204": "systemd-ubuntu-22.04",
## "ubuntu-2404": "systemd-ubuntu-24.04",
CONTAINER_SLUG_NAMES = {
"amazonlinux-2": "amazonlinux-2",
"amazonlinux-2023": "amazonlinux-2023",
Expand Down
85 changes: 17 additions & 68 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2468,12 +2468,6 @@ __check_services_systemd() {
servicename=$1
echodebug "Checking if service ${servicename} is enabled"

## DGM
if [ "${DISTRO_NAME_L}" = "amazon_linux_ami" ] && [ "${DISTRO_VERSION}" = "2" ]; then
echoinfo "DGM skipping the is-enabled test on AMZN2, since command 'systemctl is-enabled salt-minion' is generating error msg 'Failed to get D-Bus connection: No such file or directory' on AMZN2 container"
return 0
fi

if [ "$(systemctl is-enabled "${servicename}")" = "enabled" ]; then
echodebug "Service ${servicename} is enabled"
return 0
Expand Down Expand Up @@ -3195,11 +3189,8 @@ install_ubuntu_git_deps() {
__PACKAGES="${__PACKAGES} util-linux-extra"
fi

# Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES="${__PACKAGES} procps pciutils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
# Additionally install procps pciutils and sudo which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES="${__PACKAGES} procps pciutils sudo"

# shellcheck disable=SC2086
__apt_get_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -3598,15 +3589,12 @@ install_debian_onedir_deps() {
return 1
fi

# Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES='procps pciutils'
# Additionally install procps, pciutils and sudo which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES='procps pciutils sudo'

# YAML module is used for generating custom master/minion configs
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-yaml"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"

# shellcheck disable=SC2086
__apt_get_install_noinput ${__PACKAGES} || return 1

Expand Down Expand Up @@ -3649,11 +3637,8 @@ install_debian_git_deps() {
__PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc"
echodebug "install_debian_git_deps() Installing ${__PACKAGES}"

# Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES="${__PACKAGES} procps pciutils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
# Additionally install procps, pciutils and sudo which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES="${__PACKAGES} procps pciutils sudo"

# shellcheck disable=SC2086
__apt_get_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -3953,14 +3938,11 @@ install_fedora_deps() {
__PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pip python${PY_PKG_VER}-m2crypto python${PY_PKG_VER}-pyyaml"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd sudo"
if [ "${_EXTRA_PACKAGES}" != "" ]; then
echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}"
fi

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"

# shellcheck disable=SC2086
__dnf_install_noinput ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1

Expand Down Expand Up @@ -3991,10 +3973,7 @@ install_fedora_git_deps() {
# shellcheck disable=SC2119
__git_clone_and_checkout || return 1

__PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc gcc-c++"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc gcc-c++ sudo"

# shellcheck disable=SC2086
__dnf_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -4123,10 +4102,7 @@ install_fedora_onedir_deps() {
__install_saltstack_fedora_onedir_repository || return 1
fi

__PACKAGES="dnf-utils chkconfig procps-ng"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="dnf-utils chkconfig procps-ng sudo"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -4286,10 +4262,7 @@ install_centos_stable_deps() {
__install_saltstack_rhel_onedir_repository || return 1
fi

__PACKAGES="yum-utils chkconfig procps-ng findutils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="yum-utils chkconfig procps-ng findutils sudo"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -4335,9 +4308,6 @@ install_centos_stable() {
__PACKAGES="${__PACKAGES} salt-api$MINOR_VER_STRG"
fi

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"

# shellcheck disable=SC2086
yum makecache || return 1
__yum_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -4416,10 +4386,7 @@ install_centos_git_deps() {
return 1
fi

__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc sudo"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -4515,10 +4482,7 @@ install_centos_onedir_deps() {
__install_saltstack_rhel_onedir_repository || return 1
fi

__PACKAGES="yum-utils chkconfig procps-ng findutils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="yum-utils chkconfig procps-ng findutils sudo"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand Down Expand Up @@ -5619,10 +5583,7 @@ install_amazon_linux_ami_2_git_deps() {
# shellcheck disable=SC2119
__git_clone_and_checkout || return 1

__PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc sudo"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand All @@ -5644,10 +5605,7 @@ install_amazon_linux_ami_2_deps() {

# We need to install yum-utils before doing anything else when installing on
# Amazon Linux ECS-optimized images. See issue #974.
__PACKAGES="yum-utils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="yum-utils sudo"

__yum_install_noinput ${__PACKAGES}

Expand Down Expand Up @@ -5737,10 +5695,7 @@ install_amazon_linux_ami_2_onedir_deps() {

# We need to install yum-utils before doing anything else when installing on
# Amazon Linux ECS-optimized images. See issue #974.
__PACKAGES="yum-utils chkconfig procps-ng findutils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="yum-utils chkconfig procps-ng findutils sudo"

__yum_install_noinput ${__PACKAGES}

Expand Down Expand Up @@ -5897,10 +5852,7 @@ install_amazon_linux_ami_2023_git_deps() {
# shellcheck disable=SC2119
__git_clone_and_checkout || return 1

__PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc sudo"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand All @@ -5925,10 +5877,7 @@ install_amazon_linux_ami_2023_onedir_deps() {

# We need to install yum-utils before doing anything else when installing on
# Amazon Linux ECS-optimized images. See issue #974.
__PACKAGES="yum-utils chkconfig procps-ng findutils"

# ensure sudo installed
__PACKAGES="${__PACKAGES} sudo"
__PACKAGES="yum-utils chkconfig procps-ng findutils sudo"

__yum_install_noinput ${__PACKAGES}

Expand Down
5 changes: 4 additions & 1 deletion tests/integration/test_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def run_salt_call(cmd):
result = subprocess.run(cmdl, capture_output=True, text=True)
except TypeError:
result = subprocess.run(
cmdl, stdout=PIPE, stderr=PIPE, universal_newlines=True
cmdl,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
print(f"DGM run_salt_call result '{result}'", flush=True)
if 0 == result.returncode:
Expand Down

0 comments on commit 1040775

Please sign in to comment.