mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Un-nest the build repositories steps too.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
65d7761e8a
commit
848fd0fecf
9 changed files with 1081 additions and 350 deletions
564
.github/workflows/nightly.yml
vendored
564
.github/workflows/nightly.yml
vendored
|
@ -1109,87 +1109,555 @@ jobs:
|
|||
|
||||
build-src-repo:
|
||||
name: Build Source Repository
|
||||
environment: nightly
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-nightly
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-salt-onedir
|
||||
uses: ./.github/workflows/build-src-repo.yml
|
||||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download Source Tarball
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create src --key-id=64CBBC8173D76B3F --nightly-build \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Standalone Repository As An Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-src-repo
|
||||
path: |
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.*
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/*-GPG-*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: src-repo
|
||||
|
||||
build-deb-repo:
|
||||
name: Build DEB Repository
|
||||
environment: nightly
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-nightly
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-deb-pkgs
|
||||
uses: ./.github/workflows/build-deb-repo.yml
|
||||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: debian
|
||||
version: "10"
|
||||
arch: x86_64
|
||||
- distro: debian
|
||||
version: "10"
|
||||
arch: aarch64
|
||||
- distro: debian
|
||||
version: "11"
|
||||
arch: x86_64
|
||||
- distro: debian
|
||||
version: "11"
|
||||
arch: aarch64
|
||||
- distro: ubuntu
|
||||
version: "20.04"
|
||||
arch: x86_64
|
||||
- distro: ubuntu
|
||||
version: "20.04"
|
||||
arch: aarch64
|
||||
- distro: ubuntu
|
||||
version: "22.04"
|
||||
arch: x86_64
|
||||
- distro: ubuntu
|
||||
version: "22.04"
|
||||
arch: aarch64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download System Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y devscripts apt-utils
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download DEB Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-deb
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create deb --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} --nightly-build \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo
|
||||
|
||||
build-rpm-repo:
|
||||
name: Build RPM Repository
|
||||
environment: nightly
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-nightly
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-rpm-pkgs
|
||||
uses: ./.github/workflows/build-rpm-repo.yml
|
||||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: amazon
|
||||
version: "2"
|
||||
arch: x86_64
|
||||
- distro: redhat
|
||||
version: "7"
|
||||
arch: x86_64
|
||||
- distro: redhat
|
||||
version: "8"
|
||||
arch: x86_64
|
||||
- distro: redhat
|
||||
version: "9"
|
||||
arch: x86_64
|
||||
- distro: fedora
|
||||
version: "36"
|
||||
arch: x86_64
|
||||
- distro: fedora
|
||||
version: "37"
|
||||
arch: x86_64
|
||||
- distro: fedora
|
||||
version: "38"
|
||||
arch: x86_64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download System Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y rpm
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download RPM Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create rpm --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} --nightly-build \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo
|
||||
|
||||
build-windows-repo:
|
||||
name: Build Windows Repository
|
||||
environment: nightly
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-nightly
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-windows-pkgs
|
||||
uses: ./.github/workflows/build-windows-repo.yml
|
||||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download Windows NSIS x86 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-NSIS
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows MSI x86 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-MSI
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows NSIS amd64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-NSIS
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows MSI amd64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-MSI
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create windows --key-id=64CBBC8173D76B3F --nightly-build \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: windows-repo
|
||||
|
||||
build-macos-repo:
|
||||
name: Build macOS Repository
|
||||
environment: nightly
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-nightly
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-macos-pkgs
|
||||
uses: ./.github/workflows/build-macos-repo.yml
|
||||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download macOS x86_64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86_64-macos
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create macos --key-id=64CBBC8173D76B3F --nightly-build \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: macos-repo
|
||||
|
||||
build-onedir-repo:
|
||||
name: Build Onedir Repository
|
||||
environment: nightly
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-nightly
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-salt-onedir
|
||||
uses: ./.github/workflows/build-onedir-repo.yml
|
||||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download Linux x86_64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Linux aarch64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.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
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive(zip)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.zip
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows x86 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive(zip)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.zip
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create onedir --key-id=64CBBC8173D76B3F --nightly-build \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: onedir-repo
|
||||
|
||||
publish-repositories:
|
||||
name: Publish Repositories
|
||||
|
|
558
.github/workflows/staging.yml
vendored
558
.github/workflows/staging.yml
vendored
|
@ -1151,81 +1151,555 @@ jobs:
|
|||
|
||||
build-src-repo:
|
||||
name: Build Source Repository
|
||||
environment: staging
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-staging
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-salt-onedir
|
||||
uses: ./.github/workflows/build-src-repo.yml
|
||||
with:
|
||||
environment: staging
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download Source Tarball
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create src --key-id=64CBBC8173D76B3F \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Standalone Repository As An Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-src-repo
|
||||
path: |
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.*
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/*-GPG-*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: src-repo
|
||||
|
||||
build-deb-repo:
|
||||
name: Build DEB Repository
|
||||
environment: staging
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-staging
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-deb-pkgs
|
||||
uses: ./.github/workflows/build-deb-repo.yml
|
||||
with:
|
||||
environment: staging
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: debian
|
||||
version: "10"
|
||||
arch: x86_64
|
||||
- distro: debian
|
||||
version: "10"
|
||||
arch: aarch64
|
||||
- distro: debian
|
||||
version: "11"
|
||||
arch: x86_64
|
||||
- distro: debian
|
||||
version: "11"
|
||||
arch: aarch64
|
||||
- distro: ubuntu
|
||||
version: "20.04"
|
||||
arch: x86_64
|
||||
- distro: ubuntu
|
||||
version: "20.04"
|
||||
arch: aarch64
|
||||
- distro: ubuntu
|
||||
version: "22.04"
|
||||
arch: x86_64
|
||||
- distro: ubuntu
|
||||
version: "22.04"
|
||||
arch: aarch64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download System Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y devscripts apt-utils
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download DEB Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-deb
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create deb --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo
|
||||
|
||||
build-rpm-repo:
|
||||
name: Build RPM Repository
|
||||
environment: staging
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-staging
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-rpm-pkgs
|
||||
uses: ./.github/workflows/build-rpm-repo.yml
|
||||
with:
|
||||
environment: staging
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: amazon
|
||||
version: "2"
|
||||
arch: x86_64
|
||||
- distro: redhat
|
||||
version: "7"
|
||||
arch: x86_64
|
||||
- distro: redhat
|
||||
version: "8"
|
||||
arch: x86_64
|
||||
- distro: redhat
|
||||
version: "9"
|
||||
arch: x86_64
|
||||
- distro: fedora
|
||||
version: "36"
|
||||
arch: x86_64
|
||||
- distro: fedora
|
||||
version: "37"
|
||||
arch: x86_64
|
||||
- distro: fedora
|
||||
version: "38"
|
||||
arch: x86_64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download System Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y rpm
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download RPM Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create rpm --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo
|
||||
|
||||
build-windows-repo:
|
||||
name: Build Windows Repository
|
||||
environment: staging
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-staging
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-windows-pkgs
|
||||
uses: ./.github/workflows/build-windows-repo.yml
|
||||
with:
|
||||
environment: staging
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download Windows NSIS x86 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-NSIS
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows MSI x86 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-MSI
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows NSIS amd64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-NSIS
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows MSI amd64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-MSI
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create windows --key-id=64CBBC8173D76B3F \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: windows-repo
|
||||
|
||||
build-macos-repo:
|
||||
name: Build macOS Repository
|
||||
environment: staging
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-staging
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-macos-pkgs
|
||||
uses: ./.github/workflows/build-macos-repo.yml
|
||||
with:
|
||||
environment: staging
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download macOS x86_64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86_64-macos
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create macos --key-id=64CBBC8173D76B3F \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: macos-repo
|
||||
|
||||
build-onedir-repo:
|
||||
name: Build Onedir Repository
|
||||
environment: staging
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-staging
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-salt-onedir
|
||||
uses: ./.github/workflows/build-onedir-repo.yml
|
||||
with:
|
||||
environment: staging
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Download Linux x86_64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Linux aarch64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.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
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive(zip)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.zip
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows x86 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive(zip)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.zip
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Create Repository Path
|
||||
run: |
|
||||
mkdir -p artifacts/pkgs/repo
|
||||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create onedir --key-id=64CBBC8173D76B3F \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
archive-name: onedir-repo
|
||||
|
||||
publish-repositories:
|
||||
name: Publish Repositories
|
||||
|
|
|
@ -1,37 +1,4 @@
|
|||
---
|
||||
name: Build DEB Apt Repository
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
type: string
|
||||
description: On which GitHub Environment Context To Run
|
||||
secrets:
|
||||
SECRETS_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
|
||||
jobs:
|
||||
build-repo:
|
||||
name: DEB
|
||||
environment: ${{ inputs.environment }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-${{ inputs.environment }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -75,7 +42,7 @@ jobs:
|
|||
- name: Download DEB Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-deb
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
|
@ -113,15 +80,15 @@ jobs:
|
|||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create deb --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
tools pkg repo create deb --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} <% if gh_environment == 'nightly' -%> --nightly-build <%- endif %> \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
|
@ -1,37 +1,3 @@
|
|||
---
|
||||
name: Build macOS Repository
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
type: string
|
||||
description: On which GitHub Environment Context To Run
|
||||
secrets:
|
||||
SECRETS_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
|
||||
jobs:
|
||||
build-repo:
|
||||
name: macOS
|
||||
environment: ${{ inputs.environment }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -42,7 +8,7 @@ jobs:
|
|||
- name: Download macOS x86_64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-x86_64-macos
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86_64-macos
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
|
@ -80,15 +46,14 @@ jobs:
|
|||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create macos --key-id=64CBBC8173D76B3F \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --incoming=artifacts/pkgs/incoming \
|
||||
--repo-path=artifacts/pkgs/repo
|
||||
tools pkg repo create macos --key-id=64CBBC8173D76B3F <% if gh_environment == 'nightly' -%> --nightly-build <%- endif %> \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
|
@ -1,37 +1,3 @@
|
|||
---
|
||||
name: Build Onedir Repository
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
type: string
|
||||
description: On which GitHub Environment Context To Run
|
||||
secrets:
|
||||
SECRETS_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
|
||||
jobs:
|
||||
build-repo:
|
||||
name: Onedir
|
||||
environment: ${{ inputs.environment }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -42,43 +8,43 @@ jobs:
|
|||
- name: Download Linux x86_64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-linux-x86_64.tar.xz
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Linux aarch64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-linux-aarch64.tar.xz
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download macOS x86_64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-darwin-x86_64.tar.xz
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-windows-amd64.tar.xz
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive(zip)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-windows-amd64.zip
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.zip
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows x86 Onedir Archive
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-windows-x86.tar.xz
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.tar.xz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows amd64 Onedir Archive(zip)
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-onedir-windows-x86.zip
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.zip
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
|
@ -116,15 +82,14 @@ jobs:
|
|||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create onedir --key-id=64CBBC8173D76B3F \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --incoming=artifacts/pkgs/incoming \
|
||||
--repo-path=artifacts/pkgs/repo
|
||||
tools pkg repo create onedir --key-id=64CBBC8173D76B3F <% if gh_environment == 'nightly' -%> --nightly-build <%- endif %> \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
|
@ -12,6 +12,11 @@
|
|||
|
||||
<{ job_name }>:
|
||||
name: Build <{ display_name }> Repository
|
||||
environment: <{ gh_environment }>
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-<{ gh_environment }>
|
||||
needs:
|
||||
- prepare-workflow
|
||||
<%- if needs_pkg %>
|
||||
|
@ -19,15 +24,6 @@
|
|||
<%- else %>
|
||||
- build-salt-onedir
|
||||
<%- endif %>
|
||||
uses: ./.github/workflows/build-<{ type }>-repo.yml
|
||||
with:
|
||||
environment: <{ gh_environment }>
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
rc-build: ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') }}
|
||||
<%- if gh_environment == "nightly" %>
|
||||
nightly-build: true
|
||||
<%- endif %>
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
<%- include "build-{}-repo.yml.jinja".format(type) %>
|
||||
|
||||
<%- endfor %>
|
||||
|
|
|
@ -1,37 +1,4 @@
|
|||
---
|
||||
name: Build RPM Repository
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
type: string
|
||||
description: On which GitHub Environment Context To Run
|
||||
secrets:
|
||||
SECRETS_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
|
||||
jobs:
|
||||
build-repo:
|
||||
name: RPM
|
||||
environment: ${{ inputs.environment }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-${{ inputs.environment }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -72,7 +39,7 @@ jobs:
|
|||
- name: Download RPM Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
|
@ -110,16 +77,15 @@ jobs:
|
|||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create rpm --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --distro=${{ matrix.distro }} \
|
||||
--distro-version=${{ matrix.version }} \
|
||||
tools pkg repo create rpm --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} <% if gh_environment == 'nightly' -%> --nightly-build <%- endif %> \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
|
@ -1,37 +1,3 @@
|
|||
---
|
||||
name: Build Source Repository
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
type: string
|
||||
description: On which GitHub Environment Context To Run
|
||||
secrets:
|
||||
SECRETS_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
|
||||
jobs:
|
||||
build-repo:
|
||||
name: Source
|
||||
environment: ${{ inputs.environment }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -42,7 +8,7 @@ jobs:
|
|||
- name: Download Source Tarball
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}.tar.gz
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
|
@ -80,26 +46,25 @@ jobs:
|
|||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create src --key-id=64CBBC8173D76B3F \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --incoming=artifacts/pkgs/incoming \
|
||||
--repo-path=artifacts/pkgs/repo
|
||||
tools pkg repo create src --key-id=64CBBC8173D76B3F <% if gh_environment == 'nightly' -%> --nightly-build <%- endif %> \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Standalone Repository As An Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-src-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-src-repo
|
||||
path: |
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ inputs.salt-version }}/salt-${{ inputs.salt-version }}.tar.gz
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ inputs.salt-version }}/salt-${{ inputs.salt-version }}.tar.gz.*
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ inputs.salt-version }}/*-GPG-*
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.*
|
||||
artifacts/pkgs/repo/salt/py3/src/${{ needs.prepare-workflow.outputs.salt-version }}/*-GPG-*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
|
@ -1,37 +1,3 @@
|
|||
---
|
||||
name: Build Windows Repository
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
type: string
|
||||
description: On which GitHub Environment Context To Run
|
||||
secrets:
|
||||
SECRETS_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
|
||||
jobs:
|
||||
build-repo:
|
||||
name: Windows
|
||||
environment: ${{ inputs.environment }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -42,25 +8,25 @@ jobs:
|
|||
- name: Download Windows NSIS x86 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-x86-windows-NSIS
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-NSIS
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows MSI x86 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-x86-windows-MSI
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-MSI
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows NSIS amd64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-amd64-windows-pkgs-NSIS
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-NSIS
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Download Windows MSI amd64 Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-amd64-windows-pkgs-MSI
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-MSI
|
||||
path: artifacts/pkgs/incoming
|
||||
|
||||
- name: Setup GnuPG
|
||||
|
@ -98,15 +64,14 @@ jobs:
|
|||
|
||||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg repo create windows --key-id=64CBBC8173D76B3F \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --incoming=artifacts/pkgs/incoming \
|
||||
--repo-path=artifacts/pkgs/repo
|
||||
tools pkg repo create windows --key-id=64CBBC8173D76B3F <% if gh_environment == 'nightly' -%> --nightly-build <%- endif %> \
|
||||
--salt-version=${{ needs.prepare-workflow.outputs.salt-version }} ${{ contains(needs.prepare-workflow.outputs.salt-version, 'rc') && '--rc-build' || '' }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}-${{ inputs.environment }}-repo
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo
|
||||
path: artifacts/pkgs/repo/*
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
Loading…
Add table
Reference in a new issue