From 3535de7284a36a672a5982394aa1212cb61305ec Mon Sep 17 00:00:00 2001 From: David Murphy Date: Thu, 20 Jun 2024 11:04:19 -0600 Subject: [PATCH] WIP - Changes --- .github/workflows/ci.yml | 70 +++---- .github/workflows/templates/ci.yml | 9 +- .github/workflows/templates/generate.py | 32 +-- .github/workflows/test-linux.yml | 27 ++- .github/workflows/test-macos.yml | 28 ++- .github/workflows/test-windows.yml | 34 ++- .pre-commit-config.yaml | 6 +- CHANGELOG.md | 14 ++ Gemfile | 11 - bootstrap-salt.sh | 20 +- btstrap-build.linux.yml | 262 ++++++++++++++++++++++++ btstrap-build.macos.yml | 34 +++ btstrap-build.windows.yml | 34 +++ kitchen.bsd.yml | 55 ----- kitchen.macos.yml | 4 +- kitchen.windows.yml | 6 +- kitchen.yml | 4 +- 17 files changed, 474 insertions(+), 176 deletions(-) delete mode 100644 Gemfile create mode 100644 btstrap-build.linux.yml create mode 100644 btstrap-build.macos.yml create mode 100644 btstrap-build.windows.yml delete mode 100644 kitchen.bsd.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85015c7..2f5f9d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,9 @@ jobs: separator: "," files: | bootstrap-salt.* - Gemfile - kitchen*.yml + ## DGM Gemfile + ## DGM kitchen*.yml + btstrap-build*.yml tests/** .github/workflows/** files_ignore: | @@ -61,10 +62,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install Pre-Commit run: | @@ -128,7 +129,7 @@ jobs: display-name: macOS 12 timeout: 20 runs-on: macos-12 - instances: '["stable-3006", "stable-3006-6", "latest"]' + instances: '["stable-3006", "stable-3006-8", "latest"]' macos-13: @@ -143,7 +144,7 @@ jobs: display-name: macOS 13 timeout: 20 runs-on: macos-13 - instances: '["stable-3006", "stable-3006-6", "latest"]' + instances: '["stable-3006", "stable-3006-8", "latest"]' @@ -159,7 +160,7 @@ jobs: display-name: Windows 2019 timeout: 20 runs-on: windows-2019 - instances: '["stable-3006", "stable-3006-6", "latest"]' + instances: '["stable-3006", "stable-3006-8", "latest"]' windows-2022: @@ -174,7 +175,7 @@ jobs: display-name: Windows 2022 timeout: 20 runs-on: windows-2022 - instances: '["stable-3006", "stable-3006-6", "latest"]' + instances: '["stable-3006", "stable-3006-8", "latest"]' @@ -189,7 +190,7 @@ jobs: distro-slug: almalinux-8 display-name: AlmaLinux 8 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' almalinux-9: @@ -203,7 +204,7 @@ jobs: distro-slug: almalinux-9 display-name: AlmaLinux 9 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' amazon-2: @@ -217,7 +218,7 @@ jobs: distro-slug: amazon-2 display-name: Amazon 2 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' amazon-2023: @@ -231,7 +232,7 @@ jobs: distro-slug: amazon-2023 display-name: Amazon 2023 timeout: 20 - instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' arch: @@ -259,7 +260,7 @@ jobs: distro-slug: centos-stream8 display-name: CentOS Stream 8 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' centos-stream9: @@ -273,7 +274,7 @@ jobs: distro-slug: centos-stream9 display-name: CentOS Stream 9 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' debian-11: @@ -287,7 +288,7 @@ jobs: distro-slug: debian-11 display-name: Debian 11 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' debian-12: @@ -301,7 +302,7 @@ jobs: distro-slug: debian-12 display-name: Debian 12 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' fedora-39: @@ -315,7 +316,7 @@ jobs: distro-slug: fedora-39 display-name: Fedora 39 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' fedora-40: @@ -329,7 +330,7 @@ jobs: distro-slug: fedora-40 display-name: Fedora 40 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' gentoo: @@ -388,20 +389,6 @@ jobs: instances: '["git-master", "latest", "default"]' - oraclelinux-7: - name: Oracle Linux 7 - 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-7 - display-name: Oracle Linux 7 - timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' - - oraclelinux-8: name: Oracle Linux 8 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -413,7 +400,7 @@ jobs: distro-slug: oraclelinux-8 display-name: Oracle Linux 8 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' oraclelinux-9: @@ -427,7 +414,7 @@ jobs: distro-slug: oraclelinux-9 display-name: Oracle Linux 9 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' photon-4: @@ -441,7 +428,7 @@ jobs: distro-slug: photon-4 display-name: Photon OS 4 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' photon-5: @@ -455,7 +442,7 @@ jobs: distro-slug: photon-5 display-name: Photon OS 5 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' rockylinux-8: @@ -469,7 +456,7 @@ jobs: distro-slug: rockylinux-8 display-name: Rocky Linux 8 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' rockylinux-9: @@ -483,7 +470,7 @@ jobs: distro-slug: rockylinux-9 display-name: Rocky Linux 9 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' ubuntu-2004: @@ -497,7 +484,7 @@ jobs: distro-slug: ubuntu-2004 display-name: Ubuntu 20.04 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' ubuntu-2204: @@ -511,7 +498,7 @@ jobs: distro-slug: ubuntu-2204 display-name: Ubuntu 22.04 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' ubuntu-2404: @@ -525,7 +512,7 @@ jobs: distro-slug: ubuntu-2404 display-name: Ubuntu 24.04 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "git-master", "latest", "default"]' set-pipeline-exit-status: @@ -555,7 +542,6 @@ jobs: - gentoo-systemd - opensuse-15 - opensuse-tumbleweed - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - photon-4 diff --git a/.github/workflows/templates/ci.yml b/.github/workflows/templates/ci.yml index 2bde230..f24688d 100644 --- a/.github/workflows/templates/ci.yml +++ b/.github/workflows/templates/ci.yml @@ -27,8 +27,9 @@ jobs: separator: "," files: | bootstrap-salt.* - Gemfile - kitchen*.yml + ## DGM Gemfile + ## DGM kitchen*.yml + btstrap-build*.yml tests/** .github/workflows/** files_ignore: | @@ -61,10 +62,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install Pre-Commit run: | diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 0ddbf60..b4ca37c 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -22,7 +22,6 @@ LINUX_DISTROS = [ "gentoo-systemd", "opensuse-15", "opensuse-tumbleweed", - "oraclelinux-7", "oraclelinux-8", "oraclelinux-9", "photon-4", @@ -94,23 +93,15 @@ ONEDIR_DISTROS = [ ] ONEDIR_RC_DISTROS = [ - "almalinux-8", "almalinux-9", "amazon-2", "amazon-2023", - "centos-stream8", "centos-stream9", - "debian-11", "debian-12", - "oraclelinux-7", - "oraclelinux-8", "oraclelinux-9", "photon-4", "photon-5", - "rockylinux-8", "rockylinux-9", - "ubuntu-2004", - "ubuntu-2204", "ubuntu-2404", ] @@ -150,7 +141,7 @@ BLACKLIST_GIT_MASTER = [ SALT_VERSIONS = [ "3006", - "3006-6", + "3006-8", "master", "latest", "nightly", @@ -165,7 +156,7 @@ ONEDIR_RC_SALT_VERSIONS = [] VERSION_DISPLAY_NAMES = { "3006": "v3006", - "3006-6": "v3006.6", + "3006-8": "v3006.8", "master": "Master", "latest": "Latest", "nightly": "Nightly", @@ -182,7 +173,7 @@ MAC_STABLE_VERSION_BLACKLIST = [ ] GIT_VERSION_BLACKLIST = [ - "3006-6", + "3006-8", "nightly", ] @@ -228,7 +219,6 @@ DISTRO_DISPLAY_NAMES = { "gentoo-systemd": "Gentoo (systemd)", "opensuse-15": "Opensuse 15", "opensuse-tumbleweed": "Opensuse Tumbleweed", - "oraclelinux-7": "Oracle Linux 7", "oraclelinux-8": "Oracle Linux 8", "oraclelinux-9": "Oracle Linux 9", "photon-4": "Photon OS 4", @@ -297,8 +287,8 @@ def generate_test_jobs(): if salt_version in MAC_STABLE_VERSION_BLACKLIST: continue - kitchen_target = f"{bootstrap_type}-{salt_version}" - instances.append(kitchen_target) + test_target = f"{bootstrap_type}-{salt_version}" + instances.append(test_target) for bootstrap_type in ["default"]: if distro not in STABLE_DISTROS: @@ -342,8 +332,8 @@ def generate_test_jobs(): if salt_version in STABLE_VERSION_BLACKLIST: continue - kitchen_target = f"{bootstrap_type}-{salt_version}" - instances.append(kitchen_target) + test_target = f"{bootstrap_type}-{salt_version}" + instances.append(test_target) for bootstrap_type in ["default"]: if distro not in STABLE_DISTROS: @@ -418,7 +408,7 @@ def generate_test_jobs(): BLACKLIST = { "3006": BLACKLIST_3006, - "3006-6": BLACKLIST_3006, + "3006-8": BLACKLIST_3006, } if bootstrap_type == "git": BLACKLIST = { @@ -433,13 +423,13 @@ def generate_test_jobs(): continue if ( - salt_version in ("3006", "3006-6", "master") + salt_version in ("3006", "3006-8", "master") and distro in BLACKLIST[salt_version] ): continue - kitchen_target = f"{bootstrap_type}-{salt_version}" - instances.append(kitchen_target) + test_target = f"{bootstrap_type}-{salt_version}" + instances.append(test_target) for bootstrap_type in ["default"]: if distro not in STABLE_DISTROS: diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 8b98ac6..757a801 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -26,7 +26,7 @@ on: jobs: Test: name: ${{ matrix.instance }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: ${{ inputs.timeout }} strategy: max-parallel: 2 @@ -37,16 +37,17 @@ jobs: steps: - uses: actions/checkout@v3 + ## DGM Need to replace this - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.2.3 bundler-cache: true - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install Python Dependencies run: | @@ -55,17 +56,29 @@ jobs: - name: Create Test Instance run: | - bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \ - (sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}) + ## DGM Need to replace this + ## DGM b + ## DGM (sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}) + ## DGM + ## DGM Need to select a GitHub runner here , ubuntu-latest + sleep 2 - name: Test Bootstrap run: | - bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM Need to replace this + ## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM Need to run the bootstrap tests for Linux here + sleep 2 - name: Destroy Test Instance if: always() run: | - bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM Need to replace this + ## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM this can be removed since using GitHub shared runners, and it should just close when done with it + sleep 2 - name: Set Exit Status if: always() diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 10b0f21..a42c9b4 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -28,8 +28,10 @@ on: default: 20 description: The timeout(in minutes) for the workflow -env: - KITCHEN_LOCAL_YAML: 'kitchen.macos.yml' +## DGM env: +## DGM KITCHEN_LOCAL_YAML: 'kitchen.macos.yml' +## DGM +## DGM Wonder what the KITCHEN_LOCAL_YAML had to be set here for MacOS, do we need to do something similar for runners ? jobs: Test: @@ -44,16 +46,17 @@ jobs: steps: - uses: actions/checkout@v3 + ## DGM Need to replace this - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.2.3 bundler-cache: true - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install Python Dependencies run: | @@ -62,17 +65,26 @@ jobs: - name: Create Test Instance run: | - bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \ - (sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}) + ## DGM bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \ + ## DGM (sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}) + ## DGM + ## DGM Need to select a GitHub runner here , macos-latest + sleep 2 - name: Test Bootstrap run: | - bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM Need to run the bootstrap tests for MacOS here + sleep 2 - name: Destroy Test Instance if: always() run: | - bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM this can be removed since using GitHub shared runners, and it should just close when done with it + sleep 2 - name: Set Exit Status if: always() diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index d4616e5..930e6c9 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -28,11 +28,13 @@ on: default: 20 description: The timeout(in minutes) for the workflow -env: - machine_user: kitchen - machine_pass: Password1 - machine_port: 5985 - KITCHEN_LOCAL_YAML: 'kitchen.windows.yml' +## DGM env: +## DGM machine_user: kitchen +## DGM machine_pass: Password1 +## DGM machine_port: 5985 +## DGM KITCHEN_LOCAL_YAML: 'kitchen.windows.yml' +## DGM +## DGM Wonder what the KITCHEN_LOCAL_YAML had to be set here for Windows, do we need to do something similar for runners ? jobs: Test: @@ -47,6 +49,7 @@ jobs: steps: - uses: actions/checkout@v3 + ## DGM Need to replace this - name: Setup Ruby uses: ruby/setup-ruby@v1 with: @@ -79,10 +82,10 @@ jobs: winrm set winrm/config/service '@{AllowUnencrypted="True"}' env - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install Python Dependencies run: | @@ -91,17 +94,26 @@ jobs: - name: Create Test Instance run: | - bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM Need to select a GitHub runner here , ubuntu-latest + sleep 2 - name: Test Bootstrap run: | - env - bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM env + ## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM Need to run the bootstrap tests for Windows here + sleep 2 - name: Destroy Test Instance if: always() run: | - bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} + ## DGM + ## DGM this can be removed since using GitHub shared runners, and it should just close when done with it + sleep 2 - name: Set Exit Status if: always() diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3d0b6a..d916858 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,14 +41,14 @@ repos: rev: v3.15.0 hooks: - id: pyupgrade - name: Rewrite Code to be Py3.9+ - args: [--py39-plus] + name: Rewrite Code to be Py3.10+ + args: [--py310-plus] - repo: https://github.com/asottile/reorder_python_imports rev: v3.12.0 hooks: - id: reorder-python-imports - args: [--py39-plus] + args: [--py310-plus] - repo: https://github.com/psf/black rev: 24.1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index d6e92e0..f9a04d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# v2024.06.XX + +## What's Changed + +- Removed support for Ruby, Kitchen and kitchen-salt and it's associated utilities +- Migrated to using GitHub Actions +- Removed support of End-Of-Life OS's, for example: Debian 7, 8, 9 & 10, RHEL 7 +- Removed support for FreeBSD and OpenBSD +- Removed support for EOL Salt releases, pre-3006 +- Added support for new OS's, for example: Ubuntu 24.04, Debian 12 +- Updated to minimum Python 3.10 version from 3.9 + +**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.04.03...v2024.06.XX + # v2024.04.03 ## What's Changed diff --git a/Gemfile b/Gemfile deleted file mode 100644 index a70a9da..0000000 --- a/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -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', :branch => 'main' - -group :vagrant do - gem 'kitchen-vagrant' -end diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index efb7ef8..78e8cee 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -24,7 +24,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2024.06.04" +__ScriptVersion="2024.06.10" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -627,7 +627,8 @@ elif [ "$ITYPE" = "stable" ]; then _ONEDIR_REV="$1" ITYPE="onedir" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-5]{2}[5-9](\.[0-9]*)?)')" != "" ]; then + ## DGM elif [ "$(echo "$1" | grep -E '^([3-9][0-5]{2}[5-9](\.[0-9]*)?)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-10][0-5]{2}[5-9](\.[0-9]*)?)')" != "" ]; then ONEDIR_REV="minor/$1" _ONEDIR_REV="$1" ITYPE="onedir" @@ -645,7 +646,8 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(nightly|latest|3006)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then + ## DGM elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-10][0-9]{3}(\.[0-9]*)?)')" != "" ]; then ONEDIR_REV="minor/$1" shift else @@ -667,18 +669,20 @@ elif [ "$ITYPE" = "onedir_rc" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?rc[0-9]-[0-9]$)')" != "" ]; then + ## DGM elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?rc[0-9]-[0-9]$)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-10][0-9]{3}?rc[0-9]-[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/') ONEDIR_REV="minor/$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}\.[0-9]?rc[0-9]$)')" != "" ]; then + ## DGM elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}\.[0-9]?rc[0-9]$)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-10][0-9]{3}\.[0-9]?rc[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/') ONEDIR_REV="minor/$1" shift else - echo "Unknown onedir_rc version: $1 (valid: 3006-6, latest.)" + echo "Unknown onedir_rc version: $1 (valid: 3006-8, latest.)" exit 1 fi fi @@ -7725,13 +7729,15 @@ __macosx_get_packagesite_onedir() { return 1 fi + ## DGM TBD need to allow for arm64 arch too DARWIN_ARCH="x86_64" __PY_VERSION_REPO="py3" if [ "$(echo "$_ONEDIR_REV" | grep -E '^(latest)$')" != "" ]; then _PKG_VERSION=$(__parse_repo_json_python) - elif [ "$(echo "$_ONEDIR_REV" | grep -E '^([3-9][0-9]{3}(\.[0-9]*))')" != "" ]; then + ## DGM elif [ "$(echo "$_ONEDIR_REV" | grep -E '^([3-9][0-9]{3}(\.[0-9]*))')" != "" ]; then + elif [ "$(echo "$_ONEDIR_REV" | grep -E '^([3-10][0-9]{3}(\.[0-9]*))')" != "" ]; then _PKG_VERSION=$_ONEDIR_REV else _PKG_VERSION=$(__parse_repo_json_python) diff --git a/btstrap-build.linux.yml b/btstrap-build.linux.yml new file mode 100644 index 0000000..b43f44b --- /dev/null +++ b/btstrap-build.linux.yml @@ -0,0 +1,262 @@ +--- +driver: + name: docker + use_sudo: false + hostname: salt + privileged: true + username: root + cap_add: + - sys_admin + disable_upstart: false + use_internal_docker_network: false + run_command: /usr/lib/systemd/systemd + +provisioner: + name: salt_solo + salt_install: bootstrap + salt_bootstrap_url: bootstrap-salt.sh + salt_bootstrap_options: -MPfq git %s + install_after_init_environment: true + log_level: info + sudo: false + require_chef: false + formula: tests + run_salt_call: false + init_environment: | + echo 'auto_accept: true' > /tmp/auto-accept-keys.conf + mkdir -p /etc/salt/master.d + mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf + sh -c 't=$(shuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t' + +platforms: + - name: almalinux-9 + driver: + provision_command: + - dnf -y install crypto-policies-scripts procps-ng + - update-crypto-policies + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: almalinux-8 + - name: amazon-2 + driver: + image: amazonlinux:2 + platform: rhel + provision_command: + - yum -y install procps-ng + - name: amazon-2023 + driver: + image: amazonlinux:2023 + platform: fedora + provision_command: + - yum -y install procps-ng + - name: arch + driver: + image: archlinux/archlinux + provision_command: + - pacman -Syu --noconfirm --needed systemd grep awk procps which + - systemctl enable sshd + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: centos-stream9 + driver: + platform: centosstream + image: quay.io/centos/centos:stream9 + provision_command: + - dnf -y install crypto-policies-scripts procps-ng + - update-crypto-policies + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: centos-stream8 + driver: + image: quay.io/centos/centos:stream8 + - name: centos-7 + driver: + run_command: /lib/systemd/systemd + - name: debian-10 + driver: + run_command: /lib/systemd/systemd + - name: debian-11 + driver: + image: debian:bullseye + run_command: /lib/systemd/systemd + - name: debian-12 + driver: + image: debian:bullseye + run_command: /lib/systemd/systemd + - name: fedora-39 + - name: fedora-40 + driver: + provision_command: &fedora_provision_command + - dnf -y install procps-ng crypto-policies-scripts + - update-crypto-policies + - name: gentoo + driver: + image: gentoo/stage3:latest + run_command: /sbin/init + provision_command: + - rc-update add sshd default + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: gentoo-systemd + driver: + image: gentoo/stage3:systemd + run_command: /lib/systemd/systemd + provision_command: + - systemctl enable sshd.service + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: opensuse-15 + driver: + image: opensuse/leap:15.4 + provision_command: + - &opensuse_provision_command_01 zypper --non-interactive install --auto-agree-with-licenses dbus-1 + - &opensuse_provision_command_02 zypper --non-interactive install --auto-agree-with-licenses sudo openssh which curl systemd + - &opensuse_provision_command_03 systemctl enable sshd.service + - name: opensuse-tumbleweed + driver: + image: opensuse/tumbleweed:latest + provision_command: + - *opensuse_provision_command_01 + - *opensuse_provision_command_02 + - *opensuse_provision_command_03 + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: rockylinux-9 + driver: + platform: centosstream + run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install crypto-policies-scripts procps-ng + - update-crypto-policies + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: rockylinux-8 + - name: oraclelinux-8 + - name: oraclelinux-7 + - name: rockylinux-8 + - name: ubuntu-22.04 + - name: ubuntu-23.10 + - name: ubuntu-24.04 + driver: + run_command: /lib/systemd/systemd + provision_command: + - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + - name: ubuntu-20.04 + driver: + run_command: /lib/systemd/systemd + - name: photon-4 + driver: + image: photon:4.0 + provision_command: + - tdnf -y install rpm procps-ng coreutils gawk + - echo "PubkeyAcceptedKeyTypes +ssh-rsa" | tee -a /etc/ssh/sshd_config + - sed -ie 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config + - systemctl enable sshd.service + - name: photon-5 + driver: + image: photon:5.0 + provision_command: + - tdnf -y install rpm procps-ng coreutils gawk + - echo "PubkeyAcceptedKeyTypes +ssh-rsa" | tee -a /etc/ssh/sshd_config + - sed -ie 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config + - systemctl enable sshd.service + +suites: + - name: git-3006 + provisioner: + salt_version: v3006 + 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: git-3006x + provisioner: + salt_version: 3006.x + salt_bootstrap_options: -x python3 -MPfq git %s + excludes: + - opensuse-15 + - opensuse-tumbleweed + - arch + - gentoo + - gentoo-systemd + - freebsd-131 + - freebsd-123 + - openbsd-6 + - name: stable-3006 + provisioner: + salt_version: 3006 + salt_bootstrap_options: -x python3 -MP stable %s + excludes: + - opensuse-15 + - opensuse-tumbleweed + - arch + - freebsd-131 + - freebsd-123 + - openbsd-6 + - name: stable-3006-8 + provisioner: + salt_version: 3006.8 + 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 + salt_bootstrap_options: -x python3 -MPfq -D git %s + + - name: latest + provisioner: + salt_version: latest + salt_bootstrap_options: -MP stable %s + + - name: default + provisioner: + salt_version: latest + salt_bootstrap_options: -MP + + - name: onedir-nightly + provisioner: + salt_version: nightly + salt_bootstrap_options: -MP onedir %s + + - name: onedir-latest + provisioner: + salt_version: latest + salt_bootstrap_options: -MP onedir %s + + - name: onedir-3006 + provisioner: + salt_version: 3006 + salt_bootstrap_options: -MP onedir %s + + - name: onedir-3007 + provisioner: + salt_version: 3007 + salt_bootstrap_options: -MP onedir %s + + - name: onedir-rc-3008-0rc1 + provisioner: + salt_version: 3008.0rc1 + salt_bootstrap_options: -R staging.repo.saltproject.io -MP onedir_rc %s + excludes: + - arch + - freebsd-131 + - freebsd-123 + - gentoo + - openbsd-6 + - opensuse-15 + - opensuse-tumbleweed + + - name: quickstart + provisioner: + salt_bootstrap_options: -Q + +verifier: + name: shell + remote_exec: false + command: pytest --cache-clear -v -s -ra --log-cli-level=info tests/integration/ diff --git a/btstrap-build.macos.yml b/btstrap-build.macos.yml new file mode 100644 index 0000000..a0d8921 --- /dev/null +++ b/btstrap-build.macos.yml @@ -0,0 +1,34 @@ +--- +driver: + name: exec + +provisioner: + sudo: true + salt_bootstrap_options: -MP stable %s + init_environment: | + echo 'auto_accept: true' > /tmp/auto-accept-keys.conf + sudo mkdir -p /etc/salt/master.d + sudo mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf + brew install coreutils + sh -c 't=$(gshuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t' + +platforms: + - name: macos-12 + - name: macos-13 + +suites: + - name: stable-3006 + provisioner: + salt_version: 3006 + salt_call_command: /opt/salt/salt-call + - name: stable-3006-8 + provisioner: + salt_version: 3006.8 + salt_call_command: /opt/salt/salt-call + - name: latest + provisioner: + salt_version: latest + salt_call_command: /opt/salt/salt-call + +verifier: + command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/ diff --git a/btstrap-build.windows.yml b/btstrap-build.windows.yml new file mode 100644 index 0000000..951f703 --- /dev/null +++ b/btstrap-build.windows.yml @@ -0,0 +1,34 @@ +--- +driver: + name: proxy + host: localhost + reset_command: "exit 0" + port: 5985 + username: kitchen + password: Password1 + +provisioner: + salt_bootstrap_url: D:/a/salt-bootstrap/salt-bootstrap/bootstrap-salt.ps1 + salt_bootstrap_options: -Version %s -Verbose + init_environment: '' + +platforms: + - name: windows-2022 + - name: windows-2019 + +suites: + - name: stable-3006 + provisioner: + salt_version: 3006.8 + salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe + - name: stable-3006-8 + provisioner: + salt_version: 3006.8 + salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe + - name: latest + provisioner: + salt_version: latest + salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe + +verifier: + command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/ diff --git a/kitchen.bsd.yml b/kitchen.bsd.yml deleted file mode 100644 index 64bc83a..0000000 --- a/kitchen.bsd.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -driver: - name: vagrant - vm_hostname: salt - username: vagrant - cache_directory: false - customize: - usbxhci: 'off' - gui: false - ssh: - shell: /bin/sh - linked_clone: true - <% unless ENV['CI'] %> - synced_folders: - - - '.kitchen/kitchen-vagrant/%{instance_name}/vagrant' - - '/vagrant' - - 'create: true, disabled: false' - <% end %> - -provisioner: - init_environment: | - echo 'auto_accept: true' > /tmp/auto-accept-keys.conf - sudo mkdir -p /usr/local/etc/salt/master.d - sudo mv /tmp/auto-accept-keys.conf /usr/local/etc/salt/master.d/auto-accept-keys.conf - sudo pkg install -y shuf - sh -c 't=$(shuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t' - sudo: true - -platforms: - - name: freebsd-131 - driver: - box: bento/freebsd-13.1 - - name: freebsd-123 - driver: - box: bento/freebsd-12.3 - - name: openbsd-7 - driver: - 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 - sudo mkdir -p /etc/salt/master.d - sudo mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf - sudo pkg_add coreutils - sh -c 't=$(gshuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t' - -verifier: - command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/ diff --git a/kitchen.macos.yml b/kitchen.macos.yml index 308efdd..a0d8921 100644 --- a/kitchen.macos.yml +++ b/kitchen.macos.yml @@ -21,9 +21,9 @@ suites: provisioner: salt_version: 3006 salt_call_command: /opt/salt/salt-call - - name: stable-3006-6 + - name: stable-3006-8 provisioner: - salt_version: 3006.6 + salt_version: 3006.8 salt_call_command: /opt/salt/salt-call - name: latest provisioner: diff --git a/kitchen.windows.yml b/kitchen.windows.yml index a90894c..951f703 100644 --- a/kitchen.windows.yml +++ b/kitchen.windows.yml @@ -19,11 +19,11 @@ platforms: suites: - name: stable-3006 provisioner: - salt_version: 3006.6 + salt_version: 3006.8 salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe - - name: stable-3006-6 + - name: stable-3006-8 provisioner: - salt_version: 3006.6 + salt_version: 3006.8 salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe - name: latest provisioner: diff --git a/kitchen.yml b/kitchen.yml index bea3256..1f4e8f4 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -194,9 +194,9 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 - - name: stable-3006-6 + - name: stable-3006-8 provisioner: - salt_version: 3006.6 + salt_version: 3006.8 salt_bootstrap_options: -x python3 -MP stable %s excludes: - opensuse-15