diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml deleted file mode 100644 index 4d7bbdcc8241..000000000000 --- a/.github/workflows/build-deb-packages.yml +++ /dev/null @@ -1,132 +0,0 @@ ---- -name: Build DEB Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - build: - name: DEB - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - source: - - ${{ inputs.source }} - - container: - image: ghcr.io/saltstack/salt-ci-containers/packaging:debian-12 - - steps: - # Checkout here so we can easily use custom actions - - uses: actions/checkout@v4 - - # Checkout here for the build process - - name: Checkout in build directory - uses: actions/checkout@v4 - with: - path: - pkgs/checkout/ - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - path: pkgs/checkout/artifacts/ - - - name: Download Release Patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}.patch - path: pkgs/checkout/ - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cwd: pkgs/checkout/ - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - cwd: pkgs/checkout/ - - - name: Configure Git - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - working-directory: pkgs/checkout/ - run: | - tools pkg configure-git - - - name: Apply release patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - working-directory: pkgs/checkout/ - run: | - tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete - - - name: Build Deb - working-directory: pkgs/checkout/ - run: | - tools pkg build deb --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) - || - format('--arch={0}', matrix.arch) - }} - - - name: Cleanup - run: | - rm -rf pkgs/checkout/ - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload DEBs - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: ${{ github.workspace }}/pkgs/* - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/build-deps-ci-action-macos.yml b/.github/workflows/build-deps-ci-action-macos.yml deleted file mode 100644 index 125a6713a85e..000000000000 --- a/.github/workflows/build-deps-ci-action-macos.yml +++ /dev/null @@ -1,135 +0,0 @@ ---- -name: Install Test Dependencies - -on: - workflow_call: - inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against - nox-session: - required: true - type: string - description: The nox session to run - salt-version: - type: string - required: true - description: The Salt version to set prior to running tests. - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - platform: - required: true - type: string - description: The platform being tested - arch: - required: true - type: string - description: The platform arch being tested - nox-version: - required: true - type: string - description: The nox version to install - python-version: - required: false - type: string - description: The python version to run tests with - default: "3.10" - package-name: - required: false - type: string - description: The onedir package name to use - default: salt - - -env: - COLUMNS: 190 - PIP_INDEX_URL: "https://pypi-proxy.saltstack.net/root/local/+simple/" - PIP_EXTRA_INDEX_URL: "https://pypi.org/simple" - GITHUB_ACTIONS_PIPELINE: "1" - -jobs: - - dependencies: - name: Install - runs-on: ${{ inputs.distro-slug }} - timeout-minutes: 90 - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Cache nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} - id: nox-dependencies-cache - uses: actions/cache@v3.3.1 - with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} - - - name: Download Onedir Tarball as an Artifact - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/download-artifact@v3 - with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - path: artifacts/ - - - name: Decompress Onedir Tarball - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - shell: bash - run: | - python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" - cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - - - name: Set up Python ${{ inputs.python-version }} - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 - with: - python-version: "${{ inputs.python-version }}" - - - name: Install System Dependencies - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - brew install openssl@3 - - - name: Install Nox - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' - - - name: Install Dependencies - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - env: - PRINT_TEST_SELECTION: "0" - PRINT_SYSTEM_INFO: "0" - run: | - export PYCURL_SSL_LIBRARY=openssl - export LDFLAGS="-L/usr/local/opt/openssl@3/lib" - export CPPFLAGS="-I/usr/local/opt/openssl@3/include" - export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" - nox --install-only -e ${{ inputs.nox-session }} - - - name: Cleanup .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - nox --force-color -e "pre-archive-cleanup(pkg=False)" - - - name: Compress .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - nox --force-color -e compress-dependencies -- ${{ inputs.distro-slug }} - - - name: Upload Nox Requirements Tarball - uses: actions/upload-artifact@v3 - with: - name: nox-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - path: nox.${{ inputs.distro-slug }}.tar.* diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 0d596c0e1dcf..fcdd9f377144 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -4,10 +4,6 @@ name: Install Test Dependencies on: workflow_call: inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against nox-session: required: true type: string @@ -20,18 +16,14 @@ on: required: true type: string description: Seed used to invalidate caches - platform: - required: true - type: string - description: The platform being tested - arch: - required: true - type: string - description: The platform arch being tested nox-version: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -53,13 +45,219 @@ env: jobs: - dependencies: - name: Install + linux-dependencies: + name: Linux + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - distro-slug: centos-7 + arch: x86_64 + - distro-slug: centos-7-arm64 + arch: arm64 + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + 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: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-linux-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.linux.${{ matrix.arch }}.tar.* + + macos-dependencies: + name: MacOS + runs-on: ${{ matrix.distro-slug }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - distro-slug: macos-12 + arch: x86_64 + - distro-slug: macos-13-xlarge + arch: arm64 + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz + + - name: Set up Python ${{ inputs.python-version }} + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install System Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + brew install openssl@3 + + - name: Install Nox + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" + run: | + export PYCURL_SSL_LIBRARY=openssl + export LDFLAGS="-L/usr/local/opt/openssl@3/lib" + export CPPFLAGS="-I/usr/local/opt/openssl@3/include" + export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" + nox --install-only -e ${{ inputs.nox-session }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e "pre-archive-cleanup(pkg=False)" + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e compress-dependencies -- macos ${{ matrix.arch }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.macos.${{ matrix.arch }}.tar.* + + windows-dependencies: + name: Windows runs-on: - self-hosted - linux - bastion timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - distro-slug: windows-2022 + arch: amd64 steps: - name: "Throttle Builds" @@ -70,20 +268,18 @@ jobs: - name: Checkout Source Code uses: actions/checkout@v4 - - name: Cache nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Cache nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} id: nox-dependencies-cache uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -92,7 +288,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - name: PyPi Proxy if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -116,45 +312,45 @@ jobs: if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' id: spin-up-vm run: | - tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} - name: List Free Space if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true - name: Upload Checkout To VM if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm rsync ${{ inputs.distro-slug }} + tools --timestamps vm rsync ${{ matrix.distro-slug }} - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm pre-archive-cleanup ${{ inputs.distro-slug }} + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm compress-dependencies ${{ inputs.distro-slug }} + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} - name: Download Compressed .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm download-dependencies ${{ inputs.distro-slug }} + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} - name: Destroy VM if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 with: - name: nox-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - path: nox.${{ inputs.distro-slug }}.tar.* + name: nox-windows-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.windows.${{ matrix.arch }}.tar.* diff --git a/.github/workflows/build-deps-onedir-linux.yml b/.github/workflows/build-deps-onedir-linux.yml deleted file mode 100644 index 8d149c462611..000000000000 --- a/.github/workflows/build-deps-onedir-linux.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -name: Build Packaging Dependencies Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-deps-linux: - name: Linux - if: ${{ inputs.self-hosted-runners }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-deps-linux-${{ matrix.arch }} - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: linux - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt Packaging Dependencies into Relenv Onedir - uses: ./.github/actions/build-onedir-deps - with: - platform: linux - arch: ${{ matrix.arch }} - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-deps-onedir-macos.yml b/.github/workflows/build-deps-onedir-macos.yml deleted file mode 100644 index 2886c3f993d1..000000000000 --- a/.github/workflows/build-deps-onedir-macos.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -name: Build Packaging Dependencies Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-deps-macos: - name: macOS - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-deps-macos - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: darwin - arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt Packaging Dependencies into Relenv Onedir - uses: ./.github/actions/build-onedir-deps - with: - platform: darwin - arch: ${{ matrix.arch }} - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-deps-onedir-windows.yml b/.github/workflows/build-deps-onedir-windows.yml deleted file mode 100644 index af741e062242..000000000000 --- a/.github/workflows/build-deps-onedir-windows.yml +++ /dev/null @@ -1,86 +0,0 @@ ---- -name: Build Packaging Dependencies Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-deps-windows: - name: Windows - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86 - - amd64 - runs-on: windows-latest - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-deps-windows-${{ matrix.arch }} - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: windows - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt Packaging Dependencies into Relenv Onedir - uses: ./.github/actions/build-onedir-deps - with: - platform: windows - arch: ${{ matrix.arch }} - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-deps-onedir.yml b/.github/workflows/build-deps-onedir.yml new file mode 100644 index 000000000000..d99fc0e24610 --- /dev/null +++ b/.github/workflows/build-deps-onedir.yml @@ -0,0 +1,181 @@ +--- +name: Build Packaging Dependencies Onedir + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + github-hosted-runners: + type: boolean + required: true + self-hosted-runners: + type: boolean + required: true + cache-seed: + required: true + type: string + description: Seed used to invalidate caches + relenv-version: + required: true + type: string + description: The version of relenv to use + python-version: + required: true + type: string + description: The version of python to use with relenv + +env: + RELENV_DATA: "${{ github.workspace }}/.relenv" + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + build-deps-linux: + name: Linux + if: ${{ inputs.self-hosted-runners }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - arm64 + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-deps-linux-${{ matrix.arch }} + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: linux + arch: ${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt Packaging Dependencies into Relenv Onedir + uses: ./.github/actions/build-onedir-deps + with: + platform: linux + arch: ${{ matrix.arch }} + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-deps-macos: + name: macOS + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86_64 + - arm64 + runs-on: + - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} + + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-deps-macos + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: macos + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt Packaging Dependencies into Relenv Onedir + uses: ./.github/actions/build-onedir-deps + with: + platform: macos + arch: ${{ matrix.arch }} + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-deps-windows: + name: Windows + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86 + - amd64 + runs-on: windows-latest + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-deps-windows-${{ matrix.arch }} + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: windows + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt Packaging Dependencies into Relenv Onedir + uses: ./.github/actions/build-onedir-deps + with: + platform: windows + arch: ${{ matrix.arch }} + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 2afb5d8ce29d..a2692d7ac1f4 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -24,10 +24,7 @@ jobs: build: name: Build runs-on: - - self-hosted - - linux - - medium - - x86_64 + - ubuntu-latest strategy: fail-fast: false matrix: diff --git a/.github/workflows/build-macos-packages.yml b/.github/workflows/build-macos-packages.yml deleted file mode 100644 index 9b3324893abd..000000000000 --- a/.github/workflows/build-macos-packages.yml +++ /dev/null @@ -1,158 +0,0 @@ ---- -name: Build macOS Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - sign-packages: - type: boolean - default: false - description: Sign Packages - environment: - type: string - description: The GitHub Environment where this workflow should run - default: ci - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-pkgs: - name: macOS - environment: ${{ inputs.environment }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - source: - - ${{ inputs.source }} - - runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - name: Check Package Signing Enabled - shell: bash - id: check-pkg-sign - run: | - if [ "${{ inputs.sign-packages }}" == "true" ]; then - if [ "${{ (secrets.MAC_SIGN_APPLE_ACCT != '' && contains(fromJSON('["nightly", "staging"]'), inputs.environment)) && 'true' || 'false' }}" != "true" ]; then - MSG="Secrets for signing packages are not available. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - else - MSG="The packages created WILL be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" - fi - else - MSG="The sign-packages input is false. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - fi - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz - path: artifacts/ - - - name: Prepare Package Signing - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - run: | - echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12 - echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12 - # Create SaltSigning keychain. This will contain the certificates for signing - security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" - # Append SaltSigning keychain to the search list - security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)" - # Unlock the keychain so we can import certs - security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" - # Developer Application Certificate - security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A - rm app-cert.p12 - # Developer Installer Certificate - security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A - rm install-cert.p12 - security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null - - - name: Build MacOS Package - env: - DEV_APP_CERT: "${{ secrets.MAC_SIGN_DEV_APP_CERT }}" - DEV_INSTALL_CERT: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT }}" - APPLE_ACCT: "${{ secrets.MAC_SIGN_APPLE_ACCT }}" - APPLE_TEAM_ID: "${{ secrets.MAC_SIGN_APPLE_TEAM_ID }}" - APP_SPEC_PWD: "${{ secrets.MAC_SIGN_APP_SPEC_PWD }}" - run: | - tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format( - '--onedir salt-{0}-onedir-darwin-{1}.tar.xz --salt-version {0} {2}', - inputs.salt-version, - matrix.arch, - steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' - ) - || - format('--salt-version {0}', inputs.salt-version) - }} - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload ${{ matrix.arch }} Package - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: pkg/macos/salt-${{ inputs.salt-version }}-py3-*.pkg - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml new file mode 100644 index 000000000000..6e1ec435da03 --- /dev/null +++ b/.github/workflows/build-packages.yml @@ -0,0 +1,461 @@ +--- +name: Build Packages + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + relenv-version: + type: string + required: true + description: The relenv version to set prior to building packages. + python-version: + required: true + type: string + description: The version of python to use with relenv + sign-macos-packages: + type: boolean + default: false + description: Sign MacOS Packages + sign-windows-packages: + type: boolean + default: false + description: Sign Windows Packages + environment: + type: string + description: The GitHub Environment where this workflow should run + default: ci + source: + required: true + type: string + description: The backend to build the packages with + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + +env: + COLUMNS: 190 + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + build-macos-pkgs: + name: macOS + environment: ${{ inputs.environment }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - arm64 + source: + - ${{ inputs.source }} + + runs-on: + - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} + + steps: + - name: Check Package Signing Enabled + shell: bash + id: check-pkg-sign + run: | + if [ "${{ inputs.sign-macos-packages }}" == "true" ]; then + if [ "${{ (secrets.MAC_SIGN_APPLE_ACCT != '' && contains(fromJSON('["nightly", "staging"]'), inputs.environment)) && 'true' || 'false' }}" != "true" ]; then + MSG="Secrets for signing packages are not available. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + else + MSG="The packages created WILL be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" + fi + else + MSG="The sign-macos-packages input is false. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + fi + + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Prepare Package Signing + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + run: | + echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12 + echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12 + # Create SaltSigning keychain. This will contain the certificates for signing + security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" + # Append SaltSigning keychain to the search list + security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)" + # Unlock the keychain so we can import certs + security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" + # Developer Application Certificate + security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A + rm app-cert.p12 + # Developer Installer Certificate + security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A + rm install-cert.p12 + security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null + + - name: Build MacOS Package + env: + DEV_APP_CERT: "${{ secrets.MAC_SIGN_DEV_APP_CERT }}" + DEV_INSTALL_CERT: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT }}" + APPLE_ACCT: "${{ secrets.MAC_SIGN_APPLE_ACCT }}" + APPLE_TEAM_ID: "${{ secrets.MAC_SIGN_APPLE_TEAM_ID }}" + APP_SPEC_PWD: "${{ secrets.MAC_SIGN_APP_SPEC_PWD }}" + run: | + tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format( + '--onedir salt-{0}-onedir-macos-{1}.tar.xz --salt-version {0} {2}', + inputs.salt-version, + matrix.arch, + steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' + ) + || + format('--salt-version {0}', inputs.salt-version) + }} + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload ${{ matrix.arch }} Package + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: pkg/macos/salt-${{ inputs.salt-version }}-py3-*.pkg + retention-days: 7 + if-no-files-found: error + + build-deb-packages: + name: DEB + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - arm64 + source: + - ${{ inputs.source }} + + container: + image: ghcr.io/saltstack/salt-ci-containers/packaging:debian-12 + + steps: + # Checkout here so we can easily use custom actions + - uses: actions/checkout@v4 + + # Checkout here for the build process + - name: Checkout in build directory + uses: actions/checkout@v4 + with: + path: + pkgs/checkout/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: pkgs/checkout/artifacts/ + + - name: Download Release Patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}.patch + path: pkgs/checkout/ + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cwd: pkgs/checkout/ + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + cwd: pkgs/checkout/ + + - name: Configure Git + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + working-directory: pkgs/checkout/ + run: | + tools pkg configure-git + + - name: Apply release patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + working-directory: pkgs/checkout/ + run: | + tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete + + - name: Build Deb + working-directory: pkgs/checkout/ + run: | + tools pkg build deb --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) + || + format('--arch={0}', matrix.arch) + }} + + - name: Cleanup + run: | + rm -rf pkgs/checkout/ + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload DEBs + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: ${{ github.workspace }}/pkgs/* + retention-days: 7 + if-no-files-found: error + + build-rpm-packages: + name: RPM + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - arm64 + source: + - ${{ inputs.source }} + + container: + image: ghcr.io/saltstack/salt-ci-containers/packaging:centosstream-9 + + steps: + - uses: actions/checkout@v4 + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Download Release Patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}.patch + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Configure Git + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools pkg configure-git + + - name: Apply release patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete + + - name: Build RPM + run: | + tools pkg build rpm --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) + || + format('--arch={0}', matrix.arch) + }} + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload RPMs + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: ~/rpmbuild/RPMS/*/*.rpm + retention-days: 7 + if-no-files-found: error + + build-windows-pkgs: + name: Windows + environment: ${{ inputs.environment }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86 + - amd64 + source: + - ${{ inputs.source }} + + runs-on: + - windows-latest + env: + SM_HOST: "${{ secrets.WIN_SIGN_HOST_PROD }}" + SM_API_KEY: "${{ secrets.WIN_SIGN_API_KEY }}" + SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12" + SM_CLIENT_CERT_PASSWORD: "${{ secrets.WIN_SIGN_CERT_PASSWORD }}" + SM_CLIENT_CERT_FILE_B64: "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" + WIN_SIGN_CERT_SHA1_HASH: "${{ secrets.WIN_SIGN_CERT_SHA1_HASH }}" + + steps: + - name: Check Package Signing Enabled + shell: bash + id: check-pkg-sign + run: | + if [ "${{ inputs.sign-windows-packages }}" == "true" ]; then + if [ "${{ (secrets.WIN_SIGN_API_KEY != '' && env.SM_HOST != '' && inputs.environment == 'staging') && 'true' || 'false' }}" != "true" ]; then + MSG="Secrets for signing packages are not available. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + else + MSG="The packages created WILL be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" + fi + else + MSG="The sign-windows-packages input is false. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + fi + + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.zip + path: artifacts/ + + - name: Code signing with Software Trust Manager + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + uses: digicert/ssm-code-signing@v0.0.2 + + - name: Setup Certificate + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + shell: bash + run: | + echo "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12 + + - name: Build Windows Packages + run: | + tools pkg build windows --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format( + '--onedir salt-{0}-onedir-windows-{1}.zip --salt-version {0} --arch {1} {2}', + inputs.salt-version, + matrix.arch, + steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' + ) + || + format('--salt-version {0} --arch {1}', inputs.salt-version, matrix.arch) + }} + + - name: Set Artifact Name + id: set-artifact-name + shell: bash + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS" >> "$GITHUB_OUTPUT" + echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI" >> "$GITHUB_OUTPUT" + else + echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS-from-src" >> "$GITHUB_OUTPUT" + echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload ${{ matrix.arch }} NSIS Packages + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name-nsis }} + path: pkg/windows/build/Salt-*.exe + retention-days: 7 + if-no-files-found: error + + - name: Upload ${{ matrix.arch }} MSI Package + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name-msi }} + path: pkg/windows/build/Salt-*.msi + retention-days: 7 + if-no-files-found: error diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml deleted file mode 100644 index 1b2103700c94..000000000000 --- a/.github/workflows/build-rpm-packages.yml +++ /dev/null @@ -1,114 +0,0 @@ ---- -name: Build RPM Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - build: - name: RPM - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - source: - - ${{ inputs.source }} - - container: - image: ghcr.io/saltstack/salt-ci-containers/packaging:centosstream-9 - - steps: - - uses: actions/checkout@v4 - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - path: artifacts/ - - - name: Download Release Patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}.patch - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Configure Git - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools pkg configure-git - - - name: Apply release patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete - - - name: Build RPM - run: | - tools pkg build rpm --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) - || - format('--arch={0}', matrix.arch) - }} - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload RPMs - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: ~/rpmbuild/RPMS/${{ matrix.arch }}/*.rpm - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/build-salt-onedir-linux.yml b/.github/workflows/build-salt-onedir-linux.yml deleted file mode 100644 index a7e197b760c0..000000000000 --- a/.github/workflows/build-salt-onedir-linux.yml +++ /dev/null @@ -1,90 +0,0 @@ ---- -name: Build Salt Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-salt-linux: - name: Linux - if: ${{ inputs.self-hosted-runners }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-windows - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Setup Relenv - uses: ./.github/actions/setup-relenv - id: setup-relenv - with: - platform: linux - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt into Relenv Onedir - uses: ./.github/actions/build-onedir-salt - with: - platform: linux - arch: ${{ matrix.arch }} - salt-version: "${{ inputs.salt-version }}" - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-salt-onedir-macos.yml b/.github/workflows/build-salt-onedir-macos.yml deleted file mode 100644 index 3697e51e3f09..000000000000 --- a/.github/workflows/build-salt-onedir-macos.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: Build Salt Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-salt-macos: - name: macOS - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: darwin - arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Install Salt into Relenv Onedir - uses: ./.github/actions/build-onedir-salt - with: - platform: darwin - arch: ${{ matrix.arch }} - salt-version: "${{ inputs.salt-version }}" - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-salt-onedir-windows.yml b/.github/workflows/build-salt-onedir-windows.yml deleted file mode 100644 index aba0b4245530..000000000000 --- a/.github/workflows/build-salt-onedir-windows.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: Build Salt Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-salt-windows: - name: Windows - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86 - - amd64 - runs-on: windows-latest - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: windows - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Install Salt into Relenv Onedir - uses: ./.github/actions/build-onedir-salt - with: - platform: windows - arch: ${{ matrix.arch }} - salt-version: "${{ inputs.salt-version }}" - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-salt-onedir.yml b/.github/workflows/build-salt-onedir.yml new file mode 100644 index 000000000000..eb807bd7feda --- /dev/null +++ b/.github/workflows/build-salt-onedir.yml @@ -0,0 +1,200 @@ +--- +name: Build Salt Onedir + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + github-hosted-runners: + type: boolean + required: true + self-hosted-runners: + type: boolean + required: true + cache-seed: + required: true + type: string + description: Seed used to invalidate caches + relenv-version: + required: true + type: string + description: The version of relenv to use + python-version: + required: true + type: string + description: The version of python to use with relenv + +env: + RELENV_DATA: "${{ github.workspace }}/.relenv" + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + build-salt-linux: + name: Linux + if: ${{ inputs.self-hosted-runners }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - arm64 + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-windows + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Setup Relenv + uses: ./.github/actions/setup-relenv + id: setup-relenv + with: + platform: linux + arch: ${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt into Relenv Onedir + uses: ./.github/actions/build-onedir-salt + with: + platform: linux + arch: ${{ matrix.arch }} + salt-version: "${{ inputs.salt-version }}" + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-salt-macos: + name: macOS + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86_64 + - arm64 + runs-on: + - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} + + steps: + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: macos + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Install Salt into Relenv Onedir + uses: ./.github/actions/build-onedir-salt + with: + platform: macos + arch: ${{ matrix.arch }} + salt-version: "${{ inputs.salt-version }}" + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-salt-windows: + name: Windows + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86 + - amd64 + runs-on: windows-latest + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: windows + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Install Salt into Relenv Onedir + uses: ./.github/actions/build-onedir-salt + with: + platform: windows + arch: ${{ matrix.arch }} + salt-version: "${{ inputs.salt-version }}" + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-windows-packages.yml b/.github/workflows/build-windows-packages.yml deleted file mode 100644 index 5e8e46635259..000000000000 --- a/.github/workflows/build-windows-packages.yml +++ /dev/null @@ -1,164 +0,0 @@ ---- -name: Build Windows Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - sign-packages: - type: boolean - default: false - description: Sign Packages - environment: - type: string - description: The GitHub Environment where this workflow should run - default: ci - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-pkgs: - name: Windows - environment: ${{ inputs.environment }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86 - - amd64 - source: - - ${{ inputs.source }} - - runs-on: - - windows-latest - env: - SM_HOST: "${{ secrets.WIN_SIGN_HOST_PROD }}" - SM_API_KEY: "${{ secrets.WIN_SIGN_API_KEY }}" - SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12" - SM_CLIENT_CERT_PASSWORD: "${{ secrets.WIN_SIGN_CERT_PASSWORD }}" - SM_CLIENT_CERT_FILE_B64: "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" - WIN_SIGN_CERT_SHA1_HASH: "${{ secrets.WIN_SIGN_CERT_SHA1_HASH }}" - - steps: - - name: Check Package Signing Enabled - shell: bash - id: check-pkg-sign - run: | - if [ "${{ inputs.sign-packages }}" == "true" ]; then - if [ "${{ (secrets.WIN_SIGN_API_KEY != '' && env.SM_HOST != '' && inputs.environment == 'staging') && 'true' || 'false' }}" != "true" ]; then - MSG="Secrets for signing packages are not available. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - else - MSG="The packages created WILL be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" - fi - else - MSG="The sign-packages input is false. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - fi - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.zip - path: artifacts/ - - - name: Code signing with Software Trust Manager - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - uses: digicert/ssm-code-signing@v0.0.2 - - - name: Setup Certificate - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - shell: bash - run: | - echo "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12 - - - name: Build Windows Packages - run: | - tools pkg build windows --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format( - '--onedir salt-{0}-onedir-windows-{1}.zip --salt-version {0} --arch {1} {2}', - inputs.salt-version, - matrix.arch, - steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' - ) - || - format('--salt-version {0} --arch {1}', inputs.salt-version, matrix.arch) - }} - - - name: Set Artifact Name - id: set-artifact-name - shell: bash - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS" >> "$GITHUB_OUTPUT" - echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI" >> "$GITHUB_OUTPUT" - else - echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS-from-src" >> "$GITHUB_OUTPUT" - echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload ${{ matrix.arch }} NSIS Packages - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name-nsis }} - path: pkg/windows/build/Salt-*.exe - retention-days: 7 - if-no-files-found: error - - - name: Upload ${{ matrix.arch }} MSI Package - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name-msi }} - path: pkg/windows/build/Salt-*.msi - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffeb2dfef10f..9409808161e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} runners: ${{ steps.runner-types.outputs.runners }} @@ -48,6 +48,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -131,7 +132,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -164,6 +165,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Write Changed Files To A Local File run: echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json @@ -215,12 +221,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | @@ -240,1086 +240,259 @@ jobs: uses: actions/upload-artifact@v3 with: name: testrun-changed-files.txt - path: testrun-changed-files.txt - - - pre-commit: - name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - uses: ./.github/workflows/pre-commit-action.yml - needs: - - prepare-workflow - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} - pre-commit-version: "3.0.4" - - lint: - name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - uses: ./.github/workflows/lint-action.yml - needs: - - prepare-workflow - with: - changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} - - prepare-release: - name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} - needs: - - prepare-workflow - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Update Debian changelog - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-deb --draft - tools changelog update-deb - - - name: Update RPM changelog - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-rpm --draft - tools changelog update-rpm - - - name: Update Release Notes - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-release-notes --draft - tools changelog update-release-notes - - - name: Generate MAN Pages - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - env: - LATEST_RELEASE: "${{ needs.prepare-workflow.outputs.salt-version }}" - SALT_ON_SALTSTACK: "1" - run: | - tools docs man - - - name: Update Changelog - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-changelog-md --draft - tools changelog update-changelog-md - - - name: Show Changes Diff - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git diff --color - - - name: Configure Git - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git config --global user.name "Salt Project Packaging" - git config --global user.email saltproject-packaging@vmware.com - - - name: Setup Pre-Commit - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: ./.github/actions/setup-pre-commit - with: - version: "3.0.4" - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Commit Changes - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - env: - SKIP: lint-salt,lint-tests - PRE_COMMIT_COLOR: always - run: | - # Run it twice so that pre-commit can fix anything that can be automatically fixed. - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Create release changes patch - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - - - name: Upload Changes Diff Artifact - uses: actions/upload-artifact@v3 - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - retention-days: 7 - if-no-files-found: error - - build-docs: - name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-source-tarball - uses: ./.github/workflows/build-docs.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-source-tarball: - name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Build Source Tarball - uses: ./.github/actions/build-source-tarball - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-deps-onedir-linux: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-linux - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-macos - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-rpm-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-rpm-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-macos-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - windows-2016-ci-deps: - name: Windows 2016 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-12-ci-deps: - name: macOS 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + path: testrun-changed-files.txt - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + + pre-commit: + name: Pre-Commit + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} + changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} + pre-commit-version: "3.0.4" - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + lint: + name: Lint + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + prepare-release: + name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + runs-on: ubuntu-latest needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + steps: + - uses: actions/checkout@v4 - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + + - name: Update Debian changelog + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-deb --draft + tools changelog update-deb + + - name: Update RPM changelog + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-rpm --draft + tools changelog update-rpm + + - name: Update Release Notes + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-release-notes --draft + tools changelog update-release-notes + + - name: Generate MAN Pages + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + env: + LATEST_RELEASE: "${{ needs.prepare-workflow.outputs.salt-version }}" + SALT_ON_SALTSTACK: "1" + run: | + tools docs man + + - name: Update Changelog + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-changelog-md --draft + tools changelog update-changelog-md + + - name: Show Changes Diff + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git diff --color + + - name: Configure Git + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git config --global user.name "Salt Project Packaging" + git config --global user.email saltproject-packaging@vmware.com + + - name: Setup Pre-Commit + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: ./.github/actions/setup-pre-commit + with: + version: "3.0.4" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} + + - name: Commit Changes + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + env: + SKIP: lint-salt,lint-tests + PRE_COMMIT_COLOR: always + run: | + # Run it twice so that pre-commit can fix anything that can be automatically fixed. + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" + + - name: Create release changes patch + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + + - name: Upload Changes Diff Artifact + uses: actions/upload-artifact@v3 + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + retention-days: 7 + if-no-files-found: error + + build-docs: + name: Documentation + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-source-tarball + uses: ./.github/workflows/build-docs.yml with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-source-tarball: + name: Build Source Tarball + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - prepare-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + + - name: Build Source Tarball + uses: ./.github/actions/build-source-tarball + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + + build-deps-onedir: + name: Build Dependencies Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + needs: + - prepare-workflow + uses: ./.github/workflows/build-deps-onedir.yml with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-salt-onedir: + name: Build Salt Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-deps-onedir + - build-source-tarball + uses: ./.github/workflows/build-salt-onedir.yml with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-onedir: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "onedir" - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-src: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "src" + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux + - build-salt-onedir uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir - platform: linux - arch: aarch64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1333,20 +506,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1355,15 +529,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1377,20 +552,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1399,15 +575,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1421,15 +598,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1443,15 +621,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1465,20 +644,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1487,15 +667,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1509,15 +690,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1531,20 +713,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1553,15 +736,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1575,20 +759,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1597,15 +782,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1619,20 +805,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1641,15 +828,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1663,6 +851,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -1670,14 +859,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1686,6 +875,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -1693,9 +883,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1709,6 +899,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -1716,14 +907,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1732,6 +923,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -1739,9 +931,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1755,20 +947,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1777,15 +970,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1799,20 +993,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1821,19 +1016,20 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-12-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1843,19 +1039,20 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1865,20 +1062,21 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1887,15 +1085,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1909,15 +1108,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1931,15 +1131,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -1953,15 +1154,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -1975,15 +1177,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -1997,15 +1200,16 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2019,14 +1223,15 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2041,14 +1246,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2063,14 +1269,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2085,18 +1292,19 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2107,18 +1315,19 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2129,19 +1338,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2151,14 +1361,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2173,14 +1384,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2195,14 +1407,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2217,19 +1430,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2239,14 +1453,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2261,19 +1476,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2283,14 +1499,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2305,14 +1522,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2327,14 +1545,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2349,14 +1568,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2371,14 +1591,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2393,14 +1614,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2415,19 +1637,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2437,14 +1660,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2459,19 +1683,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2481,14 +1706,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2503,14 +1729,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2525,14 +1752,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2547,14 +1775,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2569,19 +1798,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2591,14 +1821,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2613,6 +1844,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -2620,13 +1852,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2636,6 +1868,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -2643,8 +1876,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2659,6 +1892,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -2666,13 +1900,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2682,6 +1916,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -2689,8 +1924,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2705,19 +1940,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2727,14 +1963,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2749,19 +1986,20 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2771,54 +2009,15 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} - needs: - - prepare-workflow - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + runs-on: ubuntu-latest + needs: + - prepare-workflow + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2857,8 +2056,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -2963,64 +2161,17 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - combine-all-code-coverage - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/lint-action.yml b/.github/workflows/lint-action.yml index 347ddd291986..fb414dd96102 100644 --- a/.github/workflows/lint-action.yml +++ b/.github/workflows/lint-action.yml @@ -18,7 +18,7 @@ env: jobs: Salt: name: Lint Salt's Source Code - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "large", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['lint'] }} container: @@ -62,7 +62,7 @@ jobs: Tests: name: Lint Salt's Test Suite - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "large", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['tests'] || fromJSON(inputs.changed-files)['lint'] }} container: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 62c58619c70d..cddac63041d7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -38,7 +38,7 @@ jobs: workflow-requirements: name: Check Workflow Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: @@ -65,7 +65,7 @@ jobs: trigger-branch-nightly-builds: name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements steps: @@ -77,7 +77,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }} needs: - workflow-requirements @@ -92,6 +92,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -175,7 +176,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -208,6 +209,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Write Changed Files To A Local File run: echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json @@ -259,12 +265,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | @@ -310,14 +310,14 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow steps: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -385,1002 +385,171 @@ jobs: if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} run: | git config --global user.name "Salt Project Packaging" - git config --global user.email saltproject-packaging@vmware.com - - - name: Setup Pre-Commit - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: ./.github/actions/setup-pre-commit - with: - version: "3.0.4" - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Commit Changes - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - env: - SKIP: lint-salt,lint-tests - PRE_COMMIT_COLOR: always - run: | - # Run it twice so that pre-commit can fix anything that can be automatically fixed. - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Create release changes patch - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - - - name: Upload Changes Diff Artifact - uses: actions/upload-artifact@v3 - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - retention-days: 7 - if-no-files-found: error - - build-docs: - name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-source-tarball - uses: ./.github/workflows/build-docs.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-source-tarball: - name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Build Source Tarball - uses: ./.github/actions/build-source-tarball - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-deps-onedir-linux: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-linux - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-macos - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-rpm-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-rpm-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: nightly - sign-packages: false - secrets: inherit - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - environment: nightly - sign-packages: false - secrets: inherit - - build-macos-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: nightly - sign-packages: true - secrets: inherit - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - environment: nightly - sign-packages: true - secrets: inherit - - windows-2016-ci-deps: - name: Windows 2016 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-12-ci-deps: - name: macOS 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + git config --global user.email saltproject-packaging@vmware.com - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Setup Pre-Commit + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: ./.github/actions/setup-pre-commit + with: + version: "3.0.4" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Commit Changes + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + env: + SKIP: lint-salt,lint-tests + PRE_COMMIT_COLOR: always + run: | + # Run it twice so that pre-commit can fix anything that can be automatically fixed. + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Create release changes patch + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Upload Changes Diff Artifact + uses: actions/upload-artifact@v3 + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + retention-days: 7 + if-no-files-found: error - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-docs: + name: Documentation + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-source-tarball + uses: ./.github/workflows/build-docs.yml with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-source-tarball: + name: Build Source Tarball + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - prepare-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Build Source Tarball + uses: ./.github/actions/build-source-tarball + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-deps-onedir: + name: Build Dependencies Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-onedir.yml with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-salt-onedir: + name: Build Salt Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-deps-onedir + - build-source-tarball + uses: ./.github/workflows/build-salt-onedir.yml with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-onedir: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "onedir" + environment: nightly + sign-macos-packages: true + sign-windows-packages: false + secrets: inherit - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-src: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "src" + environment: nightly + sign-macos-packages: true + sign-windows-packages: false + secrets: inherit + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux + - build-salt-onedir uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir - platform: linux - arch: aarch64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1394,20 +563,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1416,15 +586,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1438,20 +609,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1460,15 +632,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1482,15 +655,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1504,15 +678,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1526,20 +701,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1548,15 +724,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1570,15 +747,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1592,20 +770,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1614,15 +793,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1636,20 +816,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1658,15 +839,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1680,20 +862,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1702,15 +885,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1724,6 +908,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -1731,14 +916,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1747,6 +932,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -1754,9 +940,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1770,6 +956,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -1777,14 +964,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1793,6 +980,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -1800,9 +988,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1816,20 +1004,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1838,15 +1027,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1860,20 +1050,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1882,19 +1073,20 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-12-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1904,19 +1096,20 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1926,20 +1119,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1948,15 +1142,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1970,15 +1165,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1992,15 +1188,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2014,15 +1211,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2036,15 +1234,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2058,15 +1257,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2080,14 +1280,15 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2102,14 +1303,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2124,14 +1326,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2146,18 +1349,19 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2168,18 +1372,19 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2190,19 +1395,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2212,14 +1418,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2234,14 +1441,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2256,14 +1464,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2278,19 +1487,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2300,14 +1510,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2322,19 +1533,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2344,14 +1556,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2366,14 +1579,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2388,14 +1602,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2410,14 +1625,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2432,14 +1648,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2454,14 +1671,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2476,19 +1694,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2498,14 +1717,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2520,19 +1740,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2542,14 +1763,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2564,14 +1786,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2586,14 +1809,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2608,14 +1832,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2630,19 +1855,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2652,14 +1878,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2674,6 +1901,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -2681,13 +1909,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2697,6 +1925,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -2704,8 +1933,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2720,6 +1949,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -2727,13 +1957,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2743,6 +1973,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -2750,8 +1981,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2766,19 +1997,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2788,14 +2020,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2810,19 +2043,20 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2832,54 +2066,15 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} - needs: - - prepare-workflow - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + runs-on: ubuntu-latest + needs: + - prepare-workflow + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2918,8 +2113,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -3128,7 +2322,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-deb-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3140,7 +2334,7 @@ jobs: - pkg-type: deb distro: debian version: "10" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "11" @@ -3148,7 +2342,7 @@ jobs: - pkg-type: deb distro: debian version: "11" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "12" @@ -3156,7 +2350,7 @@ jobs: - pkg-type: deb distro: debian version: "12" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "20.04" @@ -3164,7 +2358,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "20.04" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "22.04" @@ -3172,7 +2366,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "22.04" - arch: aarch64 + arch: arm64 steps: - uses: actions/checkout@v4 @@ -3257,7 +2451,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-rpm-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3417,7 +2611,7 @@ jobs: - name: Download RPM Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}-rpm + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -3481,7 +2675,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-windows-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3583,7 +2777,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-macos-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3613,7 +2807,7 @@ jobs: - name: Download macOS Arch64 Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-aarch64-macos + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -3673,9 +2867,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir strategy: fail-fast: false matrix: @@ -3702,22 +2894,22 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz path: artifacts/pkgs/incoming - - name: Download Linux aarch64 Onedir Archive + - name: Download Linux arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS x86_64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive @@ -3808,47 +3000,7 @@ jobs: - build-windows-repo - build-macos-repo - build-onedir-repo - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -3925,7 +3077,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: nightly needs: - workflow-requirements @@ -3934,16 +3086,9 @@ jobs: - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - combine-all-code-coverage - publish-repositories - amazonlinux-2-pkg-tests diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index 4c1a34e2f4ab..658dbf5cc4d1 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -21,7 +21,7 @@ jobs: Pre-Commit: name: Run Pre-Commit Against Salt - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest container: image: ghcr.io/saltstack/salt-ci-containers/python:3.10 diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 2908fd96f43c..66c16da7f973 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -31,7 +31,7 @@ jobs: permissions: contents: write # for dev-drprasad/delete-tag-and-release to delete tags or releases name: Generate Tag and Github Release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: dev-drprasad/delete-tag-and-release@v0.2.0 if: github.event.inputs.reTag == 'true' @@ -54,7 +54,7 @@ jobs: custom_tag: ${{ github.event.inputs.saltVersion }} - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/release-update-winrepo.yml b/.github/workflows/release-update-winrepo.yml index 4eac8c2c836c..2c5630034b8a 100644 --- a/.github/workflows/release-update-winrepo.yml +++ b/.github/workflows/release-update-winrepo.yml @@ -19,7 +19,7 @@ permissions: jobs: update-winrepo: name: Update Winrepo - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - name: Checkout Salt @@ -34,7 +34,7 @@ jobs: repository: twangboy/salt-winrepo-ng - name: Set Up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/release-upload-virustotal.yml b/.github/workflows/release-upload-virustotal.yml index da13d83ca806..50e71594d50c 100644 --- a/.github/workflows/release-upload-virustotal.yml +++ b/.github/workflows/release-upload-virustotal.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Set Up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b2ce992589b..9c624505c342 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: check-requirements: name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: release-check steps: - name: Check For Admin Permission @@ -58,13 +58,14 @@ jobs: cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # Full clone to also get the tags to get the right salt version - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -106,16 +107,16 @@ jobs: run: | tools ci get-releases - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - - name: Set Cache Seed Output id: set-cache-seed run: | tools ci define-cache-seed ${{ env.CACHE_SEED }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + download-onedir-artifact: name: Download Staging Onedir Artifact runs-on: @@ -132,15 +133,15 @@ jobs: - platform: linux arch: x86_64 - platform: linux - arch: aarch64 + arch: arm64 - platform: windows arch: amd64 - platform: windows arch: x86 - - platform: darwin + - platform: macos arch: x86_64 - - platform: darwin - arch: aarch64 + - platform: macos + arch: arm64 steps: - uses: actions/checkout@v4 @@ -166,662 +167,19 @@ jobs: path: artifacts/salt-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz* retention-days: 7 if-no-files-found: error - - windows-2016-ci-deps: - name: Windows 2016 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-12-ci-deps: - name: macOS 12 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-ci-deps: - name: macOS 13 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-ci-deps: - name: Photon OS 4 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-ci-deps: - name: Photon OS 5 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps + build-ci-deps: + name: CI Deps needs: - prepare-workflow - download-onedir-artifact uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir - platform: linux - arch: aarch64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" backup: name: Backup @@ -894,43 +252,7 @@ jobs: needs: - prepare-workflow - publish-repositories - - almalinux-8-arm64-ci-deps - - almalinux-8-ci-deps - - almalinux-9-arm64-ci-deps - - almalinux-9-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2023-arm64-ci-deps - - amazonlinux-2023-ci-deps - - centos-7-arm64-ci-deps - - centos-7-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-9-arm64-ci-deps - - centosstream-9-ci-deps - - debian-10-ci-deps - - debian-11-arm64-ci-deps - - debian-11-ci-deps - - debian-12-arm64-ci-deps - - debian-12-ci-deps - - fedora-37-arm64-ci-deps - - fedora-37-ci-deps - - fedora-38-arm64-ci-deps - - fedora-38-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - photonos-3-arm64-ci-deps - - photonos-3-ci-deps - - photonos-4-arm64-ci-deps - - photonos-4-ci-deps - - photonos-5-arm64-ci-deps - - photonos-5-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2204-arm64-ci-deps - - ubuntu-2204-ci-deps - - windows-2022-ci-deps + - build-ci-deps - download-onedir-artifact uses: ./.github/workflows/test-package-downloads-action.yml with: @@ -942,6 +264,7 @@ jobs: python-version: "3.10" skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" secrets: inherit release: @@ -1114,7 +437,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - check-requirements - prepare-workflow @@ -1122,47 +445,7 @@ jobs: - pkg-download-tests - release - publish-pypi - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - build-ci-deps steps: - name: Get workflow information id: get-workflow-info diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index c03929fc970e..50c3e43ee3cc 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -28,7 +28,7 @@ jobs: workflow-requirements: name: Check Workflow Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: @@ -55,7 +55,7 @@ jobs: trigger-branch-scheduled-builds: name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements steps: @@ -67,7 +67,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }} needs: - workflow-requirements @@ -82,6 +82,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -165,7 +166,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -198,6 +199,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Write Changed Files To A Local File run: echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json @@ -249,12 +255,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | @@ -274,1086 +274,259 @@ jobs: uses: actions/upload-artifact@v3 with: name: testrun-changed-files.txt - path: testrun-changed-files.txt - - - pre-commit: - name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - uses: ./.github/workflows/pre-commit-action.yml - needs: - - prepare-workflow - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} - pre-commit-version: "3.0.4" - - lint: - name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - uses: ./.github/workflows/lint-action.yml - needs: - - prepare-workflow - with: - changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} - - prepare-release: - name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} - needs: - - prepare-workflow - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Update Debian changelog - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-deb --draft - tools changelog update-deb - - - name: Update RPM changelog - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-rpm --draft - tools changelog update-rpm - - - name: Update Release Notes - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-release-notes --draft - tools changelog update-release-notes - - - name: Generate MAN Pages - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - env: - LATEST_RELEASE: "${{ needs.prepare-workflow.outputs.salt-version }}" - SALT_ON_SALTSTACK: "1" - run: | - tools docs man - - - name: Update Changelog - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools changelog update-changelog-md --draft - tools changelog update-changelog-md - - - name: Show Changes Diff - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git diff --color - - - name: Configure Git - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git config --global user.name "Salt Project Packaging" - git config --global user.email saltproject-packaging@vmware.com - - - name: Setup Pre-Commit - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: ./.github/actions/setup-pre-commit - with: - version: "3.0.4" - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Commit Changes - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - env: - SKIP: lint-salt,lint-tests - PRE_COMMIT_COLOR: always - run: | - # Run it twice so that pre-commit can fix anything that can be automatically fixed. - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Create release changes patch - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - - - name: Upload Changes Diff Artifact - uses: actions/upload-artifact@v3 - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - retention-days: 7 - if-no-files-found: error - - build-docs: - name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-source-tarball - uses: ./.github/workflows/build-docs.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-source-tarball: - name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Build Source Tarball - uses: ./.github/actions/build-source-tarball - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-deps-onedir-linux: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-linux - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-macos - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-rpm-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-rpm-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-macos-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - windows-2016-ci-deps: - name: Windows 2016 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-12-ci-deps: - name: macOS 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + path: testrun-changed-files.txt - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + + pre-commit: + name: Pre-Commit + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} + changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} + pre-commit-version: "3.0.4" - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + lint: + name: Lint + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + prepare-release: + name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + runs-on: ubuntu-latest needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + steps: + - uses: actions/checkout@v4 - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + + - name: Update Debian changelog + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-deb --draft + tools changelog update-deb + + - name: Update RPM changelog + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-rpm --draft + tools changelog update-rpm + + - name: Update Release Notes + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-release-notes --draft + tools changelog update-release-notes + + - name: Generate MAN Pages + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + env: + LATEST_RELEASE: "${{ needs.prepare-workflow.outputs.salt-version }}" + SALT_ON_SALTSTACK: "1" + run: | + tools docs man + + - name: Update Changelog + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools changelog update-changelog-md --draft + tools changelog update-changelog-md + + - name: Show Changes Diff + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git diff --color + + - name: Configure Git + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git config --global user.name "Salt Project Packaging" + git config --global user.email saltproject-packaging@vmware.com + + - name: Setup Pre-Commit + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: ./.github/actions/setup-pre-commit + with: + version: "3.0.4" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} + + - name: Commit Changes + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + env: + SKIP: lint-salt,lint-tests + PRE_COMMIT_COLOR: always + run: | + # Run it twice so that pre-commit can fix anything that can be automatically fixed. + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" + + - name: Create release changes patch + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + + - name: Upload Changes Diff Artifact + uses: actions/upload-artifact@v3 + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + retention-days: 7 + if-no-files-found: error + + build-docs: + name: Documentation + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-source-tarball + uses: ./.github/workflows/build-docs.yml with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-source-tarball: + name: Build Source Tarball + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - prepare-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + + - name: Build Source Tarball + uses: ./.github/actions/build-source-tarball + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + + build-deps-onedir: + name: Build Dependencies Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + needs: + - prepare-workflow + uses: ./.github/workflows/build-deps-onedir.yml with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-salt-onedir: + name: Build Salt Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-deps-onedir + - build-source-tarball + uses: ./.github/workflows/build-salt-onedir.yml with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-onedir: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "onedir" - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-src: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "src" + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux + - build-salt-onedir uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir - platform: linux - arch: aarch64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1367,20 +540,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1389,15 +563,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1411,20 +586,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1433,15 +609,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1455,15 +632,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1477,15 +655,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1499,20 +678,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1521,15 +701,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1543,15 +724,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1565,20 +747,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1587,15 +770,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1609,20 +793,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1631,15 +816,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1653,20 +839,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1675,15 +862,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1697,6 +885,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -1704,14 +893,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1720,6 +909,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -1727,9 +917,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1743,6 +933,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -1750,14 +941,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1766,6 +957,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -1773,9 +965,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1789,20 +981,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1811,15 +1004,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1833,20 +1027,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1855,19 +1050,20 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-12-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1877,19 +1073,20 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1899,20 +1096,21 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1921,15 +1119,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1943,15 +1142,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1965,15 +1165,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -1987,15 +1188,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2009,15 +1211,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2031,15 +1234,16 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2053,14 +1257,15 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2075,14 +1280,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2097,14 +1303,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2119,18 +1326,19 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2141,18 +1349,19 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2163,19 +1372,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2185,14 +1395,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2207,14 +1418,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2229,14 +1441,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2251,19 +1464,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2273,14 +1487,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2295,19 +1510,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2317,14 +1533,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2339,14 +1556,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2361,14 +1579,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2383,14 +1602,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2405,14 +1625,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2427,14 +1648,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2449,19 +1671,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2471,14 +1694,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2493,19 +1717,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2515,14 +1740,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2537,14 +1763,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2559,14 +1786,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2581,14 +1809,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2603,19 +1832,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2625,14 +1855,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2647,6 +1878,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -2654,13 +1886,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2670,6 +1902,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -2677,8 +1910,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2693,6 +1926,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -2700,13 +1934,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2716,6 +1950,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -2723,8 +1958,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2739,19 +1974,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2761,14 +1997,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2783,19 +2020,20 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2805,54 +2043,15 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} - needs: - - prepare-workflow - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + runs-on: ubuntu-latest + needs: + - prepare-workflow + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2891,8 +2090,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -2997,7 +2195,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements - trigger-branch-scheduled-builds @@ -3005,58 +2203,11 @@ jobs: - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - combine-all-code-coverage - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 0940d371b7ef..f864c0537cc2 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -53,7 +53,7 @@ jobs: check-requirements: name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: staging-check steps: - name: Check For Admin Permission @@ -64,7 +64,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - check-requirements outputs: @@ -78,6 +78,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -161,7 +162,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -194,6 +195,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Check Existing Releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -254,12 +260,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | @@ -373,1004 +373,173 @@ jobs: - name: Configure Git shell: bash if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git config --global user.name "Salt Project Packaging" - git config --global user.email saltproject-packaging@vmware.com - - - name: Setup Pre-Commit - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: ./.github/actions/setup-pre-commit - with: - version: "3.0.4" - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Commit Changes - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - env: - SKIP: lint-salt,lint-tests - PRE_COMMIT_COLOR: always - run: | - # Run it twice so that pre-commit can fix anything that can be automatically fixed. - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ - git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Create release changes patch - shell: bash - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - - - name: Upload Changes Diff Artifact - uses: actions/upload-artifact@v3 - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - retention-days: 7 - if-no-files-found: error - - build-docs: - name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-source-tarball - uses: ./.github/workflows/build-docs.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-source-tarball: - name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - - name: Build Source Tarball - uses: ./.github/actions/build-source-tarball - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - - build-deps-onedir-linux: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-linux - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-macos - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-rpm-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-rpm-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: staging - sign-packages: ${{ inputs.sign-windows-packages }} - secrets: inherit - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - environment: staging - sign-packages: ${{ inputs.sign-windows-packages }} - secrets: inherit - - build-macos-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: staging - sign-packages: true - secrets: inherit - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - environment: staging - sign-packages: true - secrets: inherit - - windows-2016-ci-deps: - name: Windows 2016 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-12-ci-deps: - name: macOS 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + run: | + git config --global user.name "Salt Project Packaging" + git config --global user.email saltproject-packaging@vmware.com - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Setup Pre-Commit + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: ./.github/actions/setup-pre-commit + with: + version: "3.0.4" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Commit Changes + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + env: + SKIP: lint-salt,lint-tests + PRE_COMMIT_COLOR: always + run: | + # Run it twice so that pre-commit can fix anything that can be automatically fixed. + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" || \ + git commit -am "Release v${{ needs.prepare-workflow.outputs.salt-version }}" - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Create release changes patch + shell: bash + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + git format-patch --keep-subject --binary --stdout HEAD^ > salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Upload Changes Diff Artifact + uses: actions/upload-artifact@v3 + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + retention-days: 7 + if-no-files-found: error - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-docs: + name: Documentation + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-source-tarball + uses: ./.github/workflows/build-docs.yml with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-source-tarball: + name: Build Source Tarball + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - prepare-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + - name: Build Source Tarball + uses: ./.github/actions/build-source-tarball + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-deps-onedir: + name: Build Dependencies Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-onedir.yml with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-salt-onedir: + name: Build Salt Onedir + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-deps-onedir + - build-source-tarball + uses: ./.github/workflows/build-salt-onedir.yml with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" + cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + relenv-version: "0.14.2" + python-version: "3.10.13" - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-onedir: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "onedir" + environment: staging + sign-macos-packages: true + sign-windows-packages: ${{ inputs.sign-windows-packages }} + secrets: inherit - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + build-pkgs-src: + name: Build Packages + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} + relenv-version: "0.14.2" + python-version: "3.10.13" + source: "src" + environment: staging + sign-macos-packages: true + sign-windows-packages: ${{ inputs.sign-windows-packages }} + secrets: inherit + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux + - build-salt-onedir uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir - platform: linux - arch: aarch64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1384,20 +553,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1406,15 +576,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1428,20 +599,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1450,15 +622,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1472,15 +645,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1494,15 +668,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1516,20 +691,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1538,15 +714,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1560,15 +737,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1582,20 +760,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1604,15 +783,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1626,20 +806,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1648,15 +829,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1670,20 +852,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1692,15 +875,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1714,6 +898,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -1721,14 +906,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1737,6 +922,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -1744,9 +930,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1760,6 +946,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -1767,14 +954,14 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1783,6 +970,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -1790,9 +978,9 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1806,20 +994,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1828,15 +1017,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1850,20 +1040,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1872,19 +1063,20 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-12-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1894,19 +1086,20 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1916,20 +1109,21 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1938,15 +1132,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1960,15 +1155,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1982,15 +1178,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2004,15 +1201,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2026,15 +1224,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2048,15 +1247,16 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2070,14 +1270,15 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2092,14 +1293,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2114,14 +1316,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2136,18 +1339,19 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2158,18 +1362,19 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2180,19 +1385,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin - arch: aarch64 + platform: macos + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2202,14 +1408,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2224,14 +1431,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2246,14 +1454,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2268,19 +1477,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2290,14 +1500,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2312,19 +1523,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2334,14 +1546,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2356,14 +1569,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2378,14 +1592,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2400,14 +1615,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2422,14 +1638,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2444,14 +1661,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2466,19 +1684,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2488,14 +1707,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2510,19 +1730,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2532,14 +1753,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2554,14 +1776,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2576,14 +1799,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2598,14 +1822,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2620,19 +1845,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2642,14 +1868,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2664,6 +1891,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -2671,13 +1899,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2687,6 +1915,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -2694,8 +1923,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2710,6 +1939,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -2717,13 +1947,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2733,6 +1963,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -2740,8 +1971,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2756,19 +1987,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2778,14 +2010,15 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2800,19 +2033,20 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2822,6 +2056,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" build-src-repo: name: Build Repository @@ -2932,7 +2167,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-deb-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2944,7 +2179,7 @@ jobs: - pkg-type: deb distro: debian version: "10" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "11" @@ -2952,7 +2187,7 @@ jobs: - pkg-type: deb distro: debian version: "11" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "12" @@ -2960,7 +2195,7 @@ jobs: - pkg-type: deb distro: debian version: "12" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "20.04" @@ -2968,7 +2203,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "20.04" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "22.04" @@ -2976,7 +2211,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "22.04" - arch: aarch64 + arch: arm64 steps: - uses: actions/checkout@v4 @@ -3061,7 +2296,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-rpm-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3221,7 +2456,7 @@ jobs: - name: Download RPM Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}-rpm + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -3287,7 +2522,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-windows-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3389,7 +2624,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-macos-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3419,7 +2654,7 @@ jobs: - name: Download macOS Arch64 Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-aarch64-macos + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -3479,9 +2714,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir strategy: fail-fast: false matrix: @@ -3508,22 +2741,22 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz path: artifacts/pkgs/incoming - - name: Download Linux aarch64 Onedir Archive + - name: Download Linux arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS x86_64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive @@ -3724,46 +2957,8 @@ jobs: needs: - prepare-workflow - publish-repositories - - almalinux-8-arm64-ci-deps - - almalinux-8-ci-deps - - almalinux-9-arm64-ci-deps - - almalinux-9-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2023-arm64-ci-deps - - amazonlinux-2023-ci-deps - - centos-7-arm64-ci-deps - - centos-7-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-9-arm64-ci-deps - - centosstream-9-ci-deps - - debian-10-ci-deps - - debian-11-arm64-ci-deps - - debian-11-ci-deps - - debian-12-arm64-ci-deps - - debian-12-ci-deps - - fedora-37-arm64-ci-deps - - fedora-37-ci-deps - - fedora-38-arm64-ci-deps - - fedora-38-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - photonos-3-arm64-ci-deps - - photonos-3-ci-deps - - photonos-4-arm64-ci-deps - - photonos-4-ci-deps - - photonos-5-arm64-ci-deps - - photonos-5-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2204-arm64-ci-deps - - ubuntu-2204-ci-deps - - windows-2022-ci-deps - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-ci-deps + - build-salt-onedir uses: ./.github/workflows/test-package-downloads-action.yml with: nox-session: ci-test-onedir @@ -3774,6 +2969,7 @@ jobs: python-version: "3.10" skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" secrets: inherit publish-pypi: @@ -3782,47 +2978,7 @@ jobs: needs: - prepare-workflow - upload-release-artifacts - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -3944,23 +3100,16 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - check-requirements - prepare-workflow - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - publish-repositories - upload-release-artifacts - pkg-download-tests diff --git a/.github/workflows/templates/build-ci-deps.yml.jinja b/.github/workflows/templates/build-ci-deps.yml.jinja index eb3622eb52f1..59f2bf0b9bcf 100644 --- a/.github/workflows/templates/build-ci-deps.yml.jinja +++ b/.github/workflows/templates/build-ci-deps.yml.jinja @@ -1,86 +1,22 @@ - <%- for slug, display_name, arch in build_ci_deps_listing["windows"] %> - - <{ slug.replace(".", "") }>-ci-deps: - <%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %> - name: <{ display_name }> Deps - <%- if workflow_slug != 'release' %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - <%- endif %> - needs: - - prepare-workflow - <%- if workflow_slug != 'release' %> - - build-salt-onedir-windows - <%- else %> - - download-onedir-artifact - <%- endif %> - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: <{ slug }> - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: <{ nox_version }> - python-version: "<{ gh_actions_workflows_python_version }>" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - - <%- endfor %> - - - <%- for slug, display_name, arch in build_ci_deps_listing["macos"] %> - - <{ slug.replace(".", "") }>-ci-deps: - <%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %> - name: <{ display_name }> Deps - <%- if workflow_slug != 'release' %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - <%- endif %> - needs: - - prepare-workflow - <%- if workflow_slug != 'release' %> - - build-salt-onedir-macos - <%- else %> - - download-onedir-artifact - <%- endif %> - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: <{ slug }> - nox-session: ci-test-onedir - platform: darwin - arch: <{ arch }> - nox-version: <{ nox_version }> - python-version: "<{ gh_actions_workflows_python_version }>" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - - <%- endfor %> - - - <%- for slug, display_name, arch in build_ci_deps_listing["linux"] %> - - <{ slug.replace(".", "") }>-ci-deps: - <%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %> - name: <{ display_name }> Deps + build-ci-deps: + <%- do test_salt_needs.append("build-ci-deps") %> + name: CI Deps <%- if workflow_slug != 'release' %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} <%- endif %> needs: - prepare-workflow <%- if workflow_slug != 'release' %> - - build-salt-onedir-linux + - build-salt-onedir <%- else %> - download-onedir-artifact <%- endif %> uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: <{ slug }> nox-session: ci-test-onedir - platform: linux - arch: <{ arch }> nox-version: <{ nox_version }> python-version: "<{ gh_actions_workflows_python_version }>" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - - <%- endfor %> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" diff --git a/.github/workflows/templates/build-deb-repo.yml.jinja b/.github/workflows/templates/build-deb-repo.yml.jinja index 8d9c054405fc..ac0bc159da45 100644 --- a/.github/workflows/templates/build-deb-repo.yml.jinja +++ b/.github/workflows/templates/build-deb-repo.yml.jinja @@ -5,15 +5,15 @@ include: <%- for distro, version, arch in ( ("debian", "10", "x86_64"), - ("debian", "10", "aarch64"), + ("debian", "10", "arm64"), ("debian", "11", "x86_64"), - ("debian", "11", "aarch64"), + ("debian", "11", "arm64"), ("debian", "12", "x86_64"), - ("debian", "12", "aarch64"), + ("debian", "12", "arm64"), ("ubuntu", "20.04", "x86_64"), - ("ubuntu", "20.04", "aarch64"), + ("ubuntu", "20.04", "arm64"), ("ubuntu", "22.04", "x86_64"), - ("ubuntu", "22.04", "aarch64"), + ("ubuntu", "22.04", "arm64"), ) %> - pkg-type: deb distro: <{ distro }> diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja new file mode 100644 index 000000000000..100edcab7c4c --- /dev/null +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -0,0 +1,358 @@ +--- +name: Install Test Dependencies + +on: + workflow_call: + inputs: + nox-session: + required: true + type: string + description: The nox session to run + salt-version: + type: string + required: true + description: The Salt version to set prior to running tests. + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + nox-version: + required: true + type: string + description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + linux-dependencies: + name: Linux + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + <%- for arch, build_distro_slug in build_ci_deps_listing["linux"] %> + - distro-slug: <{ build_distro_slug }> + arch: <{ arch }> + <%- endfor %> + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + 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: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-linux-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.linux.${{ matrix.arch }}.tar.* + + macos-dependencies: + name: MacOS + runs-on: ${{ matrix.distro-slug }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + <%- for arch, build_distro_slug in build_ci_deps_listing["macos"] %> + - distro-slug: <{ build_distro_slug }> + arch: <{ arch }> + <%- endfor %> + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz + + - name: Set up Python ${{ inputs.python-version }} + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install System Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + brew install openssl@3 + + - name: Install Nox + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" + run: | + export PYCURL_SSL_LIBRARY=openssl + export LDFLAGS="-L/usr/local/opt/openssl@3/lib" + export CPPFLAGS="-I/usr/local/opt/openssl@3/include" + export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" + nox --install-only -e ${{ inputs.nox-session }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e "pre-archive-cleanup(pkg=False)" + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e compress-dependencies -- macos ${{ matrix.arch }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.macos.${{ matrix.arch }}.tar.* + + windows-dependencies: + name: Windows + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + <%- for arch, build_distro_slug in build_ci_deps_listing["windows"] %> + - distro-slug: <{ build_distro_slug }> + arch: <{ arch }> + <%- endfor %> + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + 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: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-windows-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.windows.${{ matrix.arch }}.tar.* diff --git a/.github/workflows/templates/build-macos-repo.yml.jinja b/.github/workflows/templates/build-macos-repo.yml.jinja index c8127d0ac3e8..4e62d84e9535 100644 --- a/.github/workflows/templates/build-macos-repo.yml.jinja +++ b/.github/workflows/templates/build-macos-repo.yml.jinja @@ -28,7 +28,7 @@ - name: Download macOS Arch64 Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-aarch64-macos + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos path: artifacts/pkgs/incoming - name: Setup GnuPG diff --git a/.github/workflows/templates/build-onedir-repo.yml.jinja b/.github/workflows/templates/build-onedir-repo.yml.jinja index 8e51caa9c8ba..ac0e64e203a8 100644 --- a/.github/workflows/templates/build-onedir-repo.yml.jinja +++ b/.github/workflows/templates/build-onedir-repo.yml.jinja @@ -25,22 +25,22 @@ name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz path: artifacts/pkgs/incoming - - name: Download Linux aarch64 Onedir Archive + - name: Download Linux arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS x86_64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/templates/build-packages.yml.jinja b/.github/workflows/templates/build-packages.yml.jinja index b5086a75e583..91adfb1c6e66 100644 --- a/.github/workflows/templates/build-packages.yml.jinja +++ b/.github/workflows/templates/build-packages.yml.jinja @@ -1,38 +1,27 @@ -<%- for platform, pkg_type, display_name, runner_type in ( - ("linux", "rpm", "RPM", "self-hosted"), - ("linux", "deb", "DEB", "self-hosted"), - ("windows", "windows", "Windows", "github-hosted"), - ("macos", "macos", "macOS", "github-hosted"), - ) %> - <%- for backend in ("onedir", "src") %> - <%- set job_name = "build-{}-pkgs-{}".format(pkg_type, backend) %> + <%- set job_name = "build-pkgs-{}".format(backend) %> <%- if backend == "src" %> <%- do conclusion_needs.append(job_name) %> <%- endif %> <{ job_name }>: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['<{ runner_type }>'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-<{ platform }> - uses: ./.github/workflows/build-<{ pkg_type }>-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" source: "<{ backend }>" - <%- if pkg_type in ("macos", "windows") and gh_environment %> + <%- if gh_environment %> environment: <{ gh_environment }> - <%- if pkg_type == "macos" %> - sign-packages: true - <%- else %> - sign-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-windows-packages }} <%- endif %> - <%- endif %> + sign-macos-packages: true + sign-windows-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-windows-packages }} <%- endif %> secrets: inherit <%- endif %> <%- endfor %> -<%- endfor %> diff --git a/.github/workflows/templates/build-repos.yml.jinja b/.github/workflows/templates/build-repos.yml.jinja index 58c413cf5473..6b8177498df1 100644 --- a/.github/workflows/templates/build-repos.yml.jinja +++ b/.github/workflows/templates/build-repos.yml.jinja @@ -20,11 +20,9 @@ needs: - prepare-workflow <%- if type not in ("src", "onedir") %> - - build-<{ type }>-pkgs-onedir + - build-pkgs-onedir <%- elif type == 'onedir' %> - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir <%- elif type == 'src' %> - build-source-tarball <%- endif %> diff --git a/.github/workflows/templates/build-rpm-repo.yml.jinja b/.github/workflows/templates/build-rpm-repo.yml.jinja index 7e99a9686964..4c785c82b1d4 100644 --- a/.github/workflows/templates/build-rpm-repo.yml.jinja +++ b/.github/workflows/templates/build-rpm-repo.yml.jinja @@ -66,7 +66,7 @@ - name: Download RPM Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}-rpm + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm path: artifacts/pkgs/incoming - name: Setup GnuPG diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index b02604c40d8c..6c28dc992aac 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -52,7 +52,7 @@ - x86_64 <%- else %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest <%- endif %> needs: - prepare-workflow @@ -62,7 +62,7 @@ <%- if not prepare_actual_release %> - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -205,12 +205,12 @@ needs: - prepare-workflow - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -235,16 +235,14 @@ <%- set job_name = "build-deps-onedir" %> <%- if includes.get(job_name, True) %> - <%- for platform in ("linux", "windows", "macos") %> - <%- set platform_job_name = "{}-{}".format(job_name, platform) %> - <{ platform_job_name }>: - <%- do conclusion_needs.append(platform_job_name) %> + <{ job_name }>: + <%- do conclusion_needs.append(job_name) %> name: Build Dependencies Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-<{ platform }>.yml + uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -253,24 +251,21 @@ relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" - <%- endfor %> <%- endif %> <%- set job_name = "build-salt-onedir" %> <%- if includes.get(job_name, True) %> - <%- for platform in ("linux", "windows", "macos") %> - <%- set platform_job_name = "{}-{}".format(job_name, platform) %> - <{ platform_job_name }>: - <%- do conclusion_needs.append(platform_job_name) %> + <{ job_name }>: + <%- do conclusion_needs.append(job_name) %> name: Build Salt Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] }} needs: - prepare-workflow - - build-deps-onedir-<{ platform }> + - build-deps-onedir - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-<{ platform }>.yml + uses: ./.github/workflows/build-salt-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -279,7 +274,6 @@ relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" - <%- endfor %> <%- endif %> @@ -309,7 +303,7 @@ <%- do conclusion_needs.append("combine-all-code-coverage") %> name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow <%- for need in test_salt_needs.iter(consume=False) %> @@ -319,8 +313,7 @@ - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 5934eb8d579b..6f2f9b18e997 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -75,7 +75,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest <%- if prepare_workflow_if_check %> if: <{ prepare_workflow_if_check }> <%- endif %> @@ -96,6 +96,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -179,7 +180,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -212,6 +213,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + <%- if prepare_actual_release %> - name: Check Existing Releases @@ -279,12 +285,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | @@ -337,7 +337,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest <%- if workflow_slug == "nightly" %> environment: <{ workflow_slug }> <%- endif %> diff --git a/.github/workflows/templates/nightly.yml.jinja b/.github/workflows/templates/nightly.yml.jinja index e4350f44a366..b058b727b4d0 100644 --- a/.github/workflows/templates/nightly.yml.jinja +++ b/.github/workflows/templates/nightly.yml.jinja @@ -58,7 +58,7 @@ concurrency: <%- do conclusion_needs.append('notify-slack') %> notify-slack: name: Notify Slack - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: <{ gh_environment }> needs: <%- for need in prepare_workflow_needs.iter(consume=False) %> diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index b020138baff8..704e2ec940b7 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -52,7 +52,7 @@ permissions: <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: <{ gh_environment }>-check steps: - name: Check For Admin Permission @@ -86,13 +86,14 @@ permissions: cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # Full clone to also get the tags to get the right salt version - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -134,16 +135,16 @@ permissions: run: | tools ci get-releases - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - - name: Set Cache Seed Output id: set-cache-seed run: | tools ci define-cache-seed ${{ env.CACHE_SEED }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + <%- endblock prepare_workflow_job %> <%- endif %> @@ -166,15 +167,15 @@ permissions: - platform: linux arch: x86_64 - platform: linux - arch: aarch64 + arch: arm64 - platform: windows arch: amd64 - platform: windows arch: x86 - - platform: darwin + - platform: macos arch: x86_64 - - platform: darwin - arch: aarch64 + - platform: macos + arch: arm64 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/templates/staging.yml.jinja b/.github/workflows/templates/staging.yml.jinja index c84ade076364..45866284cfc8 100644 --- a/.github/workflows/templates/staging.yml.jinja +++ b/.github/workflows/templates/staging.yml.jinja @@ -66,7 +66,7 @@ concurrency: <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: <{ gh_environment }>-check steps: - name: Check For Admin Permission diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index 4f9502d7aae1..4cb2802ce0b4 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -23,6 +23,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -84,7 +88,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -92,15 +96,13 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -318,7 +320,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Install System Dependencies @@ -330,10 +332,10 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" update-environment: true @@ -342,19 +344,17 @@ jobs: run: | python3 -m pip install 'nox==${{ inputs.nox-version }}' - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ matrix.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }} - name: Show System Info & Test Plan env: @@ -545,13 +545,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja index 005c5272ac31..0373787a47c0 100644 --- a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja @@ -19,9 +19,7 @@ <%- if gh_environment == "release" %> - download-onedir-artifact <%- else %> - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir <%- endif %> uses: ./.github/workflows/test-package-downloads-action.yml with: @@ -33,4 +31,5 @@ python-version: "<{ gh_actions_workflows_python_version }>" skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" secrets: inherit diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index eb8b43d071ff..2afab9cf3adc 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -7,9 +7,9 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-<{ pkg_type }>-pkgs-onedir - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir @@ -23,6 +23,7 @@ skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- if fips == "fips" %> fips: true <%- endif %> @@ -40,13 +41,13 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - <{ slug.replace(".", "") }>-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir - platform: darwin + platform: macos arch: <{ arch }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -56,6 +57,7 @@ skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> @@ -70,9 +72,9 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - build-pkgs-onedir + - build-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir @@ -86,6 +88,7 @@ skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> <%- endfor %> diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index 9c25d7f0a8c5..214985df3557 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -12,8 +12,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir @@ -28,6 +28,7 @@ skip-junit-reports: <{ skip_junit_reports_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> @@ -40,12 +41,12 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - <{ slug.replace(".", "") }>-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir - platform: darwin + platform: macos arch: <{ arch }> nox-version: <{ nox_version }> gh-actions-python-version: "<{ gh_actions_workflows_python_version }>" @@ -56,6 +57,7 @@ skip-junit-reports: <{ skip_junit_reports_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> @@ -67,8 +69,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-action.yml + - build-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir @@ -83,6 +85,7 @@ skip-junit-reports: <{ skip_junit_reports_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- if fips == "fips" %> fips: true <%- endif %> diff --git a/.github/workflows/templates/trigger-branch-workflows.yml.jinja b/.github/workflows/templates/trigger-branch-workflows.yml.jinja index 24d0147b9152..9d187cd6a2d1 100644 --- a/.github/workflows/templates/trigger-branch-workflows.yml.jinja +++ b/.github/workflows/templates/trigger-branch-workflows.yml.jinja @@ -7,7 +7,7 @@ <%- do conclusion_needs.append(job_name) %> name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements steps: diff --git a/.github/workflows/templates/workflow-requirements-check.yml.jinja b/.github/workflows/templates/workflow-requirements-check.yml.jinja index a18c13c69f5a..419ee3f6f526 100644 --- a/.github/workflows/templates/workflow-requirements-check.yml.jinja +++ b/.github/workflows/templates/workflow-requirements-check.yml.jinja @@ -4,7 +4,7 @@ <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Workflow Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action-linux.yml similarity index 97% rename from .github/workflows/test-action.yml rename to .github/workflows/test-action-linux.yml index f8635539cbd7..e6066e8b4508 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action-linux.yml @@ -36,6 +36,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash gh-actions-python-version: required: false type: string @@ -83,10 +87,7 @@ jobs: generate-matrix: name: Test Matrix - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest outputs: matrix-include: ${{ steps.generate-matrix.outputs.matrix }} steps: @@ -155,13 +156,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.linux.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -339,10 +338,7 @@ jobs: report: name: Test Reports if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest needs: - test diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml index 085695122c90..baeaaa4206a0 100644 --- a/.github/workflows/test-action-macos.yml +++ b/.github/workflows/test-action-macos.yml @@ -41,6 +41,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash package-name: required: false type: string @@ -76,7 +80,7 @@ jobs: generate-matrix: name: Test Matrix - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: matrix-include: ${{ steps.generate-matrix.outputs.matrix }} steps: @@ -145,18 +149,16 @@ jobs: run: | brew install tree - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.macos.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true - name: Set up Python ${{ inputs.gh-actions-python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.gh-actions-python-version }}" @@ -166,7 +168,7 @@ jobs: - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ inputs.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }} - name: Download testrun-changed-files.txt if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} @@ -383,7 +385,7 @@ jobs: report: name: Test Reports if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - test @@ -404,7 +406,7 @@ jobs: tree -a artifacts - name: Set up Python ${{ inputs.gh-actions-python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.gh-actions-python-version }}" diff --git a/.github/workflows/test-action-windows.yml b/.github/workflows/test-action-windows.yml new file mode 100644 index 000000000000..d89311148383 --- /dev/null +++ b/.github/workflows/test-action-windows.yml @@ -0,0 +1,395 @@ +--- +name: Test Artifact + +on: + workflow_call: + inputs: + distro-slug: + required: true + type: string + description: The OS slug to run tests against + nox-session: + required: true + type: string + description: The nox session to run + testrun: + required: true + type: string + description: JSON string containing information about what and how to run the test suite + salt-version: + type: string + required: true + description: The Salt version to set prior to running tests. + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + platform: + required: true + type: string + description: The platform being tested + arch: + required: true + type: string + description: The platform arch being tested + nox-version: + required: true + type: string + description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash + gh-actions-python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + fips: + required: false + type: boolean + default: false + description: Test run with FIPS enabled + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + skip-code-coverage: + required: false + type: boolean + description: Skip code coverage + default: false + skip-junit-reports: + required: false + type: boolean + description: Skip Publishing JUnit Reports + default: false + workflow-slug: + required: false + type: string + description: Which workflow is running. + default: ci + default-timeout: + required: false + type: number + description: Timeout, in minutes, for the test job(Default 360, 6 hours). + default: 360 + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + generate-matrix: + name: Test Matrix + runs-on: ubuntu-latest + outputs: + matrix-include: ${{ steps.generate-matrix.outputs.matrix }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Generate Test Matrix + id: generate-matrix + run: | + tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ fromJSON(inputs.testrun)['type'] == 'full' && '--full ' || '' }}${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} + + test: + name: Test + runs-on: + - self-hosted + - linux + - bastion + # Full test runs. Each chunk should never take more than 2 hours. + # Partial test runs(no chunk parallelization), 6 Hours + timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} + needs: + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }} + env: + SALT_TRANSPORT: ${{ matrix.transport }} + TEST_GROUP: ${{ matrix.test-group || 1 }} + + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Salt Version + run: | + echo "${{ inputs.salt-version }}" > salt/_version.txt + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + + - name: Download cached nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ inputs.nox-archive-hash }} + # If we get a cache miss here it means the dependencies step failed to save the cache + fail-on-cache-miss: true + + - name: PyPi Proxy + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Download testrun-changed-files.txt + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + uses: actions/download-artifact@v3 + with: + name: testrun-changed-files.txt + + - 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: Start VM + id: spin-up-vm + env: + TESTS_CHUNK: ${{ matrix.tests-chunk }} + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} + + - name: List Free Space + run: | + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + run: | + tools --timestamps vm rsync ${{ inputs.distro-slug }} + + - name: Decompress .nox Directory + run: | + tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }} + + - name: Show System Info & Test Plan + run: | + tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} + + - name: Run Fast/Changed Tests + id: run-fast-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] == false }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --suppress-no-test-exit-code \ + --from-filenames=testrun-changed-files.txt + + - name: Run Slow/Changed Tests + id: run-slow-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] == false }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests --suppress-no-test-exit-code \ + --from-filenames=testrun-changed-files.txt + + - name: Run Core/Changed Tests + id: run-core-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] == false }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests --suppress-no-test-exit-code \ + --from-filenames=testrun-changed-files.txt + + - name: Run Fast Tests + id: run-fast-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \ + ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} + + - name: Run Slow Tests + id: run-slow-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests + + - name: Run Core Tests + id: run-core-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests + + - name: Run Flaky Tests + id: run-flaky-tests + if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --flaky-jail + + - name: Run Full Tests + id: run-full-tests + if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \ + -E TEST_GROUP ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \ + --test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }} + + - name: Combine Coverage Reports + if: always() && inputs.skip-code-coverage == false && steps.spin-up-vm.outcome == 'success' + run: | + tools --timestamps vm combine-coverage ${{ inputs.distro-slug }} + + - name: Download Test Run Artifacts + id: download-artifacts-from-vm + if: always() && steps.spin-up-vm.outcome == 'success' + run: | + tools --timestamps vm download-artifacts ${{ inputs.distro-slug }} + # Delete the salt onedir, we won't need it anymore and it will prevent + # from it showing in the tree command below + rm -rf artifacts/salt* + tree -a artifacts + if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }} + fi + + - name: Destroy VM + if: always() + run: | + tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true + + - name: Upload Code Coverage Test Run Artifacts + if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled' + uses: actions/upload-artifact@v3 + with: + name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} + path: | + artifacts/coverage/ + + - name: Upload JUnit XML Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }} + path: | + artifacts/xml-unittests-output/ + + - name: Upload Test Run Log Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }} + path: | + artifacts/logs + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + # always run even if the previous steps fails + if: always() && inputs.skip-junit-reports == false && job.status != 'cancelled' + with: + check_name: Test Results(${{ inputs.distro-slug }}, transport=${{ matrix.transport }}, tests-chunk=${{ matrix.tests-chunk }}, group=${{ matrix.test-group || '1' }}) + report_paths: 'artifacts/xml-unittests-output/*.xml' + annotate_only: true + + + report: + name: Test Reports + if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' + runs-on: ubuntu-latest + needs: + - test + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Code Coverage Test Run Artifacts + uses: actions/download-artifact@v3 + if: ${{ inputs.skip-code-coverage == false }} + id: download-coverage-artifacts + with: + name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} + path: artifacts/coverage/ + + - name: Show Downloaded Test Run Artifacts + run: | + tree -a artifacts + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + + - name: Create XML Coverage Reports + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled' + run: | + nox --force-color -e create-xml-coverage-reports + mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml + mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml + + - name: Report Salt Code Coverage + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + continue-on-error: true + run: | + nox --force-color -e report-coverage -- salt + + - name: Report Combined Code Coverage + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + continue-on-error: true + run: | + nox --force-color -e report-coverage + + - name: Rename Code Coverage DB + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + continue-on-error: true + run: | + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }} + + - name: Upload Code Coverage DB + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 6bed0c6a01c3..ccc5ca7de19c 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -23,6 +23,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -131,17 +135,20 @@ jobs: - distro-slug: debian-10 arch: x86_64 pkg-type: package + - distro-slug: debian-10-arm64 + arch: arm64 + pkg-type: package - distro-slug: debian-11 arch: x86_64 pkg-type: package - distro-slug: debian-11-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: debian-12 arch: x86_64 pkg-type: package - distro-slug: debian-12-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: fedora-37 arch: x86_64 @@ -192,20 +199,26 @@ jobs: arch: x86_64 pkg-type: package - distro-slug: ubuntu-20.04-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: ubuntu-22.04 arch: x86_64 pkg-type: package - - distro-slug: ubuntu-22.04-arm64 - arch: aarch64 - pkg-type: package - distro-slug: ubuntu-22.04 arch: x86_64 pkg-type: onedir - distro-slug: ubuntu-22.04-arm64 - arch: aarch64 + arch: arm64 + pkg-type: package + - distro-slug: ubuntu-22.04-arm64 + arch: arm64 pkg-type: onedir + - distro-slug: ubuntu-23.04 + arch: x86_64 + pkg-type: package + - distro-slug: ubuntu-23.04-arm64 + arch: arm64 + pkg-type: package steps: @@ -220,7 +233,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -228,15 +241,13 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -445,7 +456,7 @@ jobs: arch: arm64 pkg-type: package - distro-slug: macos-13-xlarge - arch: aarch64 + arch: arm64 pkg-type: onedir steps: @@ -461,7 +472,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Install System Dependencies @@ -473,10 +484,10 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" update-environment: true @@ -485,19 +496,17 @@ jobs: run: | python3 -m pip install 'nox==${{ inputs.nox-version }}' - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ matrix.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }} - name: Show System Info & Test Plan env: @@ -692,13 +701,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-packages-action.yml b/.github/workflows/test-packages-action-linux.yml similarity index 94% rename from .github/workflows/test-packages-action.yml rename to .github/workflows/test-packages-action-linux.yml index fb77b855693c..377410c820f6 100644 --- a/.github/workflows/test-packages-action.yml +++ b/.github/workflows/test-packages-action-linux.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -78,6 +82,8 @@ jobs: generate-matrix: name: Generate Matrix runs-on: + # We need to run on our self-hosted runners because we need proper credentials + # for boto3 to scan through our repositories. - self-hosted - linux - x86_64 @@ -152,13 +158,11 @@ jobs: run: | tree artifacts/pkg/ - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.linux.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -236,10 +240,7 @@ jobs: report: name: Report - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' needs: - test diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index 4dac7599e348..2ebde6b0d7ce 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -71,6 +75,8 @@ jobs: generate-matrix: name: Generate Matrix runs-on: + # We need to run on our self-hosted runners because we need proper credentials + # for boto3 to scan through our repositories. - self-hosted - linux - x86_64 @@ -146,7 +152,7 @@ jobs: tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" @@ -154,19 +160,17 @@ jobs: run: | python3 -m pip install 'nox==${{ inputs.nox-version }}' - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + path: nox.macos.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ inputs.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }} - name: Show System Info & Test Plan env: @@ -220,7 +224,7 @@ jobs: report: name: Report - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' needs: - test @@ -247,7 +251,7 @@ jobs: tree -a artifacts - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml new file mode 100644 index 000000000000..5a9aaae7da31 --- /dev/null +++ b/.github/workflows/test-packages-action-windows.yml @@ -0,0 +1,276 @@ +name: Test Artifact + +on: + workflow_call: + inputs: + distro-slug: + required: true + type: string + description: The OS slug to run tests against + platform: + required: true + type: string + description: The platform being tested + arch: + required: true + type: string + description: The platform arch being tested + pkg-type: + required: true + type: string + description: The platform arch being tested + salt-version: + type: string + required: true + description: The Salt version of the packages to install and test + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + testing-releases: + required: true + type: string + description: A JSON list of releases to test upgrades against + nox-version: + required: true + type: string + description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + fips: + required: false + type: boolean + default: false + description: Test run with FIPS enabled + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + nox-session: + required: false + type: string + description: The nox session to run + default: ci-test-onedir + skip-code-coverage: + required: false + type: boolean + description: Skip code coverage + default: false + skip-junit-reports: + required: false + type: boolean + description: Skip Publishing JUnit Reports + default: false + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + generate-matrix: + name: Generate Matrix + runs-on: + # We need to run on our self-hosted runners because we need proper credentials + # for boto3 to scan through our repositories. + - self-hosted + - linux + - x86_64 + outputs: + pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Generate Package Test Matrix + id: generate-pkg-matrix + run: | + tools ci pkg-matrix ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ inputs.pkg-type }} --testing-releases ${{ join(fromJSON(inputs.testing-releases), ' ') }} + + + test: + name: Test + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 120 # 2 Hours - More than this and something is wrong + needs: + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }} + + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Packages + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ inputs.arch }}-${{ inputs.pkg-type }} + path: artifacts/pkg/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + + - name: List Packages + run: | + tree artifacts/pkg/ + + - name: Download cached nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} + # If we get a cache miss here it means the dependencies step failed to save the cache + fail-on-cache-miss: true + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - 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: Start VM + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} + + - name: List Free Space + run: | + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + run: | + tools --timestamps vm rsync ${{ inputs.distro-slug }} + + - name: Decompress .nox Directory + run: | + tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }} + + - name: Downgrade importlib-metadata + if: ${{ contains(fromJSON('["amazonlinux-2", "centos-7", "debian-10"]'), inputs.distro-slug) && contains(fromJSON('["upgrade-classic", "downgrade-classic"]'), matrix.tests-chunk) }} + run: | + # This step can go away once we stop testing classic packages upgrade/downgrades to/from 3005.x + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- "sudo python3 -m pip install -U 'importlib-metadata<=4.13.0' 'virtualenv<=20.21.1'" + + - name: Show System Info & Test Plan + run: | + tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }}-pkgs ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \ + ${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}} + + - name: Run Package Tests + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install ${{ matrix.fips && '--fips ' || '' }}\ + --nox-session=${{ inputs.nox-session }}-pkgs --rerun-failures ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \ + ${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}} + + - name: Download Test Run Artifacts + id: download-artifacts-from-vm + if: always() && steps.spin-up-vm.outcome == 'success' + run: | + tools --timestamps vm download-artifacts ${{ inputs.distro-slug }} + # Delete the salt onedir, we won't need it anymore and it will prevent + # from it showing in the tree command below + rm -rf artifacts/salt* + tree -a artifacts + + - name: Destroy VM + if: always() + run: | + tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true + + - name: Upload Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ matrix.tests-chunk }} + path: | + artifacts + !artifacts/pkg/* + !artifacts/salt/* + !artifacts/salt-*.tar.* + + report: + name: Report + runs-on: ubuntu-latest + if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' + needs: + - test + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }} + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Test Run Artifacts + id: download-test-run-artifacts + uses: actions/download-artifact@v3 + with: + name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ matrix.tests-chunk }} + path: artifacts + + - name: Show Test Run Artifacts + if: always() && steps.download-test-run-artifacts.outcome == 'success' + run: | + tree -a artifacts + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + # always run even if the previous steps fails + if: always() && inputs.skip-junit-reports == false && steps.download-test-run-artifacts.outcome == 'success' + with: + check_name: Overall Test Results(${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}) + report_paths: 'artifacts/xml-unittests-output/*.xml' + annotate_only: true diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 2971429a4dc3..612460f6b563 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -22,13 +22,13 @@ jobs: issues: write pull-requests: read # for dawidd6/action-download-artifact to query commit hash name: Triage New Issue - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/changelog/63063.fixed.md b/changelog/63063.fixed.md new file mode 100644 index 000000000000..6f26fc11abd9 --- /dev/null +++ b/changelog/63063.fixed.md @@ -0,0 +1 @@ +Corrected encoding of credentials for use with Artifactory diff --git a/changelog/65691.fixed.md b/changelog/65691.fixed.md new file mode 100644 index 000000000000..3b5192f80c07 --- /dev/null +++ b/changelog/65691.fixed.md @@ -0,0 +1 @@ +Fix boto execution module loading diff --git a/changelog/65692.fixed.md b/changelog/65692.fixed.md new file mode 100644 index 000000000000..b4eef6c93d46 --- /dev/null +++ b/changelog/65692.fixed.md @@ -0,0 +1 @@ +Removed PR 65185 changes since incomplete solution diff --git a/changelog/65752.fixed.md b/changelog/65752.fixed.md new file mode 100644 index 000000000000..f611c5e65ec8 --- /dev/null +++ b/changelog/65752.fixed.md @@ -0,0 +1 @@ +Fix nonsensical time in fileclient timeout error. diff --git a/changelog/65759.fixed.md b/changelog/65759.fixed.md new file mode 100644 index 000000000000..426cb3f24bf7 --- /dev/null +++ b/changelog/65759.fixed.md @@ -0,0 +1 @@ +Fix un-closed transport in tornado netapi diff --git a/noxfile.py b/noxfile.py index 0baf4cc537ae..e9e5c6fdc736 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1223,14 +1223,29 @@ def coverage_report(session): def decompress_dependencies(session): if not session.posargs: session.error( - "Please pass the distro-slug to run tests against. " - "Check cicd/images.yml for what's available." + "The 'decompress-dependencies' session target needs " + "two arguments, ' '." ) - distro_slug = session.posargs.pop(0) - if "windows" in distro_slug: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.gz" + try: + platform = session.posargs.pop(0) + arch = session.posargs.pop(0) + if session.posargs: + session.error( + "The 'decompress-dependencies' session target only accepts " + "two arguments, ' '." + ) + except IndexError: + session.error( + "The 'decompress-dependencies' session target needs " + "two arguments, ' '." + ) + if platform == "windows": + extension = "tar.gz" + scripts_dir_name = "Scripts" else: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.xz" + extension = "tar.xz" + scripts_dir_name = "bin" + nox_dependencies_tarball = f"nox.{platform}.{arch}.{extension}" nox_dependencies_tarball_path = REPO_ROOT / nox_dependencies_tarball if not nox_dependencies_tarball_path.exists(): session.error( @@ -1244,10 +1259,7 @@ def decompress_dependencies(session): session.log("Finding broken 'python' symlinks under '.nox/' ...") for dirname in os.scandir(REPO_ROOT / ".nox"): - if "windows" not in distro_slug: - scan_path = REPO_ROOT.joinpath(".nox", dirname, "bin") - else: - scan_path = REPO_ROOT.joinpath(".nox", dirname, "Scripts") + scan_path = REPO_ROOT.joinpath(".nox", dirname, scripts_dir_name) script_paths = {str(p): p for p in os.scandir(scan_path)} fixed_shebang = f"#!{scan_path / 'python'}" for key in sorted(script_paths): @@ -1278,7 +1290,7 @@ def decompress_dependencies(session): continue if not path.is_file(): continue - if "windows" not in distro_slug: + if platform != "windows": # Let's try to fix shebang's try: fpath = pathlib.Path(path) @@ -1301,14 +1313,27 @@ def decompress_dependencies(session): def compress_dependencies(session): if not session.posargs: session.error( - "Please pass the distro-slug to run tests against. " - "Check cicd/images.yml for what's available." + "The 'compress-dependencies' session target needs " + "two arguments, ' '." ) - distro_slug = session.posargs.pop(0) - if IS_WINDOWS: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.gz" + try: + platform = session.posargs.pop(0) + arch = session.posargs.pop(0) + if session.posargs: + session.error( + "The 'compress-dependencies' session target only accepts " + "two arguments, ' '." + ) + except IndexError: + session.error( + "The 'compress-dependencies' session target needs " + "two arguments, ' '." + ) + if platform == "windows": + extension = "tar.gz" else: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.xz" + extension = "tar.xz" + nox_dependencies_tarball = f"nox.{platform}.{arch}.{extension}" nox_dependencies_tarball_path = REPO_ROOT / nox_dependencies_tarball if nox_dependencies_tarball_path.exists(): session_warn( diff --git a/pkg/debian/rules b/pkg/debian/rules index 3d39abe7ab18..6ed990418e4d 100755 --- a/pkg/debian/rules +++ b/pkg/debian/rules @@ -24,8 +24,8 @@ override_dh_auto_build: export FETCH_RELENV_VERSION=$${SALT_RELENV_VERSION} export PY=$$(build/onedir/venv/bin/python3 -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info)); sys.stdout.flush()') \ && build/onedir/venv/bin/python3 -m pip install -r requirements/static/ci/py$${PY}/tools.txt - build/onedir/venv/bin/relenv fetch --arch=$${SALT_PACKAGE_ARCH} --python=$${SALT_PYTHON_VERSION} - build/onedir/venv/bin/relenv toolchain fetch --arch=$${SALT_PACKAGE_ARCH} + build/onedir/venv/bin/relenv fetch --python=$${SALT_PYTHON_VERSION} + build/onedir/venv/bin/relenv toolchain fetch build/onedir/venv/bin/tools pkg build onedir-dependencies --arch $${SALT_PACKAGE_ARCH} --relenv-version=$${SALT_RELENV_VERSION} --python-version $${SALT_PYTHON_VERSION} --package-name build/onedir/salt --platform linux # Fix any hardcoded paths to the relenv python binary on any of the scripts installed in the /bin directory diff --git a/pkg/rpm/salt.spec b/pkg/rpm/salt.spec index 9bb75580e03a..ed350a9e8dc8 100644 --- a/pkg/rpm/salt.spec +++ b/pkg/rpm/salt.spec @@ -169,8 +169,8 @@ cd $RPM_BUILD_DIR export FETCH_RELENV_VERSION=${SALT_RELENV_VERSION} export PY=$(build/venv/bin/python3 -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info)); sys.stdout.flush()') build/venv/bin/python3 -m pip install -r %{_salt_src}/requirements/static/ci/py${PY}/tools.txt - build/venv/bin/relenv fetch --arch=${SALT_PACKAGE_ARCH} --python=${SALT_PYTHON_VERSION} - build/venv/bin/relenv toolchain fetch --arch=${SALT_PACKAGE_ARCH} + build/venv/bin/relenv fetch --python=${SALT_PYTHON_VERSION} + build/venv/bin/relenv toolchain fetch cd %{_salt_src} $RPM_BUILD_DIR/build/venv/bin/tools pkg build onedir-dependencies --arch ${SALT_PACKAGE_ARCH} --relenv-version=${SALT_RELENV_VERSION} --python-version ${SALT_PYTHON_VERSION} --package-name $RPM_BUILD_DIR/build/salt --platform linux diff --git a/requirements/static/ci/py3.10/cloud.txt b/requirements/static/ci/py3.10/cloud.txt index 2b962a7a2ed2..ead86ebfed81 100644 --- a/requirements/static/ci/py3.10/cloud.txt +++ b/requirements/static/ci/py3.10/cloud.txt @@ -40,7 +40,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.10/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -84,7 +84,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pynacl charset-normalizer==3.2.0 @@ -360,7 +359,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -612,7 +611,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -624,7 +622,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.10/darwin.txt b/requirements/static/ci/py3.10/darwin.txt index f27842ae66be..16753a6d8ecb 100644 --- a/requirements/static/ci/py3.10/darwin.txt +++ b/requirements/static/ci/py3.10/darwin.txt @@ -30,7 +30,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -61,7 +61,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.10/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -258,7 +257,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 +paramiko==3.4.0 # via # junos-eznc # ncclient @@ -426,7 +425,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -436,7 +434,6 @@ six==1.16.0 # junos-eznc # kubernetes # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.10/freebsd.txt b/requirements/static/ci/py3.10/freebsd.txt index 95a14846949a..652da67d8042 100644 --- a/requirements/static/ci/py3.10/freebsd.txt +++ b/requirements/static/ci/py3.10/freebsd.txt @@ -27,7 +27,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -58,7 +58,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.10/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -250,7 +249,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -418,7 +417,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -430,7 +428,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.10/lint.txt b/requirements/static/ci/py3.10/lint.txt index 1d62be50e88a..ab2d132518c6 100644 --- a/requirements/static/ci/py3.10/lint.txt +++ b/requirements/static/ci/py3.10/lint.txt @@ -48,7 +48,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.10/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -94,7 +94,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -364,7 +363,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -593,7 +592,6 @@ six==1.16.0 # -c requirements/static/ci/py3.10/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -605,7 +603,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.10/linux.txt b/requirements/static/ci/py3.10/linux.txt index 2cdc0f15e6a6..11c7d86fe4a4 100644 --- a/requirements/static/ci/py3.10/linux.txt +++ b/requirements/static/ci/py3.10/linux.txt @@ -33,7 +33,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -67,7 +67,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -261,7 +260,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -456,7 +455,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -468,7 +466,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.10/windows.txt b/requirements/static/ci/py3.10/windows.txt index 08d00aea31b4..18fb61e7cfcb 100644 --- a/requirements/static/ci/py3.10/windows.txt +++ b/requirements/static/ci/py3.10/windows.txt @@ -19,7 +19,7 @@ attrs==23.1.0 # pytest-shell-utilities # pytest-skip-markers # pytest-system-statistics -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.11/cloud.txt b/requirements/static/ci/py3.11/cloud.txt index e8493764de5c..08cf932132e1 100644 --- a/requirements/static/ci/py3.11/cloud.txt +++ b/requirements/static/ci/py3.11/cloud.txt @@ -36,7 +36,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.11/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -80,7 +80,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pynacl charset-normalizer==3.2.0 @@ -335,7 +334,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -570,7 +569,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -580,7 +578,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.11/darwin.txt b/requirements/static/ci/py3.11/darwin.txt index 2607474a10f2..782eb706c9a9 100644 --- a/requirements/static/ci/py3.11/darwin.txt +++ b/requirements/static/ci/py3.11/darwin.txt @@ -28,7 +28,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via @@ -57,7 +57,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.11/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -394,7 +393,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py diff --git a/requirements/static/ci/py3.11/freebsd.txt b/requirements/static/ci/py3.11/freebsd.txt index 4f701987b635..c43b1ad59054 100644 --- a/requirements/static/ci/py3.11/freebsd.txt +++ b/requirements/static/ci/py3.11/freebsd.txt @@ -25,7 +25,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -56,7 +56,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.11/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -235,7 +234,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -391,7 +390,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -401,7 +399,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.11/lint.txt b/requirements/static/ci/py3.11/lint.txt index cb69e4dad8ca..77cf1719f3b8 100644 --- a/requirements/static/ci/py3.11/lint.txt +++ b/requirements/static/ci/py3.11/lint.txt @@ -44,7 +44,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.11/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -90,7 +90,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -342,7 +341,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -554,7 +553,6 @@ six==1.16.0 # -c requirements/static/ci/py3.11/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -564,7 +562,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.11/linux.txt b/requirements/static/ci/py3.11/linux.txt index 633139c5000b..ebc412a971c9 100644 --- a/requirements/static/ci/py3.11/linux.txt +++ b/requirements/static/ci/py3.11/linux.txt @@ -31,7 +31,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -65,7 +65,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -246,7 +245,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -429,7 +428,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -439,7 +437,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.11/windows.txt b/requirements/static/ci/py3.11/windows.txt index 3a7a9c755669..5b49ddbefe94 100644 --- a/requirements/static/ci/py3.11/windows.txt +++ b/requirements/static/ci/py3.11/windows.txt @@ -17,7 +17,7 @@ attrs==23.1.0 # pytest-shell-utilities # pytest-skip-markers # pytest-system-statistics -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.12/cloud.txt b/requirements/static/ci/py3.12/cloud.txt index 7fd5de1764ff..88e09b3c09e8 100644 --- a/requirements/static/ci/py3.12/cloud.txt +++ b/requirements/static/ci/py3.12/cloud.txt @@ -36,7 +36,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.12/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -80,7 +80,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pynacl charset-normalizer==3.2.0 @@ -335,7 +334,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -570,7 +569,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -580,7 +578,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.12/darwin.txt b/requirements/static/ci/py3.12/darwin.txt index bee058e2de71..73d0da16da49 100644 --- a/requirements/static/ci/py3.12/darwin.txt +++ b/requirements/static/ci/py3.12/darwin.txt @@ -28,7 +28,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via @@ -57,7 +57,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.12/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -394,7 +393,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py diff --git a/requirements/static/ci/py3.12/freebsd.txt b/requirements/static/ci/py3.12/freebsd.txt index 4a8b0e37df98..ba227a016f47 100644 --- a/requirements/static/ci/py3.12/freebsd.txt +++ b/requirements/static/ci/py3.12/freebsd.txt @@ -25,7 +25,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -56,7 +56,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.12/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -235,7 +234,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -391,7 +390,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -401,7 +399,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.12/lint.txt b/requirements/static/ci/py3.12/lint.txt index 1b76109d7393..d9bc8cc01a01 100644 --- a/requirements/static/ci/py3.12/lint.txt +++ b/requirements/static/ci/py3.12/lint.txt @@ -44,7 +44,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.12/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -90,7 +90,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -342,7 +341,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -554,7 +553,6 @@ six==1.16.0 # -c requirements/static/ci/py3.12/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -564,7 +562,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.12/linux.txt b/requirements/static/ci/py3.12/linux.txt index 7873144f0523..71f9965b699d 100644 --- a/requirements/static/ci/py3.12/linux.txt +++ b/requirements/static/ci/py3.12/linux.txt @@ -31,7 +31,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -65,7 +65,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -246,7 +245,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -429,7 +428,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -439,7 +437,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.12/windows.txt b/requirements/static/ci/py3.12/windows.txt index 863e89886965..db8775c0c379 100644 --- a/requirements/static/ci/py3.12/windows.txt +++ b/requirements/static/ci/py3.12/windows.txt @@ -17,7 +17,7 @@ attrs==23.1.0 # pytest-shell-utilities # pytest-skip-markers # pytest-system-statistics -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.7/cloud.txt b/requirements/static/ci/py3.7/cloud.txt index 43b872f936d5..ff42754208ee 100644 --- a/requirements/static/ci/py3.7/cloud.txt +++ b/requirements/static/ci/py3.7/cloud.txt @@ -44,7 +44,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.7/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -88,7 +88,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pynacl @@ -405,7 +404,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -667,7 +666,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -679,7 +677,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.7/freebsd.txt b/requirements/static/ci/py3.7/freebsd.txt index cca81480e6df..83c0f8a05c55 100644 --- a/requirements/static/ci/py3.7/freebsd.txt +++ b/requirements/static/ci/py3.7/freebsd.txt @@ -29,7 +29,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -62,7 +62,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.7/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -286,7 +285,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -465,7 +464,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.7/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -477,7 +475,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.7/lint.txt b/requirements/static/ci/py3.7/lint.txt index 5ad5a03f4f68..ab45fb203363 100644 --- a/requirements/static/ci/py3.7/lint.txt +++ b/requirements/static/ci/py3.7/lint.txt @@ -56,7 +56,7 @@ backports.zoneinfo==0.2.1 # via # -c requirements/static/ci/py3.7/linux.txt # tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -106,7 +106,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -415,7 +414,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -654,7 +653,6 @@ six==1.16.0 # -c requirements/static/ci/py3.7/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -666,7 +664,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.7/linux.txt b/requirements/static/ci/py3.7/linux.txt index 5973155bed13..7295d938e7d3 100644 --- a/requirements/static/ci/py3.7/linux.txt +++ b/requirements/static/ci/py3.7/linux.txt @@ -37,7 +37,7 @@ backports.entry-points-selectable==1.1.0 # via virtualenv backports.zoneinfo==0.2.1 # via tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -73,7 +73,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -299,7 +298,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -505,7 +504,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -517,7 +515,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.7/windows.txt b/requirements/static/ci/py3.7/windows.txt index 26df2e6b4601..2f58f7a7fc1d 100644 --- a/requirements/static/ci/py3.7/windows.txt +++ b/requirements/static/ci/py3.7/windows.txt @@ -23,7 +23,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.8/cloud.txt b/requirements/static/ci/py3.8/cloud.txt index e04c55630b0c..0b9ffde4b9aa 100644 --- a/requirements/static/ci/py3.8/cloud.txt +++ b/requirements/static/ci/py3.8/cloud.txt @@ -40,7 +40,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.8/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -84,7 +84,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pynacl @@ -392,7 +391,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -654,7 +653,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -666,7 +664,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.8/freebsd.txt b/requirements/static/ci/py3.8/freebsd.txt index 486a8ad0ac29..804264dcd952 100644 --- a/requirements/static/ci/py3.8/freebsd.txt +++ b/requirements/static/ci/py3.8/freebsd.txt @@ -27,7 +27,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -58,7 +58,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.8/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -273,7 +272,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -452,7 +451,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.8/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -464,7 +462,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.8/lint.txt b/requirements/static/ci/py3.8/lint.txt index d4d26cab35e3..dc7137c9cd74 100644 --- a/requirements/static/ci/py3.8/lint.txt +++ b/requirements/static/ci/py3.8/lint.txt @@ -52,7 +52,7 @@ backports.zoneinfo==0.2.1 # via # -c requirements/static/ci/py3.8/linux.txt # tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -98,7 +98,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -400,7 +399,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -639,7 +638,6 @@ six==1.16.0 # -c requirements/static/ci/py3.8/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -651,7 +649,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.8/linux.txt b/requirements/static/ci/py3.8/linux.txt index 1349031a8091..a85202678899 100644 --- a/requirements/static/ci/py3.8/linux.txt +++ b/requirements/static/ci/py3.8/linux.txt @@ -35,7 +35,7 @@ backports.entry-points-selectable==1.1.0 # via virtualenv backports.zoneinfo==0.2.1 # via tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -69,7 +69,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -286,7 +285,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -492,7 +491,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -504,7 +502,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.8/windows.txt b/requirements/static/ci/py3.8/windows.txt index 1fb470c86dcb..a1ff9cae9963 100644 --- a/requirements/static/ci/py3.8/windows.txt +++ b/requirements/static/ci/py3.8/windows.txt @@ -21,7 +21,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.9/cloud.txt b/requirements/static/ci/py3.9/cloud.txt index 49fb9216523c..03e3fb8a7e6e 100644 --- a/requirements/static/ci/py3.9/cloud.txt +++ b/requirements/static/ci/py3.9/cloud.txt @@ -40,7 +40,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.9/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -84,7 +84,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pynacl @@ -392,7 +391,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -656,7 +655,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -668,7 +666,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.9/darwin.txt b/requirements/static/ci/py3.9/darwin.txt index 4500475ede2a..e0fdc9a80bcf 100644 --- a/requirements/static/ci/py3.9/darwin.txt +++ b/requirements/static/ci/py3.9/darwin.txt @@ -30,7 +30,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -61,7 +61,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.9/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -281,7 +280,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 +paramiko==3.4.0 # via # junos-eznc # napalm @@ -462,7 +461,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -472,7 +470,6 @@ six==1.16.0 # junos-eznc # kubernetes # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.9/freebsd.txt b/requirements/static/ci/py3.9/freebsd.txt index 569dc344f7d6..bef6e3b8737e 100644 --- a/requirements/static/ci/py3.9/freebsd.txt +++ b/requirements/static/ci/py3.9/freebsd.txt @@ -27,7 +27,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -58,7 +58,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.9/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -273,7 +272,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -454,7 +453,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -466,7 +464,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.9/lint.txt b/requirements/static/ci/py3.9/lint.txt index bad348247b8a..b9ade888daef 100644 --- a/requirements/static/ci/py3.9/lint.txt +++ b/requirements/static/ci/py3.9/lint.txt @@ -48,7 +48,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.9/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -94,7 +94,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -396,7 +395,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -637,7 +636,6 @@ six==1.16.0 # -c requirements/static/ci/py3.9/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -649,7 +647,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.9/linux.txt b/requirements/static/ci/py3.9/linux.txt index 8f5611c0f920..bbabe2b0878c 100644 --- a/requirements/static/ci/py3.9/linux.txt +++ b/requirements/static/ci/py3.9/linux.txt @@ -33,7 +33,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -67,7 +67,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -284,7 +283,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -492,7 +491,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -504,7 +502,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.9/windows.txt b/requirements/static/ci/py3.9/windows.txt index dcb2c3e4a6b2..264902fc0819 100644 --- a/requirements/static/ci/py3.9/windows.txt +++ b/requirements/static/ci/py3.9/windows.txt @@ -21,7 +21,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/salt/cloud/deploy/bootstrap-salt.sh b/salt/cloud/deploy/bootstrap-salt.sh index f66aeea3a8a2..c632146e44ae 100644 --- a/salt/cloud/deploy/bootstrap-salt.sh +++ b/salt/cloud/deploy/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2023.11.07" +__ScriptVersion="2024.01.04" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -596,6 +596,7 @@ fi echoinfo "Running version: ${__ScriptVersion}" echoinfo "Executed by: ${CALLER}" echoinfo "Command line: '${__ScriptFullName} ${__ScriptArgs}'" +echowarn "Running the unstable version of ${__ScriptName}" # Define installation type if [ "$#" -gt 0 ];then @@ -1521,9 +1522,9 @@ __check_dpkg_architecture() { if [ "$_CUSTOM_REPO_URL" != "null" ]; then warn_msg="Support for arm64 is experimental, make sure the custom repository used has the expected structure and contents." else - # Saltstack official repository has arm64 metadata beginning with Debian 11, + # Saltstack official repository has arm64 metadata beginning with Debian 10, # use amd64 repositories on arm64 for anything older, since all pkgs are arch-independent - if [ "$DISTRO_NAME_L" = "debian" ] && [ "$DISTRO_MAJOR_VERSION" -lt 11 ]; then + if [ "$DISTRO_NAME_L" = "debian" ] && [ "$DISTRO_MAJOR_VERSION" -lt 10 ]; then __REPO_ARCH="amd64" else __REPO_ARCH="arm64" diff --git a/salt/fileclient.py b/salt/fileclient.py index 42e7120aab18..5929c1dbdc23 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -45,15 +45,12 @@ MAX_FILENAME_LENGTH = 255 -def get_file_client(opts, pillar=False, force_local=False): +def get_file_client(opts, pillar=False): """ Read in the ``file_client`` option and return the correct type of file server """ - if force_local: - client = "local" - else: - client = opts.get("file_client", "remote") + client = opts.get("file_client", "remote") if pillar and client == "local": client = "pillar" @@ -1160,7 +1157,7 @@ def _channel_send(self, load, raw=False): ) except salt.exceptions.SaltReqTimeoutError: raise SaltClientError( - f"File client timed out after {int(time.time() - start)}" + f"File client timed out after {int(time.monotonic() - start)} seconds" ) def destroy(self): diff --git a/salt/loader/__init__.py b/salt/loader/__init__.py index 8f2a69dc6b6c..38382a32a513 100644 --- a/salt/loader/__init__.py +++ b/salt/loader/__init__.py @@ -324,6 +324,10 @@ def minion_mods( pack_self="__salt__", ) + # Allow the usage of salt dunder in utils modules. + if utils and isinstance(utils, LazyLoader): + utils.pack["__salt__"] = ret + # Load any provider overrides from the configuration file providers option # Note: Providers can be pkg, service, user or group - not to be confused # with cloud providers. diff --git a/salt/loader/context.py b/salt/loader/context.py index 6bbfe4dbd815..560b05a8d2b3 100644 --- a/salt/loader/context.py +++ b/salt/loader/context.py @@ -12,6 +12,8 @@ # Py<3.7 import contextvars +import salt.exceptions + DEFAULT_CTX_VAR = "loader_ctxvar" loader_ctxvar = contextvars.ContextVar(DEFAULT_CTX_VAR) @@ -69,7 +71,12 @@ def value(self): return loader.pack[self.name] if self.name == loader.pack_self: return loader - return loader.pack[self.name] + try: + return loader.pack[self.name] + except KeyError: + raise salt.exceptions.LoaderError( + f"LazyLoader does not have a packed value for: {self.name}" + ) def get(self, key, default=None): return self.value().get(key, default) diff --git a/salt/minion.py b/salt/minion.py index 29afda235042..15d46b2dacf9 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -114,29 +114,6 @@ # 6. Handle publications -def _sync_grains(opts): - # need sync of custom grains as may be used in pillar compilation - # if coming up initially and remote client, the first sync _grains - # doesn't have opts["master_uri"] set yet during the sync, so need - # to force local, otherwise will throw an exception when attempting - # to retrieve opts["master_uri"] when retrieving key for remote communication - # in addition opts sometimes does not contain extmod_whitelist and extmod_blacklist - # hence set those to defaults, empty dict, if not part of opts, as ref'd in - # salt.utils.extmod sync function - if opts.get("extmod_whitelist", None) is None: - opts["extmod_whitelist"] = {} - - if opts.get("extmod_blacklist", None) is None: - opts["extmod_blacklist"] = {} - - if opts.get("file_client", "remote") == "remote" and not opts.get( - "master_uri", None - ): - salt.utils.extmods.sync(opts, "grains", force_local=True) - else: - salt.utils.extmods.sync(opts, "grains") - - def resolve_dns(opts, fallback=True): """ Resolves the master_ip and master_uri options @@ -944,7 +921,6 @@ def __init__(self, opts, context=None): # Late setup of the opts grains, so we can log from the grains module import salt.loader - _sync_grains(opts) opts["grains"] = salt.loader.grains(opts) super().__init__(opts) @@ -1286,6 +1262,7 @@ def __init__( self.ready = False self.jid_queue = [] if jid_queue is None else jid_queue self.periodic_callbacks = {} + self.req_channel = None if io_loop is None: self.io_loop = salt.ext.tornado.ioloop.IOLoop.current() @@ -1396,6 +1373,16 @@ def connect_master(self, failed=False): """ Return a future which will complete when you are connected to a master """ + if hasattr(self, "pub_channel") and self.pub_channel: + self.pub_channel.on_recv(None) + if hasattr(self.pub_channel, "auth"): + self.pub_channel.auth.invalidate() + if hasattr(self.pub_channel, "close"): + self.pub_channel.close() + if hasattr(self, "req_channel") and self.req_channel: + self.req_channel.close() + self.req_channel = None + # Consider refactoring so that eval_master does not have a subtle side-effect on the contents of the opts array master, self.pub_channel = yield self.eval_master( self.opts, self.timeout, self.safe, failed @@ -2870,7 +2857,9 @@ def handle_event(self, package): self.pub_channel.auth.invalidate() if hasattr(self.pub_channel, "close"): self.pub_channel.close() - del self.pub_channel + if hasattr(self, "req_channel") and self.req_channel: + self.req_channel.close() + self.req_channel = None # if eval_master finds a new master for us, self.connected # will be True again on successful master authentication @@ -3303,6 +3292,9 @@ def destroy(self): if hasattr(self.pub_channel, "close"): self.pub_channel.close() del self.pub_channel + if hasattr(self, "req_channel") and self.req_channel: + self.req_channel.close() + self.req_channel = None if hasattr(self, "periodic_callbacks"): for cb in self.periodic_callbacks.values(): cb.stop() diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index 6014129d58dc..58a6fa85f688 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -47,7 +47,6 @@ SaltInvocationError, ) from salt.modules.cmdmod import _parse_env -from salt.utils.versions import warn_until_date log = logging.getLogger(__name__) @@ -3113,39 +3112,6 @@ def _expand_repo_def(os_name, os_codename=None, **kwargs): return sanitized -def expand_repo_def(**kwargs): - """ - Take a repository definition and expand it to the full pkg repository dict - that can be used for comparison. This is a helper function to make - the Debian/Ubuntu apt sources sane for comparison in the pkgrepo states. - - This is designed to be called from pkgrepo states and will have little use - being called on the CLI. - - CLI Examples: - - .. code-block:: bash - - NOT USABLE IN THE CLI - """ - warn_until_date( - "20240101", - "The pkg.expand_repo_def function is deprecated and set for removal " - "after {date}. This is only unsed internally by the apt pkg state " - "module. If that's not the case, please file an new issue requesting " - "the removal of this deprecation warning", - stacklevel=3, - ) - if "os_name" not in kwargs: - kwargs["os_name"] = __grains__["os"] - if "os_codename" not in kwargs: - if "lsb_distrib_codename" in kwargs: - kwargs["os_codename"] = kwargs["lsb_distrib_codename"] - else: - kwargs["os_codename"] = __grains__.get("oscodename") - return _expand_repo_def(**kwargs) - - def _parse_selections(dpkgselection): """ Parses the format from ``dpkg --get-selections`` and return a format that diff --git a/salt/modules/artifactory.py b/salt/modules/artifactory.py index 0f01d89e82f5..7eaf9c724580 100644 --- a/salt/modules/artifactory.py +++ b/salt/modules/artifactory.py @@ -79,7 +79,7 @@ def get_latest_snapshot( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -165,7 +165,7 @@ def get_snapshot( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -238,7 +238,7 @@ def get_latest_release( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -320,8 +320,9 @@ def get_release( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) + ## f"{username.replace("\n", "")}:{password.replace("\n", "")}") ) ) release_url, file_name = _get_release_url( diff --git a/salt/modules/mac_assistive.py b/salt/modules/mac_assistive.py index 8583c40efba7..90ab8814146f 100644 --- a/salt/modules/mac_assistive.py +++ b/salt/modules/mac_assistive.py @@ -11,6 +11,7 @@ import hashlib import logging import sqlite3 +import time import salt.utils.platform import salt.utils.stringutils @@ -36,7 +37,7 @@ def __virtual__(): return __virtualname__ -def install(app_id, enable=True): +def install(app_id, enable=True, tries=3, wait=10): """ Install a bundle ID or command as being allowed to use assistive access. @@ -47,6 +48,12 @@ def install(app_id, enable=True): enabled Sets enabled or disabled status. Default is ``True``. + tries + How many times to try and write to a read-only tcc. Default is ``True``. + + wait + Number of seconds to wait between tries. Default is ``10``. + CLI Example: .. code-block:: bash @@ -54,13 +61,23 @@ def install(app_id, enable=True): salt '*' assistive.install /usr/bin/osascript salt '*' assistive.install com.smileonmymac.textexpander """ - with TccDB() as db: - try: - return db.install(app_id, enable=enable) - except sqlite3.Error as exc: - raise CommandExecutionError( - "Error installing app({}): {}".format(app_id, exc) - ) + num_tries = 1 + while True: + with TccDB() as db: + try: + return db.install(app_id, enable=enable) + except sqlite3.Error as exc: + if "attempt to write a readonly database" not in str(exc): + raise CommandExecutionError( + "Error installing app({}): {}".format(app_id, exc) + ) + elif num_tries < tries: + time.sleep(wait) + num_tries += 1 + else: + raise CommandExecutionError( + "Error installing app({}): {}".format(app_id, exc) + ) def installed(app_id): @@ -175,22 +192,21 @@ def __init__(self, path=None): def _check_table_digest(self): # This logic comes from https://github.com/jacobsalmela/tccutil which is # Licensed under GPL-2.0 - with self.connection as conn: - cursor = conn.execute( - "SELECT sql FROM sqlite_master WHERE name='access' and type='table'" - ) - for row in cursor.fetchall(): - digest = hashlib.sha1(row["sql"].encode()).hexdigest()[:10] - if digest in ("ecc443615f", "80a4bb6912"): - # Mojave and Catalina - self.ge_mojave_and_catalina = True - elif digest in ("3d1c2a0e97", "cef70648de"): - # BigSur and later - self.ge_bigsur_and_later = True - else: - raise CommandExecutionError( - "TCC Database structure unknown for digest '{}'".format(digest) - ) + cursor = self.connection.execute( + "SELECT sql FROM sqlite_master WHERE name='access' and type='table'" + ) + for row in cursor.fetchall(): + digest = hashlib.sha1(row["sql"].encode()).hexdigest()[:10] + if digest in ("ecc443615f", "80a4bb6912"): + # Mojave and Catalina + self.ge_mojave_and_catalina = True + elif digest in ("3d1c2a0e97", "cef70648de"): + # BigSur and later + self.ge_bigsur_and_later = True + else: + raise CommandExecutionError( + "TCC Database structure unknown for digest '{}'".format(digest) + ) def _get_client_type(self, app_id): if app_id[0] == "/": @@ -200,14 +216,13 @@ def _get_client_type(self, app_id): return 0 def installed(self, app_id): - with self.connection as conn: - cursor = conn.execute( - "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", - (app_id,), - ) - for row in cursor.fetchall(): - if row: - return True + cursor = self.connection.execute( + "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", + (app_id,), + ) + for row in cursor.fetchall(): + if row: + return True return False def install(self, app_id, enable=True): @@ -234,9 +249,8 @@ def install(self, app_id, enable=True): # indirect_object_identifier # ), # FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE); - with self.connection as conn: - conn.execute( - """ + self.connection.execute( + """ INSERT or REPLACE INTO access VALUES ( 'kTCCServiceAccessibility', ?, @@ -253,8 +267,9 @@ def install(self, app_id, enable=True): 0 ) """, - (app_id, client_type, auth_value), - ) + (app_id, client_type, auth_value), + ) + self.connection.commit() elif self.ge_mojave_and_catalina: # CREATE TABLE IF NOT EXISTS "access" ( # service TEXT NOT NULL, @@ -276,9 +291,8 @@ def install(self, app_id, enable=True): # indirect_object_identifier # ), # FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE); - with self.connection as conn: - conn.execute( - """ + self.connection.execute( + """ INSERT or REPLACE INTO access VALUES( 'kTCCServiceAccessibility', ?, @@ -294,8 +308,9 @@ def install(self, app_id, enable=True): 0 ) """, - (app_id, client_type, auth_value), - ) + (app_id, client_type, auth_value), + ) + self.connection.commit() return True def enabled(self, app_id): @@ -303,14 +318,13 @@ def enabled(self, app_id): column = "auth_value" elif self.ge_mojave_and_catalina: column = "allowed" - with self.connection as conn: - cursor = conn.execute( - "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", - (app_id,), - ) - for row in cursor.fetchall(): - if row[column]: - return True + cursor = self.connection.execute( + "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", + (app_id,), + ) + for row in cursor.fetchall(): + if row[column]: + return True return False def enable(self, app_id): @@ -320,13 +334,13 @@ def enable(self, app_id): column = "auth_value" elif self.ge_mojave_and_catalina: column = "allowed" - with self.connection as conn: - conn.execute( - "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( - column - ), - (1, app_id), - ) + self.connection.execute( + "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( + column + ), + (1, app_id), + ) + self.connection.commit() return True def disable(self, app_id): @@ -336,23 +350,23 @@ def disable(self, app_id): column = "auth_value" elif self.ge_mojave_and_catalina: column = "allowed" - with self.connection as conn: - conn.execute( - "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( - column - ), - (0, app_id), - ) + self.connection.execute( + "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( + column + ), + (0, app_id), + ) + self.connection.commit() return True def remove(self, app_id): if not self.installed(app_id): return False - with self.connection as conn: - conn.execute( - "DELETE from access where client IS ? AND service IS 'kTCCServiceAccessibility'", - (app_id,), - ) + self.connection.execute( + "DELETE from access where client IS ? AND service IS 'kTCCServiceAccessibility'", + (app_id,), + ) + self.connection.commit() return True def __enter__(self): diff --git a/salt/modules/slsutil.py b/salt/modules/slsutil.py index 4345bc02e146..fe7ba15f336c 100644 --- a/salt/modules/slsutil.py +++ b/salt/modules/slsutil.py @@ -163,13 +163,16 @@ def run(): if not path and not string: raise salt.exceptions.SaltInvocationError("Must pass either path or string") + if path and string: + raise salt.exceptions.SaltInvocationError("Must not pass both path and string") + renderers = salt.loader.render(__opts__, __salt__) if path: path_or_string = __salt__["cp.get_url"]( path, saltenv=kwargs.get("saltenv", "base") ) - elif string: + if string: path_or_string = ":string:" kwargs["input_data"] = string diff --git a/salt/netapi/rest_tornado/saltnado.py b/salt/netapi/rest_tornado/saltnado.py index 44c4089ccbbd..6d47de1446a4 100644 --- a/salt/netapi/rest_tornado/saltnado.py +++ b/salt/netapi/rest_tornado/saltnado.py @@ -396,6 +396,9 @@ def _handle_event_socket_recv(self, raw): ) del self.timeout_map[future] + def destroy(self): + self.event.destroy() + class BaseSaltAPIHandler(salt.ext.tornado.web.RequestHandler): # pylint: disable=W0223 ct_out_map = ( diff --git a/salt/utils/azurearm.py b/salt/utils/azurearm.py index 276cbb66b369..9ae128273cc2 100644 --- a/salt/utils/azurearm.py +++ b/salt/utils/azurearm.py @@ -47,8 +47,6 @@ except ImportError: HAS_AZURE = False -__opts__ = salt.config.minion_config("/etc/salt/minion") -__salt__ = salt.loader.minion_mods(__opts__) log = logging.getLogger(__name__) diff --git a/salt/utils/extmods.py b/salt/utils/extmods.py index 6a4d5c14440c..a7dc265476f5 100644 --- a/salt/utils/extmods.py +++ b/salt/utils/extmods.py @@ -39,7 +39,6 @@ def sync( saltenv=None, extmod_whitelist=None, extmod_blacklist=None, - force_local=False, ): """ Sync custom modules into the extension_modules directory @@ -83,9 +82,7 @@ def sync( "Cannot create cache module directory %s. Check permissions.", mod_dir, ) - with salt.fileclient.get_file_client( - opts, pillar=False, force_local=force_local - ) as fileclient: + with salt.fileclient.get_file_client(opts) as fileclient: for sub_env in saltenv: log.info("Syncing %s for environment '%s'", form, sub_env) cache = [] diff --git a/salt/utils/vault.py b/salt/utils/vault.py index cbd2aec2b0b1..07fcf3929b1d 100644 --- a/salt/utils/vault.py +++ b/salt/utils/vault.py @@ -36,8 +36,9 @@ def __virtual__(): logging.getLogger("requests").setLevel(logging.WARNING) return True except Exception as e: # pylint: disable=broad-except - log.error("Could not load __salt__: %s", e) + log.error("Could not load __salt__: %s", e, exc_info=True) return False + return True def _get_token_and_url_from_master(): diff --git a/tests/pytests/integration/cli/test_matcher.py b/tests/pytests/integration/cli/test_matcher.py index 2e91eba7ad41..5d3ef4e3309e 100644 --- a/tests/pytests/integration/cli/test_matcher.py +++ b/tests/pytests/integration/cli/test_matcher.py @@ -506,7 +506,9 @@ def test_salt_documentation(salt_cli, salt_minion): """ Test to see if we're supporting --doc """ - ret = salt_cli.run("-d", "test", minion_tgt=salt_minion.id) + # Setting an explicity long timeout otherwise this test may fail when the + # system is under load. + ret = salt_cli.run("-d", "test", minion_tgt=salt_minion.id, _timeout=90) assert ret.returncode == 0 assert "test.ping" in ret.data diff --git a/tests/pytests/integration/cli/test_salt_call.py b/tests/pytests/integration/cli/test_salt_call.py index b1af43050e1d..6aa6730ec5c2 100644 --- a/tests/pytests/integration/cli/test_salt_call.py +++ b/tests/pytests/integration/cli/test_salt_call.py @@ -429,74 +429,3 @@ def test_local_salt_call_no_function_no_retcode(salt_call_cli): assert "test" in ret.data assert ret.data["test"] == "'test' is not available." assert "test.echo" in ret.data - - -def test_state_highstate_custom_grains(salt_master, salt_minion_factory): - """ - This test ensure that custom grains in salt://_grains are loaded before pillar compilation - to ensure that any use of custom grains in pillar files are available, this implies that - a sync of grains occurs before loading the regular /etc/salt/grains or configuration file - grains, as well as the usual grains. - - Note: cannot use salt_minion and salt_call_cli, since these will be loaded before - the pillar and custom_grains files are written, hence using salt_minion_factory. - """ - pillar_top_sls = """ - base: - '*': - - defaults - """ - - pillar_defaults_sls = """ - mypillar: "{{ grains['custom_grain'] }}" - """ - - salt_top_sls = """ - base: - '*': - - test - """ - - salt_test_sls = """ - "donothing": - test.nop: [] - """ - - salt_custom_grains_py = """ - def main(): - return {'custom_grain': 'test_value'} - """ - assert salt_master.is_running() - with salt_minion_factory.started(): - salt_minion = salt_minion_factory - salt_call_cli = salt_minion_factory.salt_call_cli() - with salt_minion.pillar_tree.base.temp_file( - "top.sls", pillar_top_sls - ), salt_minion.pillar_tree.base.temp_file( - "defaults.sls", pillar_defaults_sls - ), salt_minion.state_tree.base.temp_file( - "top.sls", salt_top_sls - ), salt_minion.state_tree.base.temp_file( - "test.sls", salt_test_sls - ), salt_minion.state_tree.base.temp_file( - "_grains/custom_grain.py", salt_custom_grains_py - ): - ret = salt_call_cli.run("--local", "state.highstate") - assert ret.returncode == 0 - ret = salt_call_cli.run("--local", "pillar.items") - assert ret.returncode == 0 - assert ret.data - pillar_items = ret.data - assert "mypillar" in pillar_items - assert pillar_items["mypillar"] == "test_value" - - -def test_salt_call_versions(salt_call_cli, caplog): - """ - Call test.versions without '--local' to test grains - are sync'd without any missing keys in opts - """ - with caplog.at_level(logging.DEBUG): - ret = salt_call_cli.run("test.versions") - assert ret.returncode == 0 - assert "Failed to sync grains module: 'master_uri'" not in caplog.messages diff --git a/tests/pytests/integration/minion/test_return_retries.py b/tests/pytests/integration/minion/test_return_retries.py index 8a226d26cd46..f70609cdb1ad 100644 --- a/tests/pytests/integration/minion/test_return_retries.py +++ b/tests/pytests/integration/minion/test_return_retries.py @@ -3,6 +3,8 @@ import pytest from saltfactories.utils import random_string +import salt.utils.files + @pytest.fixture(scope="function") def salt_minion_retry(salt_master, salt_minion_id): @@ -28,7 +30,7 @@ def salt_minion_retry(salt_master, salt_minion_id): @pytest.mark.slow_test def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): # run job that takes some time for warmup - rtn = salt_cli.run("test.sleep", "5", "--async", minion_tgt=salt_minion_retry.id) + rtn = salt_cli.run("test.sleep", "3.5", "--async", minion_tgt=salt_minion_retry.id) # obtain JID jid = rtn.stdout.strip().split(" ")[-1] @@ -53,17 +55,20 @@ def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): @pytest.mark.slow_test -def test_pillar_timeout(salt_master_factory): - cmd = """ - python -c "import time; time.sleep(2.5); print('{\\"foo\\": \\"bar\\"}');\" - """.strip() +def test_pillar_timeout(salt_master_factory, tmp_path): + cmd = 'print(\'{"foo": "bar"}\');\n' + + with salt.utils.files.fopen(tmp_path / "script.py", "w") as fp: + fp.write(cmd) + master_overrides = { "ext_pillar": [ - {"cmd_json": cmd}, + {"cmd_json": f"python {tmp_path / 'script.py'}"}, ], "auto_accept": True, "worker_threads": 2, "peer": True, + "minion_data_cache": False, } minion_overrides = { "auth_timeout": 20, @@ -77,7 +82,7 @@ def test_pillar_timeout(salt_master_factory): - name: example - changes: True - result: True - - comment: "Nothing has actually been changed" + - comment: "Nothing has actually been changed {{ pillar['foo'] }}" """ master = salt_master_factory.salt_master_daemon( "pillar-timeout-master", @@ -104,6 +109,9 @@ def test_pillar_timeout(salt_master_factory): "{}.sls".format(sls_name), sls_contents ) with master.started(), minion1.started(), minion2.started(), minion3.started(), minion4.started(), sls_tempfile: + cmd = 'import time; time.sleep(6); print(\'{"foo": "bang"}\');\n' + with salt.utils.files.fopen(tmp_path / "script.py", "w") as fp: + fp.write(cmd) proc = cli.run("state.sls", sls_name, minion_tgt="*") # At least one minion should have a Pillar timeout assert proc.returncode == 1 diff --git a/tests/pytests/integration/netapi/rest_tornado/conftest.py b/tests/pytests/integration/netapi/rest_tornado/conftest.py index f8923f01efb7..c69f8a4c28a2 100644 --- a/tests/pytests/integration/netapi/rest_tornado/conftest.py +++ b/tests/pytests/integration/netapi/rest_tornado/conftest.py @@ -18,9 +18,13 @@ def client_config(client_config, netapi_port): @pytest.fixture def app(app_urls, load_auth, client_config, minion_config, salt_sub_minion): - return netapi.build_tornado_app( + app = netapi.build_tornado_app( app_urls, load_auth, client_config, minion_config, setup_event_listener=True ) + try: + yield app + finally: + app.event_listener.destroy() @pytest.fixture diff --git a/tests/pytests/pkg/download/test_pkg_download.py b/tests/pytests/pkg/download/test_pkg_download.py index 0fa9089e77dd..dce3880ed8ba 100644 --- a/tests/pytests/pkg/download/test_pkg_download.py +++ b/tests/pytests/pkg/download/test_pkg_download.py @@ -256,6 +256,9 @@ def setup_redhat_family( ): arch = os.environ.get("SALT_REPO_ARCH") or "x86_64" + if os_name == "photon": + os_version = f"{os_version}.0" + if repo_subpath == "minor": repo_url_base = ( f"{root_url}/{os_name}/{os_version}/{arch}/{repo_subpath}/{salt_release}" diff --git a/tests/pytests/pkg/integration/test_check_imports.py b/tests/pytests/pkg/integration/test_check_imports.py index eac49f48fac2..f16aa338bf74 100644 --- a/tests/pytests/pkg/integration/test_check_imports.py +++ b/tests/pytests/pkg/integration/test_check_imports.py @@ -19,12 +19,46 @@ def run(): config = {} for module in [ - 'templates', 'platform', 'cli', 'executors', 'config', 'wheel', 'netapi', - 'cache', 'proxy', 'transport', 'metaproxy', 'modules', 'tokens', 'matchers', - 'acl', 'auth', 'log', 'engines', 'client', 'returners', 'runners', 'tops', - 'output', 'daemons', 'thorium', 'renderers', 'states', 'cloud', 'roster', - 'beacons', 'pillar', 'spm', 'utils', 'sdb', 'fileserver', 'defaults', - 'ext', 'queues', 'grains', 'serializers' + '_logging', + 'acl', + 'auth', + 'beacons', + 'cache', + 'cli', + 'client', + 'cloud', + 'config', + 'daemons', + 'defaults', + 'engines', + 'executors', + 'ext', + 'fileserver', + 'grains', + 'matchers', + 'metaproxy', + 'modules', + 'netapi', + 'output', + 'pillar', + 'platform', + 'proxy', + 'queues', + 'renderers', + 'returners', + 'roster', + 'runners', + 'sdb', + 'serializers', + 'spm', + 'states', + 'templates', + 'thorium', + 'tokens', + 'tops', + 'transport', + 'utils', + 'wheel', ]: import_name = "salt.{}".format(module) try: diff --git a/tests/pytests/scenarios/blackout/test_minion_blackout.py b/tests/pytests/scenarios/blackout/test_minion_blackout.py index fcc288edfb78..581ad2b135ba 100644 --- a/tests/pytests/scenarios/blackout/test_minion_blackout.py +++ b/tests/pytests/scenarios/blackout/test_minion_blackout.py @@ -11,7 +11,11 @@ def _check_skip(grains): - if grains["os"] == "Windows" and grains["osrelease"] == "2016Server": + """ + Skip on windows because these tests are flaky, we need to spend some time to + debug why. + """ + if grains["os"] == "Windows": return True return False diff --git a/tests/pytests/scenarios/multimaster/beacons/test_inotify.py b/tests/pytests/scenarios/multimaster/beacons/test_inotify.py index c16384d7b6fb..16babf1cf742 100644 --- a/tests/pytests/scenarios/multimaster/beacons/test_inotify.py +++ b/tests/pytests/scenarios/multimaster/beacons/test_inotify.py @@ -46,6 +46,7 @@ def setup_beacons(mm_master_1_salt_cli, salt_mm_minion_1, inotify_test_path): "inotify", beacon_data=[{"files": {str(inotify_test_path): {"mask": ["create"]}}}], minion_tgt=salt_mm_minion_1.id, + timeout=60, ) assert ret.returncode == 0 log.debug("Inotify beacon add returned: %s", ret.data or ret.stdout) diff --git a/tests/pytests/unit/conftest.py b/tests/pytests/unit/conftest.py index 587fc43babc1..c7152f3d2d14 100644 --- a/tests/pytests/unit/conftest.py +++ b/tests/pytests/unit/conftest.py @@ -1,3 +1,5 @@ +import os + import pytest import salt.config @@ -20,6 +22,7 @@ def minion_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/minion.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "minion") return opts @@ -37,6 +40,7 @@ def master_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/master.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "master") return opts @@ -55,4 +59,5 @@ def syndic_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/syndic.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "syndic") return opts diff --git a/tests/pytests/unit/fileclient/test_fileclient.py b/tests/pytests/unit/fileclient/test_fileclient.py index 0e072e5c36f4..cbdbd763313c 100644 --- a/tests/pytests/unit/fileclient/test_fileclient.py +++ b/tests/pytests/unit/fileclient/test_fileclient.py @@ -126,7 +126,8 @@ def mock_dumps(*args): # Crypticle must return bytes to pass to transport.RequestClient.send client.auth._crypticle = Mock() client.auth._crypticle.dumps = mock_dumps - with pytest.raises(salt.exceptions.SaltClientError): + msg = r"^File client timed out after \d{1,4} seconds$" + with pytest.raises(salt.exceptions.SaltClientError, match=msg): client.file_list() diff --git a/tests/pytests/unit/loader/test_loader.py b/tests/pytests/unit/loader/test_loader.py index f4a4b51a58fa..3c26b435c8c0 100644 --- a/tests/pytests/unit/loader/test_loader.py +++ b/tests/pytests/unit/loader/test_loader.py @@ -10,6 +10,7 @@ import pytest +import salt.exceptions import salt.loader import salt.loader.lazy @@ -62,3 +63,22 @@ def test_raw_mod_functions(): ret = salt.loader.raw_mod(opts, "grains", "get") for k, v in ret.items(): assert isinstance(v, salt.loader.lazy.LoadedFunc) + + +def test_named_loader_context_name_not_packed(tmp_path): + opts = { + "optimization_order": [0], + } + contents = """ + from salt.loader.dunder import loader_context + __not_packed__ = loader_context.named_context("__not_packed__") + def foobar(): + return __not_packed__["not.packed"]() + """ + with pytest.helpers.temp_file("mymod.py", contents, directory=tmp_path): + loader = salt.loader.LazyLoader([tmp_path], opts) + with pytest.raises( + salt.exceptions.LoaderError, + match="LazyLoader does not have a packed value for: __not_packed__", + ): + loader["mymod.foobar"]() diff --git a/tests/pytests/unit/loader/test_loading_modules.py b/tests/pytests/unit/loader/test_loading_modules.py new file mode 100644 index 000000000000..861e9197ecf0 --- /dev/null +++ b/tests/pytests/unit/loader/test_loading_modules.py @@ -0,0 +1,38 @@ +import pytest + +import salt.loader +import salt.loader.lazy +import salt.modules.boto_vpc +import salt.modules.virt + + +@pytest.fixture +def minion_mods(minion_opts): + utils = salt.loader.utils(minion_opts) + return salt.loader.minion_mods(minion_opts, utils=utils) + + +@pytest.mark.skipif( + not salt.modules.boto_vpc.HAS_BOTO, reason="boto must be installed." +) +def test_load_boto_vpc(minion_mods): + func = None + try: + func = minion_mods["boto_vpc.check_vpc"] + except KeyError: + pytest.fail("loader should not raise KeyError") + assert func is not None + assert isinstance(func, salt.loader.lazy.LoadedFunc) + + +@pytest.mark.skipif( + not salt.modules.virt.HAS_LIBVIRT, reason="libvirt-python must be installed." +) +def test_load_virt(minion_mods): + func = None + try: + func = minion_mods["virt.ctrl_alt_del"] + except KeyError: + pytest.fail("loader should not raise KeyError") + assert func is not None + assert isinstance(func, salt.loader.lazy.LoadedFunc) diff --git a/tests/pytests/unit/modules/test_aptpkg.py b/tests/pytests/unit/modules/test_aptpkg.py index 7958a206a368..fdad2be4343d 100644 --- a/tests/pytests/unit/modules/test_aptpkg.py +++ b/tests/pytests/unit/modules/test_aptpkg.py @@ -1269,8 +1269,8 @@ def test_expand_repo_def_cdrom(): # Valid source repo = "# deb cdrom:[Debian GNU/Linux 11.4.0 _Bullseye_ - Official amd64 NETINST 20220709-10:31]/ bullseye main\n" - sanitized = aptpkg.expand_repo_def(os_name="debian", repo=repo, file=source_file) - log.warning("SAN: %s", sanitized) + sanitized = aptpkg._expand_repo_def(os_name="debian", repo=repo, file=source_file) + log.debug("SAN: %s", sanitized) assert isinstance(sanitized, dict) assert "uri" in sanitized @@ -1280,7 +1280,7 @@ def test_expand_repo_def_cdrom(): # Pass the architecture and make sure it is added the the line attribute repo = "deb http://cdn-aws.deb.debian.org/debian/ stretch main\n" - sanitized = aptpkg.expand_repo_def( + sanitized = aptpkg._expand_repo_def( os_name="debian", repo=repo, file=source_file, architectures="amd64" ) diff --git a/tests/pytests/unit/modules/test_artifactory.py b/tests/pytests/unit/modules/test_artifactory.py index 220cdf9ad88b..722bb7656c84 100644 --- a/tests/pytests/unit/modules/test_artifactory.py +++ b/tests/pytests/unit/modules/test_artifactory.py @@ -278,7 +278,7 @@ def test_get_latest_snapshot_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/snapshot", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) @@ -305,7 +305,7 @@ def test_get_snapshot_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/snapshot", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) @@ -334,7 +334,7 @@ def test_get_latest_release_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/release", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) @@ -361,7 +361,7 @@ def test_get_release_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/release", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) diff --git a/tests/pytests/unit/modules/test_slsutil.py b/tests/pytests/unit/modules/test_slsutil.py index 49651d55c27d..46eb221552a0 100644 --- a/tests/pytests/unit/modules/test_slsutil.py +++ b/tests/pytests/unit/modules/test_slsutil.py @@ -1,18 +1,20 @@ import logging +from io import StringIO import pytest import salt.exceptions import salt.modules.slsutil as slsutil -from tests.support.mock import MagicMock +from tests.support.mock import MagicMock, patch log = logging.getLogger(__name__) @pytest.fixture -def configure_loader_modules(master_dirs, master_files): +def configure_loader_modules(master_dirs, master_files, minion_opts): return { slsutil: { + "__opts__": minion_opts, "__salt__": { "cp.list_master": MagicMock(return_value=master_files), "cp.list_master_dirs": MagicMock(return_value=master_dirs), @@ -47,6 +49,21 @@ def test_banner(): check_banner(commentchar="//", borderchar="-") check_banner(title="title here", text="text here") check_banner(commentchar=" *") + check_banner(commentchar=" *", newline=False) + + # Test when width result in a raised exception + with pytest.raises(salt.exceptions.ArgumentValueError): + slsutil.banner(width=4) + + ret = slsutil.banner( + title="title here", text="text here", blockstart="/*", blockend="*/" + ) + lines = ret.splitlines() + # test blockstart + assert lines[0] == "/*" + + # test blockend + assert lines[-1] == "*/" def check_banner( @@ -125,3 +142,159 @@ def test_findup(): with pytest.raises(salt.exceptions.CommandExecutionError): slsutil.findup("red", "default.conf") + + with pytest.raises(salt.exceptions.SaltInvocationError): + with patch.object(slsutil, "path_exists", return_value=False): + slsutil.findup("red", "default.conf") + + with pytest.raises(salt.exceptions.SaltInvocationError): + slsutil.findup("red", {"file": "default.conf"}) + + +def test_update(): + """ + Test update function + """ + + ret = slsutil.update({"foo": "Foo"}, {"bar": "Bar"}) + assert ret == {"foo": "Foo", "bar": "Bar"} + + ret = slsutil.update({"foo": "Foo"}, {"foo": "Bar"}, merge_lists=False) + assert ret == {"foo": "Bar"} + + +def test_merge(): + """ + Test merge function + """ + + ret = slsutil.merge({"foo": "Foo"}, {"bar": "Bar"}, strategy="smart") + assert ret == {"foo": "Foo", "bar": "Bar"} + + ret = slsutil.merge({"foo": "Foo"}, {"foo": "Bar"}, strategy="aggregate") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge({"foo": "Foo"}, {"foo": "Bar"}, strategy="list") + assert ret == {"foo": ["Foo", "Bar"]} + + ret = slsutil.merge({"foo": "Foo"}, {"foo": "Bar"}, strategy="overwrite") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge( + {"foo": {"Foo": "Bar"}}, {"foo": {"Foo": "Baz"}}, strategy="recurse" + ) + assert ret == {"foo": {"Foo": "Baz"}} + + +def test_merge_all(): + """ + Test merge_all function + """ + + ret = slsutil.merge_all([{"foo": "Foo"}, {"bar": "Bar"}], strategy="smart") + assert ret == {"foo": "Foo", "bar": "Bar"} + + ret = slsutil.merge_all([{"foo": "Foo"}, {"foo": "Bar"}], strategy="aggregate") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge_all([{"foo": "Foo"}, {"foo": "Bar"}], strategy="overwrite") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge_all( + [{"foo": {"Foo": "Bar"}}, {"foo": {"Foo": "Baz"}}], strategy="recurse" + ) + assert ret == {"foo": {"Foo": "Baz"}} + + +def test_renderer(): + """ + Test renderer function + """ + with patch.dict( + slsutil.__utils__, {"stringio.is_readable": MagicMock(return_value=False)} + ): + ret = slsutil.renderer(string="Hello, {{ name }}.", name="world") + assert ret == "Hello, world." + + with pytest.raises(salt.exceptions.SaltInvocationError) as exc: + slsutil.renderer() + assert str(exc.value) == "Must pass path or string." + + with pytest.raises(salt.exceptions.SaltInvocationError) as exc: + slsutil.renderer(path="/path/to/file", string="Hello world") + assert str(exc.value) == "Must not pass both path and string." + + with patch.dict( + slsutil.__salt__, {"cp.get_url": MagicMock(return_value="/path/to/file")} + ): + with patch.dict( + slsutil.__utils__, {"stringio.is_readable": MagicMock(return_value=True)} + ): + rendered_file = "Hello, world." + with patch( + "salt.template.compile_template", + MagicMock(return_value=StringIO(rendered_file)), + ): + ret = slsutil.renderer(path="/path/to/file") + assert ret == "Hello, world." + + +def test_serialize(): + """ + Test serialize function + """ + ret = slsutil.serialize("json", obj={"foo": "Foo!"}) + assert ret == '{"foo": "Foo!"}' + + +def test_deserialize(): + """ + Test serialize function + """ + ret = slsutil.deserialize("json", '{"foo": "Foo!"}') + assert ret == {"foo": "Foo!"} + + +def dummy_function(args=None, kwargs=None): + return True + + +def test__set_context(): + """ + Test _set_context + """ + with patch.dict(slsutil.__context__, {}): + + slsutil._set_context( + ["level_one", "level_two", "level_three"], dummy_function, force=True + ) + assert slsutil.__context__ == { + "level_one": {"level_two": {"level_three": True}} + } + + with patch.dict(slsutil.__context__, {}): + + slsutil._set_context( + ["level_one", "level_two", "level_three"], + dummy_function, + fun_kwargs={"key_one": "arg_one"}, + force=True, + ) + assert slsutil.__context__ == { + "level_one": {"level_two": {"level_three": True}} + } + + +def test__get_serializer_fn(): + """ + Test _set_context + """ + # Invalid serializer + with pytest.raises(salt.exceptions.CommandExecutionError) as exc: + slsutil._get_serialize_fn("bad_yaml", "badfunc") + assert str(exc.value) == "Serializer 'bad_yaml' not found." + + # Invalid serializer function + with pytest.raises(salt.exceptions.CommandExecutionError) as exc: + slsutil._get_serialize_fn("yaml", "foobar") + assert str(exc.value) == "Serializer 'yaml' does not implement foobar." diff --git a/tests/pytests/unit/modules/test_tomcat.py b/tests/pytests/unit/modules/test_tomcat.py new file mode 100644 index 000000000000..869c3f96c851 --- /dev/null +++ b/tests/pytests/unit/modules/test_tomcat.py @@ -0,0 +1,58 @@ +""" + Tests cases for salt.modules.tomcat +""" + + +import io +import urllib.request + +import pytest + +import salt.modules.tomcat as tomcat +from tests.support.mock import MagicMock, patch + + +@pytest.fixture +def configure_loader_modules(): + return {tomcat: {}} + + +def test_tomcat_wget_no_bytestring(): + responses = { + "string": io.StringIO("Best response ever\r\nAnd you know it!"), + "bytes": io.BytesIO(b"Best response ever\r\nAnd you know it!"), + } + + string_mock = MagicMock(return_value=responses["string"]) + bytes_mock = MagicMock(return_value=responses["bytes"]) + with patch( + "salt.modules.tomcat._auth", + MagicMock( + return_value=urllib.request.build_opener( + urllib.request.HTTPBasicAuthHandler(), + urllib.request.HTTPDigestAuthHandler(), + ) + ), + ): + with patch("urllib.request.urlopen", string_mock): + response = tomcat._wget("tomcat.wait", url="http://localhost:8080/nofail") + for line in response["msg"]: + assert isinstance(line, str) + + with patch("urllib.request.urlopen", bytes_mock): + try: + response = tomcat._wget( + "tomcat.wait", url="http://localhost:8080/nofail" + ) + except TypeError as type_error: + if ( + type_error.args[0] + == "startswith first arg must be bytes or a tuple of bytes," + " not str" + ): + print("Got back a byte string, should've been a string") + else: + raise type_error + + for line in response["msg"]: + assert isinstance(line, str) diff --git a/tests/pytests/unit/pillar/test_pillar.py b/tests/pytests/unit/pillar/test_pillar.py index 11eda34318be..77e25527cf1e 100644 --- a/tests/pytests/unit/pillar/test_pillar.py +++ b/tests/pytests/unit/pillar/test_pillar.py @@ -173,5 +173,6 @@ def test_remote_pillar_timeout(temp_salt_minion, tmp_path): mock = MagicMock() mock.side_effect = salt.exceptions.SaltReqTimeoutError() pillar.channel.crypted_transfer_decode_dictentry = mock + msg = r"^Pillar timed out after \d{1,4} seconds$" with pytest.raises(salt.exceptions.SaltClientError): pillar.compile_pillar() diff --git a/tests/pytests/unit/states/test_grains.py b/tests/pytests/unit/states/test_grains.py new file mode 100644 index 000000000000..8015eaf9340a --- /dev/null +++ b/tests/pytests/unit/states/test_grains.py @@ -0,0 +1,796 @@ +""" +unit tests for the grains state +""" +import contextlib +import os + +import pytest + +import salt.modules.grains as grainsmod +import salt.states.grains as grains +import salt.utils.files +import salt.utils.stringutils +import salt.utils.yaml +from tests.support.mock import MagicMock, patch + + +@pytest.fixture +def configure_loader_modules(minion_opts): + minion_opts["local"] = True + minion_opts["test"] = False + loader_globals = { + "__opts__": minion_opts, + "__salt__": { + "cmd.run_all": MagicMock( + return_value={"pid": 5, "retcode": 0, "stderr": "", "stdout": ""} + ), + "grains.get": grainsmod.get, + "grains.set": grainsmod.set, + "grains.setval": grainsmod.setval, + "grains.delval": grainsmod.delval, + "grains.append": grainsmod.append, + "grains.remove": grainsmod.remove, + "saltutil.sync_grains": MagicMock(), + }, + } + return {grains: loader_globals, grainsmod: loader_globals} + + +def assert_grain_file_content(grains_string): + grains_file = os.path.join(grains.__opts__["conf_dir"], "grains") + with salt.utils.files.fopen(grains_file, "r") as grf: + grains_data = salt.utils.stringutils.to_unicode(grf.read()) + assert grains_string == grains_data + + +@contextlib.contextmanager +def set_grains(grains_data): + with patch.dict(grains.__grains__, grains_data): + with patch.dict(grainsmod.__grains__, grains_data): + grains_file = os.path.join(grains.__opts__["conf_dir"], "grains") + with salt.utils.files.fopen(grains_file, "w+") as grf: + salt.utils.yaml.safe_dump(grains_data, grf, default_flow_style=False) + yield + + +# 'exists' function tests: 2 + + +def test_exists_missing(): + with set_grains({"a": "aval"}): + ret = grains.exists(name="foo") + assert ret["result"] is False + assert ret["comment"] == "Grain does not exist" + assert ret["changes"] == {} + + +def test_exists_found(): + with set_grains({"a": "aval", "foo": "bar"}): + # Grain already set + ret = grains.exists(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Grain exists" + assert ret["changes"] == {} + + # 'make_hashable' function tests: 1 + + +def test_make_hashable(): + with set_grains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): + hashable_list = {"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]} + assert grains.make_hashable(grains.__grains__).issubset( + grains.make_hashable(hashable_list) + ) + + # 'present' function tests: 12 + + +def test_present_add(): + # Set a non existing grain + with set_grains({"a": "aval"}): + ret = grains.present(name="foo", value="bar") + assert ret["result"] is True + assert ret["changes"] == {"foo": "bar"} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assert_grain_file_content("a: aval\nfoo: bar\n") + + # Set a non existing nested grain + with set_grains({"a": "aval"}): + ret = grains.present(name="foo:is:nested", value="bar") + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": "bar"}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + assert_grain_file_content("a: aval\nfoo:\n is:\n nested: bar\n") + + # Set a non existing nested dict grain + with set_grains({"a": "aval"}): + ret = grains.present(name="foo:is:nested", value={"bar": "is a dict"}) + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": {"bar": "is a dict"}}}} + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": {"bar": "is a dict"}}}, + } + assert_grain_file_content( + "a: aval\nfoo:\n is:\n nested:\n bar: is a dict\n" + ) + + +def test_present_add_key_to_existing(): + with set_grains({"a": "aval", "foo": {"k1": "v1"}}): + # Fails setting a grain to a dict + ret = grains.present(name="foo:k2", value="v2") + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:k2 to v2" + assert ret["changes"] == {"foo": {"k2": "v2", "k1": "v1"}} + assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1", "k2": "v2"}} + assert_grain_file_content("a: aval\nfoo:\n k1: v1\n k2: v2\n") + + +def test_present_already_set(): + with set_grains({"a": "aval", "foo": "bar"}): + # Grain already set + ret = grains.present(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Grain is already set" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Nested grain already set + ret = grains.present(name="foo:is:nested", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Grain is already set" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Nested dict grain already set + ret = grains.present(name="foo:is", value={"nested": "bar"}) + assert ret["result"] is True + assert ret["comment"] == "Grain is already set" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + +def test_present_overwrite(): + with set_grains({"a": "aval", "foo": "bar"}): + # Overwrite an existing grain + ret = grains.present(name="foo", value="newbar") + assert ret["result"] is True + assert ret["changes"] == {"foo": "newbar"} + assert grains.__grains__ == {"a": "aval", "foo": "newbar"} + assert_grain_file_content("a: aval\nfoo: newbar\n") + + with set_grains({"a": "aval", "foo": "bar"}): + # Clear a grain (set to None) + ret = grains.present(name="foo", value=None) + assert ret["result"] is True + assert ret["changes"] == {"foo": None} + assert grains.__grains__ == {"a": "aval", "foo": None} + assert_grain_file_content("a: aval\nfoo: null\n") + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Overwrite an existing nested grain + ret = grains.present(name="foo:is:nested", value="newbar") + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": "newbar"}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "newbar"}}} + assert_grain_file_content("a: aval\nfoo:\n is:\n nested: newbar\n") + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Clear a nested grain (set to None) + ret = grains.present(name="foo:is:nested", value=None) + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": None}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": None}}} + assert_grain_file_content("a: aval\nfoo:\n is:\n nested: null\n") + + +def test_present_fail_overwrite(): + with set_grains({"a": "aval", "foo": {"is": {"nested": "val"}}}): + # Overwrite an existing grain + ret = grains.present(name="foo:is", value="newbar") + assert ret["result"] is False + assert ret["changes"] == {} + assert ( + ret["comment"] + == "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "val"}}} + + with set_grains({"a": "aval", "foo": {"is": {"nested": "val"}}}): + # Clear a grain (set to None) + ret = grains.present(name="foo:is", value=None) + assert ret["result"] is False + assert ret["changes"] == {} + assert ( + ret["comment"] + == "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "val"}}} + + +def test_present_fails_to_set_dict_or_list(): + with set_grains({"a": "aval", "foo": "bar"}): + # Fails to overwrite a grain to a list + ret = grains.present(name="foo", value=["l1", "l2"]) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + + with set_grains({"a": "aval", "foo": "bar"}): + # Fails setting a grain to a dict + ret = grains.present(name="foo", value={"k1": "v1"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Fails to overwrite a nested grain to a list + ret = grains.present(name="foo,is,nested", value=["l1", "l2"], delimiter=",") + assert ret["result"] is False + assert ret["changes"] == {} + assert ( + ret["comment"] + == "The key 'foo:is:nested' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Fails setting a nested grain to a dict + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo:is:nested' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + +def test_present_fail_merge_dict(): + with set_grains({"a": "aval", "foo": {"k1": "v1"}}): + # Fails setting a grain to a dict + ret = grains.present(name="foo", value={"k2": "v2"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} + assert_grain_file_content("a: aval\nfoo:\n k1: v1\n") + + +def test_present_force_to_set_dict_or_list(): + with set_grains({"a": "aval", "foo": "bar"}): + # Force to overwrite a grain to a list + ret = grains.present(name="foo", value=["l1", "l2"], force=True) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo to ['l1', 'l2']" + assert ret["changes"] == {"foo": ["l1", "l2"]} + assert grains.__grains__ == {"a": "aval", "foo": ["l1", "l2"]} + assert_grain_file_content("a: aval\nfoo:\n- l1\n- l2\n") + + with set_grains({"a": "aval", "foo": "bar"}): + # Force setting a grain to a dict + ret = grains.present(name="foo", value={"k1": "v1"}, force=True) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo to {'k1': 'v1'}" + assert ret["changes"] == {"foo": {"k1": "v1"}} + assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} + assert_grain_file_content("a: aval\nfoo:\n k1: v1\n") + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Force to overwrite a nested grain to a list + ret = grains.present( + name="foo,is,nested", value=["l1", "l2"], delimiter=",", force=True + ) + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": ["l1", "l2"]}}} + assert ret["comment"] == "Set grain foo:is:nested to ['l1', 'l2']" + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": ["l1", "l2"]}}, + } + assert_grain_file_content( + "a: aval\nfoo:\n is:\n nested:\n - l1\n - l2\n" + ) + + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}}): + # Force setting a nested grain to a dict + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}, force=True) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:is:nested to {'k1': 'v1'}" + assert ret["changes"] == { + "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"} + } + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}, + } + assert_grain_file_content( + "a: aval\nfoo:\n and: other\n is:\n nested:\n k1: v1\n" + ) + + +def test_present_fails_to_convert_value_to_key(): + with set_grains({"a": "aval", "foo": "bar"}): + # Fails converting a value to a nested grain key + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' value is 'bar', which is different from the provided key 'is'. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + + +def test_present_overwrite_test(): + with patch.dict(grains.__opts__, {"test": True}): + with set_grains({"a": "aval", "foo": "bar"}): + # Overwrite an existing grain + ret = grains.present(name="foo", value="newbar") + assert ret["result"] is None + assert ret["changes"] == {"changed": {"foo": "newbar"}} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assert_grain_file_content("a: aval\nfoo: bar\n") + + +def test_present_convert_value_to_key(): + with set_grains({"a": "aval", "foo": "is"}): + # Converts a value to a nested grain key + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:is:nested to {'k1': 'v1'}" + assert ret["changes"] == {"foo": {"is": {"nested": {"k1": "v1"}}}} + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": {"k1": "v1"}}}, + } + assert_grain_file_content("a: aval\nfoo:\n is:\n nested:\n k1: v1\n") + + with set_grains({"a": "aval", "foo": ["one", "is", "correct"]}): + # Converts a list element to a nested grain key + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:is:nested to {'k1': 'v1'}" + assert ret["changes"] == { + "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"] + } + assert grains.__grains__ == { + "a": "aval", + "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"], + } + assert_grain_file_content( + "a: aval\nfoo:\n- one\n- is:\n nested:\n k1: v1\n- correct\n" + ) + + +def test_present_unknown_failure(): + with patch("salt.modules.grains.setval") as mocked_setval: + mocked_setval.return_value = "Failed to set grain foo" + with set_grains({"a": "aval", "foo": "bar"}): + # Unknown reason failure + ret = grains.present(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Failed to set grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assert_grain_file_content("a: aval\nfoo: bar\n") + + +# 'absent' function tests: 6 + + +def test_absent_already(): + # Unset a non existent grain + with set_grains({"a": "aval"}): + ret = grains.absent(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Grain foo does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assert_grain_file_content("a: aval\n") + + # Unset a non existent nested grain + with set_grains({"a": "aval"}): + ret = grains.absent(name="foo:is:nested") + assert ret["result"] is True + assert ret["comment"] == "Grain foo:is:nested does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assert_grain_file_content("a: aval\n") + + +def test_absent_unset(): + # Unset a grain + with set_grains({"a": "aval", "foo": "bar"}): + ret = grains.absent(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo was set to None" + assert ret["changes"] == {"grain": "foo", "value": None} + assert grains.__grains__ == {"a": "aval", "foo": None} + assert_grain_file_content("a: aval\nfoo: null\n") + + # Unset grain when its value is False + with set_grains({"a": "aval", "foo": False}): + ret = grains.absent(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo was set to None" + assert ret["changes"] == {"grain": "foo", "value": None} + assert grains.__grains__ == {"a": "aval", "foo": None} + assert_grain_file_content("a: aval\nfoo: null\n") + + # Unset a nested grain + with set_grains( + {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} + ): + ret = grains.absent(name="foo,is,nested", delimiter=",") + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo:is:nested was set to None" + assert ret["changes"] == {"grain": "foo:is:nested", "value": None} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": {"nested": None}}, "correct"], + } + assert_grain_file_content( + "a: aval\nfoo:\n- order\n- is:\n nested: null\n- correct\n" + ) + + # Unset a nested value don't change anything + with set_grains({"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]}): + ret = grains.absent(name="foo:is:nested") + assert ret["result"] is True + assert ret["comment"] == "Grain foo:is:nested does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": "nested"}, "correct"], + } + assert_grain_file_content("a: aval\nfoo:\n- order\n- is: nested\n- correct\n") + + +def test_absent_unset_test(): + with patch.dict(grains.__opts__, {"test": True}): + with set_grains({"a": "aval", "foo": "bar"}): + # Overwrite an existing grain + ret = grains.absent(name="foo") + assert ret["result"] is None + assert ret["changes"] == {"grain": "foo", "value": None} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assert_grain_file_content("a: aval\nfoo: bar\n") + + +def test_absent_fails_nested_complex_grain(): + # Unset a nested complex grain + with set_grains( + {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} + ): + ret = grains.absent(name="foo:is") + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": {"nested": "bar"}}, "correct"], + } + assert_grain_file_content( + "a: aval\nfoo:\n- order\n- is:\n nested: bar\n- correct\n" + ) + + +def test_absent_force_nested_complex_grain(): + # Unset a nested complex grain + with set_grains( + {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} + ): + ret = grains.absent(name="foo:is", force=True) + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo:is was set to None" + assert ret["changes"] == {"grain": "foo:is", "value": None} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": None}, "correct"], + } + assert_grain_file_content("a: aval\nfoo:\n- order\n- is: null\n- correct\n") + + +def test_absent_delete(): + # Delete a grain + with set_grains({"a": "aval", "foo": "bar"}): + ret = grains.absent(name="foo", destructive=True) + assert ret["result"] is True + assert ret["comment"] == "Grain foo was deleted" + assert ret["changes"] == {"deleted": "foo"} + assert grains.__grains__ == {"a": "aval"} + assert_grain_file_content("a: aval\n") + + # Delete a previously unset grain + with set_grains({"a": "aval", "foo": None}): + ret = grains.absent(name="foo", destructive=True) + assert ret["result"] is True + assert ret["comment"] == "Grain foo was deleted" + assert ret["changes"] == {"deleted": "foo"} + assert grains.__grains__ == {"a": "aval"} + assert_grain_file_content("a: aval\n") + + # Delete a nested grain + with set_grains( + { + "a": "aval", + "foo": [ + "order", + {"is": {"nested": "bar", "other": "value"}}, + "correct", + ], + } + ): + ret = grains.absent(name="foo:is:nested", destructive=True) + assert ret["result"] is True + assert ret["comment"] == "Grain foo:is:nested was deleted" + assert ret["changes"] == {"deleted": "foo:is:nested"} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": {"other": "value"}}, "correct"], + } + assert_grain_file_content( + "a: aval\nfoo:\n- order\n- is:\n other: value\n- correct\n" + ) + + +# 'append' function tests: 6 + + +def test_append(): + # Append to an existing list + with set_grains({"a": "aval", "foo": ["bar"]}): + ret = grains.append(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} + assert_grain_file_content("a: aval\nfoo:\n- bar\n- baz\n") + + +def test_append_nested(): + # Append to an existing nested list + with set_grains({"a": "aval", "foo": {"list": ["bar"]}}): + ret = grains.append(name="foo,list", value="baz", delimiter=",") + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo:list" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"a": "aval", "foo": {"list": ["bar", "baz"]}} + assert_grain_file_content("a: aval\nfoo:\n list:\n - bar\n - baz\n") + + +def test_append_already(): + # Append to an existing list + with set_grains({"a": "aval", "foo": ["bar"]}): + ret = grains.append(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar is already in the list " + "for grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assert_grain_file_content("a: aval\nfoo:\n- bar\n") + + +def test_append_fails_not_a_list(): + # Fail to append to an existing grain, not a list + with set_grains({"a": "aval", "foo": {"bar": "val"}}): + ret = grains.append(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Grain foo is not a valid list" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"bar": "val"}} + + +def test_append_convert_to_list(): + # Append to an existing grain, converting to a list + with set_grains({"a": "aval", "foo": {"bar": "val"}}): + assert_grain_file_content("a: aval\nfoo:\n bar: val\n") + ret = grains.append(name="foo", value="baz", convert=True) + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"a": "aval", "foo": [{"bar": "val"}, "baz"]} + assert_grain_file_content("a: aval\nfoo:\n- bar: val\n- baz\n") + + # Append to an existing grain, converting to a list a multi-value dict + with set_grains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): + assert_grain_file_content("a: aval\nfoo:\n bar: val\n other: value\n") + ret = grains.append(name="foo", value="baz", convert=True) + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == { + "a": "aval", + "foo": [{"bar": "val", "other": "value"}, "baz"], + } + assert_grain_file_content("a: aval\nfoo:\n- bar: val\n other: value\n- baz\n") + + +def test_append_fails_inexistent(): + # Append to a non existing grain + with set_grains({"a": "aval"}): + ret = grains.append(name="foo", value="bar") + assert ret["result"] is False + assert ret["comment"] == "Grain foo does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + + +def test_append_convert_to_list_empty(): + # Append to an existing list + with set_grains({"foo": None}): + ret = grains.append(name="foo", value="baz", convert=True) + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"foo": ["baz"]} + assert_grain_file_content("foo:\n- baz\n") + + +# 'list_present' function tests: 7 + + +def test_list_present(): + with set_grains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo" + assert ret["changes"] == {"new": {"foo": ["bar", "baz"]}} + assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} + assert_grain_file_content("a: aval\nfoo:\n- bar\n- baz\n") + + +def test_list_present_nested(): + with set_grains({"a": "aval", "foo": {"is": {"nested": ["bar"]}}}): + ret = grains.list_present(name="foo,is,nested", value="baz", delimiter=",") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo:is:nested" + assert ret["changes"] == {"new": {"foo": {"is": {"nested": ["bar", "baz"]}}}} + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": ["bar", "baz"]}}, + } + assert_grain_file_content( + "a: aval\nfoo:\n is:\n nested:\n - bar\n - baz\n" + ) + + +def test_list_present_inexistent(): + with set_grains({"a": "aval"}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo" + assert ret["changes"] == {"new": {"foo": ["baz"]}} + assert grains.__grains__ == {"a": "aval", "foo": ["baz"]} + assert_grain_file_content("a: aval\nfoo:\n- baz\n") + + +def test_list_present_inexistent_nested(): + with set_grains({"a": "aval"}): + ret = grains.list_present(name="foo:is:nested", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo:is:nested" + assert ret["changes"] == {"new": {"foo": {"is": {"nested": ["baz"]}}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": ["baz"]}}} + assert_grain_file_content("a: aval\nfoo:\n is:\n nested:\n - baz\n") + + +def test_list_present_not_a_list(): + with set_grains({"a": "aval", "foo": "bar"}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Grain foo is not a valid list" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assert_grain_file_content("a: aval\nfoo: bar\n") + + +def test_list_present_nested_already(): + with set_grains({"a": "aval", "b": {"foo": ["bar"]}}): + ret = grains.list_present(name="b:foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar is already in grain b:foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "b": {"foo": ["bar"]}} + assert_grain_file_content("a: aval\nb:\n foo:\n - bar\n") + + +def test_list_present_already(): + with set_grains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_present(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar is already in grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assert_grain_file_content("a: aval\nfoo:\n- bar\n") + + +def test_list_present_unknown_failure(): + with set_grains({"a": "aval", "foo": ["bar"]}): + # Unknown reason failure + + with patch.dict(grainsmod.__salt__, {"grains.append": MagicMock()}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Failed append value baz to grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assert_grain_file_content("a: aval\nfoo:\n- bar\n") + + +# 'list_absent' function tests: 6 + + +def test_list_absent(): + with set_grains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_absent(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar was deleted from grain foo" + assert ret["changes"] == {"deleted": ["bar"]} + assert grains.__grains__ == {"a": "aval", "foo": []} + assert_grain_file_content("a: aval\nfoo: []\n") + + +def test_list_absent_nested(): + with set_grains({"a": "aval", "foo": {"list": ["bar"]}}): + ret = grains.list_absent(name="foo:list", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar was deleted from grain foo:list" + assert ret["changes"] == {"deleted": ["bar"]} + assert grains.__grains__ == {"a": "aval", "foo": {"list": []}} + assert_grain_file_content("a: aval\nfoo:\n list: []\n") + + +def test_list_absent_inexistent(): + with set_grains({"a": "aval"}): + ret = grains.list_absent(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Grain foo does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assert_grain_file_content("a: aval\n") + + +def test_list_absent_inexistent_nested(): + with set_grains({"a": "aval"}): + ret = grains.list_absent(name="foo:list", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Grain foo:list does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assert_grain_file_content("a: aval\n") + + +def test_list_absent_not_a_list(): + with set_grains({"a": "aval", "foo": "bar"}): + ret = grains.list_absent(name="foo", value="bar") + assert ret["result"] is False + assert ret["comment"] == "Grain foo is not a valid list" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assert_grain_file_content("a: aval\nfoo: bar\n") + + +def test_list_absent_already(): + with set_grains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_absent(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Value baz is absent from grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assert_grain_file_content("a: aval\nfoo:\n- bar\n") diff --git a/tests/unit/modules/test_tomcat.py b/tests/unit/modules/test_tomcat.py deleted file mode 100644 index 4de0500b29f6..000000000000 --- a/tests/unit/modules/test_tomcat.py +++ /dev/null @@ -1,58 +0,0 @@ -import io -import urllib.request - -import salt.modules.tomcat as tomcat -from tests.support.mixins import LoaderModuleMockMixin -from tests.support.mock import MagicMock, patch -from tests.support.unit import TestCase - - -class TomcatTestCasse(TestCase, LoaderModuleMockMixin): - """ - Tests cases for salt.modules.tomcat - """ - - def setup_loader_modules(self): - return {tomcat: {}} - - def test_tomcat_wget_no_bytestring(self): - responses = { - "string": io.StringIO("Best response ever\r\nAnd you know it!"), - "bytes": io.BytesIO(b"Best response ever\r\nAnd you know it!"), - } - - string_mock = MagicMock(return_value=responses["string"]) - bytes_mock = MagicMock(return_value=responses["bytes"]) - with patch( - "salt.modules.tomcat._auth", - MagicMock( - return_value=urllib.request.build_opener( - urllib.request.HTTPBasicAuthHandler(), - urllib.request.HTTPDigestAuthHandler(), - ) - ), - ): - with patch("urllib.request.urlopen", string_mock): - response = tomcat._wget( - "tomcat.wait", url="http://localhost:8080/nofail" - ) - for line in response["msg"]: - self.assertIsInstance(line, str) - - with patch("urllib.request.urlopen", bytes_mock): - try: - response = tomcat._wget( - "tomcat.wait", url="http://localhost:8080/nofail" - ) - except TypeError as type_error: - if ( - type_error.args[0] - == "startswith first arg must be bytes or a tuple of bytes," - " not str" - ): - self.fail("Got back a byte string, should've been a string") - else: - raise type_error - - for line in response["msg"]: - self.assertIsInstance(line, str) diff --git a/tests/unit/states/test_grains.py b/tests/unit/states/test_grains.py deleted file mode 100644 index 759ed27d545b..000000000000 --- a/tests/unit/states/test_grains.py +++ /dev/null @@ -1,897 +0,0 @@ -""" -unit tests for the grains state -""" - - -import contextlib -import os - -import salt.modules.grains as grainsmod -import salt.states.grains as grains -import salt.utils.files -import salt.utils.stringutils -import salt.utils.yaml -from tests.support.mixins import LoaderModuleMockMixin -from tests.support.mock import MagicMock, patch -from tests.support.runtests import RUNTIME_VARS -from tests.support.unit import TestCase - - -class GrainsTestCase(TestCase, LoaderModuleMockMixin): - def setup_loader_modules(self): - grains_test_dir = "__salt_test_state_grains" - if not os.path.exists(os.path.join(RUNTIME_VARS.TMP, grains_test_dir)): - os.makedirs(os.path.join(RUNTIME_VARS.TMP, grains_test_dir)) - loader_globals = { - "__opts__": { - "test": False, - "conf_file": os.path.join(RUNTIME_VARS.TMP, grains_test_dir, "minion"), - "cachedir": os.path.join(RUNTIME_VARS.TMP, grains_test_dir), - "local": True, - }, - "__salt__": { - "cmd.run_all": MagicMock( - return_value={"pid": 5, "retcode": 0, "stderr": "", "stdout": ""} - ), - "grains.get": grainsmod.get, - "grains.set": grainsmod.set, - "grains.setval": grainsmod.setval, - "grains.delval": grainsmod.delval, - "grains.append": grainsmod.append, - "grains.remove": grainsmod.remove, - "saltutil.sync_grains": MagicMock(), - }, - } - return {grains: loader_globals, grainsmod: loader_globals} - - def assertGrainFileContent(self, grains_string): - if os.path.isdir(grains.__opts__["conf_file"]): - grains_file = os.path.join(grains.__opts__["conf_file"], "grains") - else: - grains_file = os.path.join( - os.path.dirname(grains.__opts__["conf_file"]), "grains" - ) - with salt.utils.files.fopen(grains_file, "r") as grf: - grains_data = salt.utils.stringutils.to_unicode(grf.read()) - self.assertMultiLineEqual(grains_string, grains_data) - - @contextlib.contextmanager - def setGrains(self, grains_data): - with patch.dict(grains.__grains__, grains_data): - with patch.dict(grainsmod.__grains__, grains_data): - if os.path.isdir(grains.__opts__["conf_file"]): - grains_file = os.path.join(grains.__opts__["conf_file"], "grains") - else: - grains_file = os.path.join( - os.path.dirname(grains.__opts__["conf_file"]), "grains" - ) - with salt.utils.files.fopen(grains_file, "w+") as grf: - salt.utils.yaml.safe_dump( - grains_data, grf, default_flow_style=False - ) - yield - - # 'exists' function tests: 2 - - def test_exists_missing(self): - with self.setGrains({"a": "aval"}): - ret = grains.exists(name="foo") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain does not exist") - self.assertEqual(ret["changes"], {}) - - def test_exists_found(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Grain already set - ret = grains.exists(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain exists") - self.assertEqual(ret["changes"], {}) - - # 'make_hashable' function tests: 1 - - def test_make_hashable(self): - with self.setGrains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): - hashable_list = {"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]} - self.assertEqual( - grains.make_hashable(grains.__grains__).issubset( - grains.make_hashable(hashable_list) - ), - True, - ) - - # 'present' function tests: 12 - - def test_present_add(self): - # Set a non existing grain - with self.setGrains({"a": "aval"}): - ret = grains.present(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": "bar"}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\nfoo: bar\n") - - # Set a non existing nested grain - with self.setGrains({"a": "aval"}): - ret = grains.present(name="foo:is:nested", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": "bar"}}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - self.assertGrainFileContent("a: aval\nfoo:\n is:\n nested: bar\n") - - # Set a non existing nested dict grain - with self.setGrains({"a": "aval"}): - ret = grains.present(name="foo:is:nested", value={"bar": "is a dict"}) - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["changes"], {"foo": {"is": {"nested": {"bar": "is a dict"}}}} - ) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": {"bar": "is a dict"}}}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " bar: is a dict\n" - ) - - def test_present_add_key_to_existing(self): - with self.setGrains({"a": "aval", "foo": {"k1": "v1"}}): - # Fails setting a grain to a dict - ret = grains.present(name="foo:k2", value="v2") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:k2 to v2") - self.assertEqual(ret["changes"], {"foo": {"k2": "v2", "k1": "v1"}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"k1": "v1", "k2": "v2"}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " k1: v1\n" + " k2: v2\n" - ) - - def test_present_already_set(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Grain already set - ret = grains.present(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain is already set") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Nested grain already set - ret = grains.present(name="foo:is:nested", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain is already set") - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Nested dict grain already set - ret = grains.present(name="foo:is", value={"nested": "bar"}) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain is already set") - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - def test_present_overwrite(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Overwrite an existing grain - ret = grains.present(name="foo", value="newbar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": "newbar"}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "newbar"}) - self.assertGrainFileContent("a: aval\n" + "foo: newbar\n") - - with self.setGrains({"a": "aval", "foo": "bar"}): - # Clear a grain (set to None) - ret = grains.present(name="foo", value=None) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": None}) - self.assertGrainFileContent("a: aval\n" + "foo: null\n") - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Overwrite an existing nested grain - ret = grains.present(name="foo:is:nested", value="newbar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": "newbar"}}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "newbar"}}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested: newbar\n" - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Clear a nested grain (set to None) - ret = grains.present(name="foo:is:nested", value=None) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": None}}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": None}}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested: null\n" - ) - - def test_present_fail_overwrite(self): - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): - # Overwrite an existing grain - ret = grains.present(name="foo:is", value="newbar") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - ret["comment"], - "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to" - " overwrite.", - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "val"}}} - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): - # Clear a grain (set to None) - ret = grains.present(name="foo:is", value=None) - self.assertEqual(ret["result"], False) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - ret["comment"], - "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to" - " overwrite.", - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "val"}}} - ) - - def test_present_fails_to_set_dict_or_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Fails to overwrite a grain to a list - ret = grains.present(name="foo", value=["l1", "l2"]) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' exists and the " - + "given value is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - - with self.setGrains({"a": "aval", "foo": "bar"}): - # Fails setting a grain to a dict - ret = grains.present(name="foo", value={"k1": "v1"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' exists and the given " - + "value is a dict or a list. Use " - + "'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Fails to overwrite a nested grain to a list - ret = grains.present( - name="foo,is,nested", value=["l1", "l2"], delimiter="," - ) - self.assertEqual(ret["result"], False) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - ret["comment"], - "The key 'foo:is:nested' exists and the " - + "given value is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Fails setting a nested grain to a dict - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo:is:nested' exists and the " - + "given value is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - def test_present_fail_merge_dict(self): - with self.setGrains({"a": "aval", "foo": {"k1": "v1"}}): - # Fails setting a grain to a dict - ret = grains.present(name="foo", value={"k2": "v2"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' exists but " - + "is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"k1": "v1"}}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") - - def test_present_force_to_set_dict_or_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Force to overwrite a grain to a list - ret = grains.present(name="foo", value=["l1", "l2"], force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo to ['l1', 'l2']") - self.assertEqual(ret["changes"], {"foo": ["l1", "l2"]}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["l1", "l2"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- l1\n" + "- l2\n") - - with self.setGrains({"a": "aval", "foo": "bar"}): - # Force setting a grain to a dict - ret = grains.present(name="foo", value={"k1": "v1"}, force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo to {'k1': 'v1'}") - self.assertEqual(ret["changes"], {"foo": {"k1": "v1"}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"k1": "v1"}}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Force to overwrite a nested grain to a list - ret = grains.present( - name="foo,is,nested", value=["l1", "l2"], delimiter=",", force=True - ) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": ["l1", "l2"]}}}) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to ['l1', 'l2']") - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": ["l1", "l2"]}}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " - l1\n" - + " - l2\n" - ) - - with self.setGrains( - {"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}} - ): - # Force setting a nested grain to a dict - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}, force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to {'k1': 'v1'}") - self.assertEqual( - ret["changes"], - {"foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}}, - ) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " and: other\n" - + " is:\n" - + " nested:\n" - + " k1: v1\n" - ) - - def test_present_fails_to_convert_value_to_key(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Fails converting a value to a nested grain key - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' value is 'bar', " - + "which is different from the provided " - + "key 'is'. Use 'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - - def test_present_overwrite_test(self): - with patch.dict(grains.__opts__, {"test": True}): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Overwrite an existing grain - ret = grains.present(name="foo", value="newbar") - self.assertEqual(ret["result"], None) - self.assertEqual(ret["changes"], {"changed": {"foo": "newbar"}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_present_convert_value_to_key(self): - with self.setGrains({"a": "aval", "foo": "is"}): - # Converts a value to a nested grain key - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to {'k1': 'v1'}") - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": {"k1": "v1"}}}}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}}}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " k1: v1\n" - ) - - with self.setGrains({"a": "aval", "foo": ["one", "is", "correct"]}): - # Converts a list element to a nested grain key - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to {'k1': 'v1'}") - self.assertEqual( - ret["changes"], - {"foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"]}, - ) - self.assertEqual( - grains.__grains__, - { - "a": "aval", - "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"], - }, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- one\n" - + "- is:\n" - + " nested:\n" - + " k1: v1\n" - + "- correct\n" - ) - - def test_present_unknown_failure(self): - with patch("salt.modules.grains.setval") as mocked_setval: - mocked_setval.return_value = "Failed to set grain foo" - with self.setGrains({"a": "aval", "foo": "bar"}): - # Unknown reason failure - ret = grains.present(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Failed to set grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - # 'absent' function tests: 6 - - def test_absent_already(self): - # Unset a non existent grain - with self.setGrains({"a": "aval"}): - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - # Unset a non existent nested grain - with self.setGrains({"a": "aval"}): - ret = grains.absent(name="foo:is:nested") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:is:nested does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - def test_absent_unset(self): - # Unset a grain - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value for grain foo was set to None") - self.assertEqual(ret["changes"], {"grain": "foo", "value": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": None}) - self.assertGrainFileContent("a: aval\n" + "foo: null\n") - - # Unset grain when its value is False - with self.setGrains({"a": "aval", "foo": False}): - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value for grain foo was set to None") - self.assertEqual(ret["changes"], {"grain": "foo", "value": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": None}) - self.assertGrainFileContent("a: aval\n" + "foo: null\n") - - # Unset a nested grain - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} - ): - ret = grains.absent(name="foo,is,nested", delimiter=",") - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["comment"], "Value for grain foo:is:nested was set to None" - ) - self.assertEqual(ret["changes"], {"grain": "foo:is:nested", "value": None}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": {"nested": None}}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " nested: null\n" - + "- correct\n" - ) - - # Unset a nested value don't change anything - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]} - ): - ret = grains.absent(name="foo:is:nested") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:is:nested does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- order\n" + "- is: nested\n" + "- correct\n" - ) - - def test_absent_unset_test(self): - with patch.dict(grains.__opts__, {"test": True}): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Overwrite an existing grain - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], None) - self.assertEqual(ret["changes"], {"grain": "foo", "value": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_absent_fails_nested_complex_grain(self): - # Unset a nested complex grain - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} - ): - ret = grains.absent(name="foo:is") - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to" - " overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " nested: bar\n" - + "- correct\n" - ) - - def test_absent_force_nested_complex_grain(self): - # Unset a nested complex grain - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} - ): - ret = grains.absent(name="foo:is", force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value for grain foo:is was set to None") - self.assertEqual(ret["changes"], {"grain": "foo:is", "value": None}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": None}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- order\n" + "- is: null\n" + "- correct\n" - ) - - def test_absent_delete(self): - # Delete a grain - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.absent(name="foo", destructive=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo was deleted") - self.assertEqual(ret["changes"], {"deleted": "foo"}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - # Delete a previously unset grain - with self.setGrains({"a": "aval", "foo": None}): - ret = grains.absent(name="foo", destructive=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo was deleted") - self.assertEqual(ret["changes"], {"deleted": "foo"}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - # Delete a nested grain - with self.setGrains( - { - "a": "aval", - "foo": [ - "order", - {"is": {"nested": "bar", "other": "value"}}, - "correct", - ], - } - ): - ret = grains.absent(name="foo:is:nested", destructive=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:is:nested was deleted") - self.assertEqual(ret["changes"], {"deleted": "foo:is:nested"}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": {"other": "value"}}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " other: value\n" - + "- correct\n" - ) - - # 'append' function tests: 6 - - def test_append(self): - # Append to an existing list - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.append(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar", "baz"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") - - def test_append_nested(self): - # Append to an existing nested list - with self.setGrains({"a": "aval", "foo": {"list": ["bar"]}}): - ret = grains.append(name="foo,list", value="baz", delimiter=",") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo:list") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"list": ["bar", "baz"]}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " list:\n" + " - bar\n" + " - baz\n" - ) - - def test_append_already(self): - # Append to an existing list - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.append(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["comment"], "Value bar is already in the list " + "for grain foo" - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") - - def test_append_fails_not_a_list(self): - # Fail to append to an existing grain, not a list - with self.setGrains({"a": "aval", "foo": {"bar": "val"}}): - ret = grains.append(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo is not a valid list") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"bar": "val"}}) - - def test_append_convert_to_list(self): - # Append to an existing grain, converting to a list - with self.setGrains({"a": "aval", "foo": {"bar": "val"}}): - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " bar: val\n") - ret = grains.append(name="foo", value="baz", convert=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": [{"bar": "val"}, "baz"]} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- bar: val\n" + "- baz\n" - ) - - # Append to an existing grain, converting to a list a multi-value dict - with self.setGrains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " bar: val\n" + " other: value\n" - ) - ret = grains.append(name="foo", value="baz", convert=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": [{"bar": "val", "other": "value"}, "baz"]}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- bar: val\n" + " other: value\n" + "- baz\n" - ) - - def test_append_fails_inexistent(self): - # Append to a non existing grain - with self.setGrains({"a": "aval"}): - ret = grains.append(name="foo", value="bar") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - - def test_append_convert_to_list_empty(self): - # Append to an existing list - with self.setGrains({"foo": None}): - ret = grains.append(name="foo", value="baz", convert=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual(grains.__grains__, {"foo": ["baz"]}) - self.assertGrainFileContent("foo:\n" + "- baz\n") - - # 'list_present' function tests: 7 - - def test_list_present(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo") - self.assertEqual(ret["changes"], {"new": {"foo": ["bar", "baz"]}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar", "baz"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") - - def test_list_present_nested(self): - with self.setGrains({"a": "aval", "foo": {"is": {"nested": ["bar"]}}}): - ret = grains.list_present(name="foo,is,nested", value="baz", delimiter=",") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo:is:nested") - self.assertEqual( - ret["changes"], {"new": {"foo": {"is": {"nested": ["bar", "baz"]}}}} - ) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": ["bar", "baz"]}}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " - bar\n" - + " - baz\n" - ) - - def test_list_present_inexistent(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo") - self.assertEqual(ret["changes"], {"new": {"foo": ["baz"]}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["baz"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- baz\n") - - def test_list_present_inexistent_nested(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_present(name="foo:is:nested", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo:is:nested") - self.assertEqual( - ret["changes"], {"new": {"foo": {"is": {"nested": ["baz"]}}}} - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": ["baz"]}}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " - baz\n" - ) - - def test_list_present_not_a_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo is not a valid list") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_list_present_nested_already(self): - with self.setGrains({"a": "aval", "b": {"foo": ["bar"]}}): - ret = grains.list_present(name="b:foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value bar is already in grain b:foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "b": {"foo": ["bar"]}}) - self.assertGrainFileContent("a: aval\n" + "b:\n" + " foo:\n" + " - bar\n") - - def test_list_present_already(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_present(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value bar is already in grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") - - def test_list_present_unknown_failure(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - # Unknown reason failure - - with patch.dict(grainsmod.__salt__, {"grains.append": MagicMock()}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Failed append value baz to grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") - - # 'list_absent' function tests: 6 - - def test_list_absent(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_absent(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value bar was deleted from grain foo") - self.assertEqual(ret["changes"], {"deleted": ["bar"]}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": []}) - self.assertGrainFileContent("a: aval\n" + "foo: []\n") - - def test_list_absent_nested(self): - with self.setGrains({"a": "aval", "foo": {"list": ["bar"]}}): - ret = grains.list_absent(name="foo:list", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["comment"], "Value bar was deleted from grain foo:list" - ) - self.assertEqual(ret["changes"], {"deleted": ["bar"]}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"list": []}}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " list: []\n") - - def test_list_absent_inexistent(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_absent(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - def test_list_absent_inexistent_nested(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_absent(name="foo:list", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:list does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - def test_list_absent_not_a_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.list_absent(name="foo", value="bar") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo is not a valid list") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_list_absent_already(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_absent(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz is absent from grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") diff --git a/tools/ci.py b/tools/ci.py index e4ef802d9f24..6b3a7e7064e5 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -891,15 +891,15 @@ def get_releases(ctx: Context, repository: str = "saltstack/salt"): """ Generate the latest salt release. """ - github_output = os.environ.get("GITHUB_OUTPUT") + releases = tools.utils.get_salt_releases(ctx, repository) + str_releases = [str(version) for version in releases] + latest = str_releases[-1] - if github_output is None: - ctx.exit(1, "The 'GITHUB_OUTPUT' variable is not set.") - else: - releases = tools.utils.get_salt_releases(ctx, repository) - str_releases = [str(version) for version in releases] - latest = str_releases[-1] + ctx.info("Releases:", sorted(str_releases)) + ctx.info(f"Latest Release: '{latest}'") + github_output = os.environ.get("GITHUB_OUTPUT") + if github_output is not None: with open(github_output, "a", encoding="utf-8") as wfh: wfh.write(f"latest-release={latest}\n") wfh.write(f"releases={json.dumps(str_releases)}\n") @@ -1035,40 +1035,34 @@ def get_testing_releases( """ Get a list of releases to use for the upgrade and downgrade tests. """ - github_output = os.environ.get("GITHUB_OUTPUT") - if github_output is None: - ctx.exit(1, "The 'GITHUB_OUTPUT' variable is not set.") - else: - # We aren't testing upgrades from anything before 3006.0 except the latest 3005.x - threshold_major = 3005 - parsed_salt_version = tools.utils.Version(salt_version) - # We want the latest 4 major versions, removing the oldest if this version is a new major - num_major_versions = 4 - if parsed_salt_version.minor == 0: - num_major_versions = 3 - majors = sorted( - list( - { - version.major - for version in releases - if version.major >= threshold_major - } - ) - )[-num_major_versions:] - testing_releases = [] - # Append the latest minor for each major - for major in majors: - minors_of_major = [ - version for version in releases if version.major == major - ] - testing_releases.append(minors_of_major[-1]) + # We aren't testing upgrades from anything before 3006.0 except the latest 3005.x + threshold_major = 3005 + parsed_salt_version = tools.utils.Version(salt_version) + # We want the latest 4 major versions, removing the oldest if this version is a new major + num_major_versions = 4 + if parsed_salt_version.minor == 0: + num_major_versions = 3 + majors = sorted( + list( + {version.major for version in releases if version.major >= threshold_major} + ) + )[-num_major_versions:] + testing_releases = [] + # Append the latest minor for each major + for major in majors: + minors_of_major = [version for version in releases if version.major == major] + testing_releases.append(minors_of_major[-1]) - str_releases = [str(version) for version in testing_releases] + str_releases = [str(version) for version in testing_releases] + ctx.info("Testing Releases:", sorted(str_releases)) + + github_output = os.environ.get("GITHUB_OUTPUT") + if github_output is not None: with open(github_output, "a", encoding="utf-8") as wfh: wfh.write(f"testing-releases={json.dumps(str_releases)}\n") - ctx.exit(0) + ctx.exit(0) @ci.command( diff --git a/tools/pkg/build.py b/tools/pkg/build.py index 90f34947bd5f..37210e8fa52d 100644 --- a/tools/pkg/build.py +++ b/tools/pkg/build.py @@ -447,7 +447,7 @@ def windows( arguments={ "arch": { "help": "The architecture to build the package for", - "choices": ("x86_64", "aarch64", "x86", "amd64"), + "choices": ("x86_64", "arm64", "x86", "amd64"), "required": True, }, "python_version": { @@ -486,8 +486,8 @@ def onedir_dependencies( assert package_name is not None assert platform is not None - if platform in ("macos", "darwin") and arch == "aarch64": - arch = "arm64" + if platform not in ("macos", "darwin") and arch == "arm64": + arch = "aarch64" shared_constants = _get_shared_constants() if not python_version: @@ -562,7 +562,7 @@ def onedir_dependencies( / "static" / "pkg" / f"py{requirements_version}" - / f"{platform}.txt" + / f"{platform if platform != 'macos' else 'darwin'}.txt" ) _check_pkg_build_files_exist(ctx, requirements_file=requirements_file) diff --git a/tools/pkg/repo/create.py b/tools/pkg/repo/create.py index d9b8fb0a97d4..382ffdd0998d 100644 --- a/tools/pkg/repo/create.py +++ b/tools/pkg/repo/create.py @@ -380,11 +380,15 @@ def rpm( assert incoming is not None assert repo_path is not None assert key_id is not None + display_name = f"{distro.capitalize()} {distro_version}" if distro_version not in _rpm_distro_info[distro]: ctx.error(f"Support for {display_name} is missing.") ctx.exit(1) + if distro == "photon": + distro_version = f"{distro_version}.0" + ctx.info("Creating repository directory structure ...") create_repo_path = create_top_level_repo_path( ctx, diff --git a/tools/precommit/workflows.py b/tools/precommit/workflows.py index 4a75dba21483..f75c40df120c 100644 --- a/tools/precommit/workflows.py +++ b/tools/precommit/workflows.py @@ -4,6 +4,7 @@ # pylint: disable=resource-leakage,broad-except,3rd-party-module-not-gated from __future__ import annotations +import json import logging import shutil from typing import TYPE_CHECKING, cast @@ -18,6 +19,8 @@ WORKFLOWS = tools.utils.REPO_ROOT / ".github" / "workflows" TEMPLATES = WORKFLOWS / "templates" +with tools.utils.REPO_ROOT.joinpath("cicd", "golden-images.json").open() as rfh: + AMIS = json.load(rfh) # Define the command group @@ -87,42 +90,45 @@ def generate_workflows(ctx: Context): "Test Package Downloads": { "template": "test-package-downloads-action.yml", }, + "Build CI Deps": { + "template": "build-deps-ci-action.yml", + }, } - test_salt_listing = { + test_salt_listing: dict[str, list[tuple[str, ...]]] = { "linux": [ ("almalinux-8", "Alma Linux 8", "x86_64", "no-fips"), ("almalinux-9", "Alma Linux 9", "x86_64", "no-fips"), ("amazonlinux-2", "Amazon Linux 2", "x86_64", "no-fips"), - ("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "aarch64", "no-fips"), + ("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "arm64", "no-fips"), ("amazonlinux-2023", "Amazon Linux 2023", "x86_64", "no-fips"), - ("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "aarch64", "no-fips"), + ("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "arm64", "no-fips"), ("archlinux-lts", "Arch Linux LTS", "x86_64", "no-fips"), ("centos-7", "CentOS 7", "x86_64", "no-fips"), ("centosstream-8", "CentOS Stream 8", "x86_64", "no-fips"), ("centosstream-9", "CentOS Stream 9", "x86_64", "no-fips"), ("debian-10", "Debian 10", "x86_64", "no-fips"), ("debian-11", "Debian 11", "x86_64", "no-fips"), - ("debian-11-arm64", "Debian 11 Arm64", "aarch64", "no-fips"), + ("debian-11-arm64", "Debian 11 Arm64", "arm64", "no-fips"), ("debian-12", "Debian 12", "x86_64", "no-fips"), - ("debian-12-arm64", "Debian 12 Arm64", "aarch64", "no-fips"), + ("debian-12-arm64", "Debian 12 Arm64", "arm64", "no-fips"), ("fedora-37", "Fedora 37", "x86_64", "no-fips"), ("fedora-38", "Fedora 38", "x86_64", "no-fips"), ("opensuse-15", "Opensuse 15", "x86_64", "no-fips"), ("photonos-3", "Photon OS 3", "x86_64", "no-fips"), - ("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64", "no-fips"), + ("photonos-3-arm64", "Photon OS 3 Arm64", "arm64", "no-fips"), ("photonos-4", "Photon OS 4", "x86_64", "fips"), - ("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "fips"), + ("photonos-4-arm64", "Photon OS 4 Arm64", "arm64", "fips"), ("photonos-5", "Photon OS 5", "x86_64", "fips"), - ("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64", "fips"), + ("photonos-5-arm64", "Photon OS 5 Arm64", "arm64", "fips"), ("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "no-fips"), - ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "no-fips"), + ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "arm64", "no-fips"), ("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "no-fips"), - ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "no-fips"), + ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "arm64", "no-fips"), ], "macos": [ ("macos-12", "macOS 12", "x86_64"), ("macos-13", "macOS 13", "x86_64"), - ("macos-13-xlarge", "macOS 13 Arm64", "aarch64"), + ("macos-13-xlarge", "macOS 13 Arm64", "arm64"), ], "windows": [ ("windows-2016", "Windows 2016", "amd64"), @@ -137,7 +143,7 @@ def generate_workflows(ctx: Context): ( "amazonlinux-2-arm64", "Amazon Linux 2 Arm64", - "aarch64", + "arm64", "rpm", "no-fips", ), @@ -145,7 +151,7 @@ def generate_workflows(ctx: Context): ( "amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", - "aarch64", + "arm64", "rpm", "no-fips", ), @@ -155,30 +161,30 @@ def generate_workflows(ctx: Context): ( "centosstream-9-arm64", "CentOS Stream 9 Arm64", - "aarch64", + "arm64", "rpm", "no-fips", ), ("debian-10", "Debian 10", "x86_64", "deb", "no-fips"), ("debian-11", "Debian 11", "x86_64", "deb", "no-fips"), - ("debian-11-arm64", "Debian 11 Arm64", "aarch64", "deb", "no-fips"), + ("debian-11-arm64", "Debian 11 Arm64", "arm64", "deb", "no-fips"), ("debian-12", "Debian 12", "x86_64", "deb", "no-fips"), - ("debian-12-arm64", "Debian 12 Arm64", "aarch64", "deb", "no-fips"), + ("debian-12-arm64", "Debian 12 Arm64", "arm64", "deb", "no-fips"), ("photonos-3", "Photon OS 3", "x86_64", "rpm", "no-fips"), - ("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64", "rpm", "no-fips"), + ("photonos-3-arm64", "Photon OS 3 Arm64", "arm64", "rpm", "no-fips"), ("photonos-4", "Photon OS 4", "x86_64", "rpm", "fips"), - ("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "rpm", "fips"), + ("photonos-4-arm64", "Photon OS 4 Arm64", "arm64", "rpm", "fips"), ("photonos-5", "Photon OS 5", "x86_64", "rpm", "fips"), - ("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64", "rpm", "fips"), + ("photonos-5-arm64", "Photon OS 5 Arm64", "arm64", "rpm", "fips"), ("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "deb", "no-fips"), - ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "deb", "no-fips"), + ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "arm64", "deb", "no-fips"), ("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "deb", "no-fips"), - ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "deb", "no-fips"), + ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "arm64", "deb", "no-fips"), ], "macos": [ ("macos-12", "macOS 12", "x86_64"), ("macos-13", "macOS 13", "x86_64"), - ("macos-13-xlarge", "macOS 13 Arm64", "aarch64"), + ("macos-13-xlarge", "macOS 13 Arm64", "arm64"), ], "windows": [ ("windows-2016", "Windows 2016", "amd64"), @@ -189,51 +195,15 @@ def generate_workflows(ctx: Context): build_ci_deps_listing = { "linux": [ - ("almalinux-8", "Alma Linux 8", "x86_64"), - ("almalinux-8-arm64", "Alma Linux 8 Arm64", "aarch64"), - ("almalinux-9", "Alma Linux 9", "x86_64"), - ("almalinux-9-arm64", "Alma Linux 9 Arm64", "aarch64"), - ("amazonlinux-2", "Amazon Linux 2", "x86_64"), - ("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "aarch64"), - ("amazonlinux-2023", "Amazon Linux 2023", "x86_64"), - ("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "aarch64"), - ("archlinux-lts", "Arch Linux LTS", "x86_64"), - ("centos-7", "CentOS 7", "x86_64"), - ("centos-7-arm64", "CentOS 7 Arm64", "aarch64"), - ("centosstream-8", "CentOS Stream 8", "x86_64"), - ("centosstream-8-arm64", "CentOS Stream 8 Arm64", "aarch64"), - ("centosstream-9", "CentOS Stream 9", "x86_64"), - ("centosstream-9-arm64", "CentOS Stream 9 Arm64", "aarch64"), - ("debian-10", "Debian 10", "x86_64"), - ("debian-11", "Debian 11", "x86_64"), - ("debian-11-arm64", "Debian 11 Arm64", "aarch64"), - ("debian-12", "Debian 12", "x86_64"), - ("debian-12-arm64", "Debian 12 Arm64", "aarch64"), - ("fedora-37", "Fedora 37", "x86_64"), - ("fedora-37-arm64", "Fedora 37 Arm64", "aarch64"), - ("fedora-38", "Fedora 38", "x86_64"), - ("fedora-38-arm64", "Fedora 38 Arm64", "aarch64"), - ("opensuse-15", "Opensuse 15", "x86_64"), - ("photonos-3", "Photon OS 3", "x86_64"), - ("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64"), - ("photonos-4", "Photon OS 4", "x86_64"), - ("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64"), - ("photonos-5", "Photon OS 5", "x86_64"), - ("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64"), - ("ubuntu-20.04", "Ubuntu 20.04", "x86_64"), - ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64"), - ("ubuntu-22.04", "Ubuntu 22.04", "x86_64"), - ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64"), + ("x86_64", "centos-7"), + ("arm64", "centos-7-arm64"), ], "macos": [ - ("macos-12", "macOS 12", "x86_64"), - ("macos-13", "macOS 13", "x86_64"), - ("macos-13-xlarge", "macOS 13 Arm64", "aarch64"), + ("x86_64", "macos-12"), + ("arm64", "macos-13-xlarge"), ], "windows": [ - ("windows-2016", "Windows 2016", "amd64"), - ("windows-2019", "Windows 2019", "amd64"), - ("windows-2022", "Windows 2022", "amd64"), + ("amd64", "windows-2022"), ], } test_salt_pkg_downloads_listing: dict[str, list[tuple[str, str, str]]] = { @@ -241,44 +211,46 @@ def generate_workflows(ctx: Context): "macos": [], "windows": [], } - rpm_slugs = [ + rpm_slugs = ( "almalinux", "amazonlinux", "centos", "centosstream", "fedora", "photon", - ] - for slug, display_name, arch in build_ci_deps_listing["linux"]: - if slug in ("archlinux-lts", "opensuse-15"): - continue - test_salt_pkg_downloads_listing["linux"].append((slug, arch, "package")) - # Account for old arm64 repo paths - if arch == "aarch64": - for test_slug in rpm_slugs: - if slug.startswith(test_slug): - test_salt_pkg_downloads_listing["linux"].append( - (slug, "arm64", "package") - ) - break - for slug, display_name, arch in build_ci_deps_listing["linux"][-2:]: - if slug in ("archlinux-lts", "opensuse-15"): + ) + linux_skip_pkg_download_tests = ( + "archlinux-lts", + "opensuse-15", + "windows", + ) + for slug in sorted(AMIS): + if slug.startswith(linux_skip_pkg_download_tests): continue - test_salt_pkg_downloads_listing["linux"].append((slug, arch, "onedir")) - for slug, display_name, arch in build_ci_deps_listing["macos"]: - if arch == "aarch64": + if "arm64" in slug: arch = "arm64" + else: + arch = "x86_64" + if slug.startswith(rpm_slugs) and arch == "arm64": + # While we maintain backwards compatible urls + test_salt_pkg_downloads_listing["linux"].append( + (slug, "aarch64", "package") + ) + test_salt_pkg_downloads_listing["linux"].append((slug, arch, "package")) + if slug.startswith("ubuntu-22"): + test_salt_pkg_downloads_listing["linux"].append((slug, arch, "onedir")) + for slug, display_name, arch in test_salt_listing["macos"]: test_salt_pkg_downloads_listing["macos"].append((slug, arch, "package")) - for slug, display_name, arch in build_ci_deps_listing["macos"][-1:]: + for slug, display_name, arch in test_salt_listing["macos"][-1:]: test_salt_pkg_downloads_listing["macos"].append((slug, arch, "onedir")) - for slug, display_name, arch in build_ci_deps_listing["windows"][-1:]: + for slug, display_name, arch in test_salt_listing["windows"][-1:]: for pkg_type in ("nsis", "msi", "onedir"): test_salt_pkg_downloads_listing["windows"].append((slug, arch, pkg_type)) test_salt_pkg_downloads_needs_slugs = set() for platform in test_salt_pkg_downloads_listing: - for slug, _, _ in test_salt_pkg_downloads_listing[platform]: - test_salt_pkg_downloads_needs_slugs.add(f"{slug.replace('.', '')}-ci-deps") + for _, arch, _ in test_salt_pkg_downloads_listing[platform]: + test_salt_pkg_downloads_needs_slugs.add("build-ci-deps") env = Environment( block_start_string="<%", diff --git a/tools/utils/__init__.py b/tools/utils/__init__.py index bebc9c98eb34..78913a43754b 100644 --- a/tools/utils/__init__.py +++ b/tools/utils/__init__.py @@ -259,3 +259,24 @@ def download_file( if chunk: f.write(chunk) return dest + + +def get_platform_and_arch_from_slug(slug: str) -> tuple[str, str]: + if "windows" in slug: + platform = "windows" + arch = "amd64" + elif "macos" in slug: + platform = "macos" + if "macos-13" in slug and "xlarge" in slug: + arch = "arm64" + else: + arch = "x86_64" + else: + platform = "linux" + if "arm64" in slug: + arch = "arm64" + elif "aarch64" in slug: + arch = "arm64" + else: + arch = "x86_64" + return platform, arch diff --git a/tools/vm.py b/tools/vm.py index 11eed3f99189..83493c3b04df 100644 --- a/tools/vm.py +++ b/tools/vm.py @@ -1468,15 +1468,17 @@ def compress_dependencies(self): """ Compress .nox/ into nox..tar.* in the VM """ - return self.run_nox("compress-dependencies", session_args=[self.name]) + platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name) + return self.run_nox("compress-dependencies", session_args=[platform, arch]) def decompress_dependencies(self): """ Decompress nox..tar.* if it exists in the VM """ env = {"DELETE_NOX_ARCHIVE": "1"} + platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name) return self.run_nox( - "decompress-dependencies", session_args=[self.name], env=env + "decompress-dependencies", session_args=[platform, arch], env=env ) def download_dependencies(self): @@ -1484,9 +1486,11 @@ def download_dependencies(self): Download nox..tar.* from VM """ if self.is_windows: - dependencies_filename = f"nox.{self.name}.tar.gz" + extension = "tar.gz" else: - dependencies_filename = f"nox.{self.name}.tar.xz" + extension = "tar.xz" + platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name) + dependencies_filename = f"nox.{platform}.{arch}.{extension}" remote_path = self.upload_path.joinpath(dependencies_filename).as_posix() if self.is_windows: for drive in ("c:", "C:"):