Merge pull request #2035 from dmurphy18/fix_release

Changed release runners and shell script date
This commit is contained in:
Shane Lee 2024-11-07 14:19:34 -07:00 committed by GitHub
commit 24a275494a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 71 additions and 66 deletions

View file

@ -52,9 +52,10 @@ jobs:
update-develop:
name: Update CHANGELOG.md and bootstrap-salt.sh
runs-on:
- self-hosted
- linux
- repo-release
- ubuntu-latest
## - self-hosted
## - linux
## - repo-release
permissions:
contents: write # To be able to publish the release
environment: release
@ -151,9 +152,10 @@ jobs:
merge-develop-into-stable:
name: Merge develop into stable
runs-on:
- self-hosted
- linux
- repo-release
- ubuntu-latest
## - self-hosted
## - linux
## - repo-release
needs:
- update-develop
environment: release
@ -249,8 +251,9 @@ jobs:
publish-release:
name: Create GitHub Release
runs-on:
- self-hosted
- linux
- ubuntu-latest
## - self-hosted
## - linux
needs:
- merge-develop-into-stable
environment: release
@ -296,73 +299,75 @@ jobs:
name: release-details
failOnError: false
update-s3-bucket:
name: Update S3 Bucket
runs-on:
- self-hosted
- linux
- repo-release
needs:
- publish-release
environment: release
## update-s3-bucket:
## name: Update S3 Bucket
## runs-on:
## - ubuntu-latest
## ## - self-hosted
## ## - linux
## ## - repo-release
## needs:
## - publish-release
## environment: release
steps:
- uses: actions/checkout@v4
with:
ref: stable
repository: ${{ github.repository }}
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
## steps:
## - uses: actions/checkout@v4
## with:
## ref: stable
## repository: ${{ github.repository }}
## ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
- 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: 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: 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: 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
## id: 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: Get Secrets
## ## id: 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: Install Requirements
## run: |
## python3 -m pip install -r requirements/release.txt
## ## - name: Install Requirements
## ## run: |
## ## python3 -m pip install -r requirements/release.txt
## - name: Upload Stable Release to S3
## run: |
## tools release s3-publish --key-id 64CBBC8173D76B3F stable
## ## - name: Upload Stable Release to S3
## ## run: |
## ## tools release s3-publish --key-id 64CBBC8173D76B3F stable
update-develop-checksums:
name: Update Release Checksums on Develop
runs-on:
- self-hosted
- linux
- repo-release
- ubuntu-latest
## - self-hosted
## - linux
## - repo-release
needs:
- publish-release
environment: release

View file

@ -26,7 +26,7 @@
#======================================================================================================================
set -o nounset # Treat unset variables as an error
__ScriptVersion="2024.11.06"
__ScriptVersion="2024.11.07"
__ScriptName="bootstrap-salt.sh"
__ScriptFullName="$0"