mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
DEVOPS-1581 ADD: azure-deploy job to non-prod-web workflow
This commit is contained in:
48
.github/workflows/deploy-non-prod-web.yml
vendored
48
.github/workflows/deploy-non-prod-web.yml
vendored
@@ -171,6 +171,54 @@ jobs:
|
|||||||
state: 'failure'
|
state: 'failure'
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
|
azure-deploy:
|
||||||
|
name: Deploy to Azure
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
_WEB_ARTIFACT: "web-*-cloud-euqa.zip"
|
||||||
|
steps:
|
||||||
|
- name: Login to Azure - EU Subscription
|
||||||
|
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_KV_EU_QA_SERVICE_PRINCIPAL }}
|
||||||
|
|
||||||
|
- name: Retrieve Storage Account connection string
|
||||||
|
id: retrieve-secrets
|
||||||
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||||
|
with:
|
||||||
|
keyvault: webvaulteu-westeurope-qa
|
||||||
|
secrets: "sa-bitwarden-web-vault-dev-key-temp"
|
||||||
|
|
||||||
|
- name: Download latest cloud asset
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
|
with:
|
||||||
|
workflow: build-web.yml
|
||||||
|
path: apps/web
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: ${{ github.event.inputs.tag }}
|
||||||
|
artifacts: ${{ env._WEB_ARTIFACT }}
|
||||||
|
|
||||||
|
- name: Unzip build asset
|
||||||
|
working-directory: apps/web
|
||||||
|
run: unzip ${{ env._WEB_ARTIFACT }}
|
||||||
|
|
||||||
|
- name: Empty container in Storage Account
|
||||||
|
run: |
|
||||||
|
az storage blob delete-batch \
|
||||||
|
--source '$web' \
|
||||||
|
--pattern '*' \
|
||||||
|
--connection-string "${{ steps.retrieve-secrets.outputs.sa-bitwarden-web-vault-dev-key-temp }}"
|
||||||
|
|
||||||
|
- name: Deploy to Azure Storage Account
|
||||||
|
working-directory: apps/web
|
||||||
|
run: |
|
||||||
|
az storage blob upload-batch \
|
||||||
|
--source "./build" \
|
||||||
|
--destination '$web' \
|
||||||
|
--connection-string "${{ steps.retrieve-secrets.outputs.sa-bitwarden-web-vault-dev-key-temp }}" \
|
||||||
|
--overwrite \
|
||||||
|
--no-progress
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
name: Notify Slack with result
|
name: Notify Slack with result
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|||||||
Reference in New Issue
Block a user