mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Changed release runners and sheel script date
This commit is contained in:
parent
8cdedfbec2
commit
ee72db1f2a
2 changed files with 71 additions and 66 deletions
135
.github/workflows/release.yml
vendored
135
.github/workflows/release.yml
vendored
|
@ -52,9 +52,10 @@ jobs:
|
||||||
update-develop:
|
update-develop:
|
||||||
name: Update CHANGELOG.md and bootstrap-salt.sh
|
name: Update CHANGELOG.md and bootstrap-salt.sh
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- ubuntu-latest
|
||||||
- linux
|
## - self-hosted
|
||||||
- repo-release
|
## - linux
|
||||||
|
## - repo-release
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # To be able to publish the release
|
contents: write # To be able to publish the release
|
||||||
environment: release
|
environment: release
|
||||||
|
@ -151,9 +152,10 @@ jobs:
|
||||||
merge-develop-into-stable:
|
merge-develop-into-stable:
|
||||||
name: Merge develop into stable
|
name: Merge develop into stable
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- ubuntu-latest
|
||||||
- linux
|
## - self-hosted
|
||||||
- repo-release
|
## - linux
|
||||||
|
## - repo-release
|
||||||
needs:
|
needs:
|
||||||
- update-develop
|
- update-develop
|
||||||
environment: release
|
environment: release
|
||||||
|
@ -249,8 +251,9 @@ jobs:
|
||||||
publish-release:
|
publish-release:
|
||||||
name: Create GitHub Release
|
name: Create GitHub Release
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- ubuntu-latest
|
||||||
- linux
|
## - self-hosted
|
||||||
|
## - linux
|
||||||
needs:
|
needs:
|
||||||
- merge-develop-into-stable
|
- merge-develop-into-stable
|
||||||
environment: release
|
environment: release
|
||||||
|
@ -296,73 +299,75 @@ jobs:
|
||||||
name: release-details
|
name: release-details
|
||||||
failOnError: false
|
failOnError: false
|
||||||
|
|
||||||
update-s3-bucket:
|
## update-s3-bucket:
|
||||||
name: Update S3 Bucket
|
## name: Update S3 Bucket
|
||||||
runs-on:
|
## runs-on:
|
||||||
- self-hosted
|
## - ubuntu-latest
|
||||||
- linux
|
## ## - self-hosted
|
||||||
- repo-release
|
## ## - linux
|
||||||
needs:
|
## ## - repo-release
|
||||||
- publish-release
|
## needs:
|
||||||
environment: release
|
## - publish-release
|
||||||
|
## environment: release
|
||||||
|
|
||||||
steps:
|
## steps:
|
||||||
- uses: actions/checkout@v4
|
## - uses: actions/checkout@v4
|
||||||
with:
|
## with:
|
||||||
ref: stable
|
## ref: stable
|
||||||
repository: ${{ github.repository }}
|
## repository: ${{ github.repository }}
|
||||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
## ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||||
|
|
||||||
- name: Get Salt Project GitHub Actions Bot Environment
|
## - name: Get Salt Project GitHub Actions Bot Environment
|
||||||
run: |
|
## run: |
|
||||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
## 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)
|
## 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"
|
## echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
## - name: Setup GnuPG
|
## ## - name: Setup GnuPG
|
||||||
## run: |
|
## ## run: |
|
||||||
## sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
## ## sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||||
## GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
## ## GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||||
## echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
## ## echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||||
## cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
## ## cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||||
## batch
|
## ## batch
|
||||||
## no-tty
|
## ## no-tty
|
||||||
## pinentry-mode loopback
|
## ## pinentry-mode loopback
|
||||||
## EOF
|
## ## EOF
|
||||||
|
|
||||||
## - name: Get Secrets
|
## ## - name: Get Secrets
|
||||||
## id: get-secrets
|
## ## id: get-secrets
|
||||||
## env:
|
## ## env:
|
||||||
## SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
## ## SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||||
## run: |
|
## ## run: |
|
||||||
## SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
## ## SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||||
## echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
## ## 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 \
|
## ## 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 \
|
## ## --query SecretString --output text | jq .default_key -r | base64 -d \
|
||||||
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
## ## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||||
## | gpg --import -
|
## ## | gpg --import -
|
||||||
## sync
|
## ## sync
|
||||||
## aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
## ## 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 \
|
## ## --query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||||
## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
## ## | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||||
## sync
|
## ## sync
|
||||||
## rm "$SECRETS_KEY_FILE"
|
## ## rm "$SECRETS_KEY_FILE"
|
||||||
## echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
## ## echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||||
|
|
||||||
## - name: Install Requirements
|
## ## - name: Install Requirements
|
||||||
## run: |
|
## ## run: |
|
||||||
## python3 -m pip install -r requirements/release.txt
|
## ## python3 -m pip install -r requirements/release.txt
|
||||||
|
|
||||||
## - name: Upload Stable Release to S3
|
## ## - name: Upload Stable Release to S3
|
||||||
## run: |
|
## ## run: |
|
||||||
## tools release s3-publish --key-id 64CBBC8173D76B3F stable
|
## ## tools release s3-publish --key-id 64CBBC8173D76B3F stable
|
||||||
|
|
||||||
update-develop-checksums:
|
update-develop-checksums:
|
||||||
name: Update Release Checksums on Develop
|
name: Update Release Checksums on Develop
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- ubuntu-latest
|
||||||
- linux
|
## - self-hosted
|
||||||
- repo-release
|
## - linux
|
||||||
|
## - repo-release
|
||||||
needs:
|
needs:
|
||||||
- publish-release
|
- publish-release
|
||||||
environment: release
|
environment: release
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#======================================================================================================================
|
#======================================================================================================================
|
||||||
set -o nounset # Treat unset variables as an error
|
set -o nounset # Treat unset variables as an error
|
||||||
|
|
||||||
__ScriptVersion="2024.11.06"
|
__ScriptVersion="2024.11.07"
|
||||||
__ScriptName="bootstrap-salt.sh"
|
__ScriptName="bootstrap-salt.sh"
|
||||||
|
|
||||||
__ScriptFullName="$0"
|
__ScriptFullName="$0"
|
||||||
|
|
Loading…
Add table
Reference in a new issue