Skip to content

Commit

Permalink
Merge pull request #1287 from DFE-Digital/616-deploy-workflow-update-…
Browse files Browse the repository at this point in the history
…retrieve-webhook

Update Retrieve Slack webhook from KV Steps
  • Loading branch information
divesh987 authored Sep 1, 2023
2 parents cf8393b + 67194a2 commit 153b9cd
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ jobs:
id: fetch-slack-webhook
with:
inlineScript: |
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value")
SANITIZED_SECRET=$(echo $SECRET_VALUE | tr -d \")
echo "::add-mask::$SANITIZED_SECRET"
echo "SLACK-WEBHOOK=$SANITIZED_SECRET" >> $GITHUB_OUTPUT
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "SLACK-WEBHOOK=$SECRET_VALUE" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
id: buildx
Expand Down Expand Up @@ -110,10 +108,8 @@ jobs:
id: fetch-slack-webhook
with:
inlineScript: |
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value")
SANITIZED_SECRET=$(echo $SECRET_VALUE | tr -d \")
echo "::add-mask::$SANITIZED_SECRET"
echo "SLACK-WEBHOOK=$SANITIZED_SECRET" >> $GITHUB_OUTPUT
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "SLACK-WEBHOOK=$SECRET_VALUE" >> $GITHUB_OUTPUT
- name: Trigger Development Deployment
uses: ./.github/workflows/actions/deploy_v2
Expand Down Expand Up @@ -156,10 +152,8 @@ jobs:
id: fetch-slack-webhook
with:
inlineScript: |
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value")
SANITIZED_SECRET=$(echo $SECRET_VALUE | tr -d \")
echo "::add-mask::$SANITIZED_SECRET"
echo "SLACK-WEBHOOK=$SANITIZED_SECRET" >> $GITHUB_OUTPUT
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "SLACK-WEBHOOK=$SECRET_VALUE" >> $GITHUB_OUTPUT
- name: Trigger Test Deployment
uses: ./.github/workflows/actions/deploy_v2
Expand Down Expand Up @@ -201,10 +195,8 @@ jobs:
id: fetch-slack-webhook
with:
inlineScript: |
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value")
SANITIZED_SECRET=$(echo $SECRET_VALUE | tr -d \")
echo "::add-mask::$SANITIZED_SECRET"
echo "SLACK-WEBHOOK=$SANITIZED_SECRET" >> $GITHUB_OUTPUT
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "SLACK-WEBHOOK=$SECRET_VALUE" >> $GITHUB_OUTPUT
- name: Trigger Production Deployment
uses: ./.github/workflows/actions/deploy_v2
Expand Down

0 comments on commit 153b9cd

Please sign in to comment.