DEVOPS-1683 REFACTOR: branch/tag references in deploy workflow
This commit is contained in:
parent
ef090622bc
commit
9e65c510ec
|
@ -14,7 +14,7 @@ on:
|
||||||
- EUQA
|
- EUQA
|
||||||
- USPROD
|
- USPROD
|
||||||
- EUPROD
|
- EUPROD
|
||||||
branch:
|
branch-or-tag:
|
||||||
description: "Branch name to deploy (examples: 'main', 'feature/sm')"
|
description: "Branch name to deploy (examples: 'main', 'feature/sm')"
|
||||||
type: string
|
type: string
|
||||||
default: main
|
default: main
|
||||||
|
@ -25,7 +25,7 @@ on:
|
||||||
description: 'Environment'
|
description: 'Environment'
|
||||||
default: 'USQA'
|
default: 'USQA'
|
||||||
type: string
|
type: string
|
||||||
branch:
|
branch-or-tag:
|
||||||
description: "Branch name to deploy (examples: 'main', 'feature/sm')"
|
description: "Branch name to deploy (examples: 'main', 'feature/sm')"
|
||||||
type: string
|
type: string
|
||||||
default: main
|
default: main
|
||||||
|
@ -103,7 +103,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
project: Clients
|
project: Clients
|
||||||
environment: ${{ needs.setup.outputs.environment-name }}
|
environment: ${{ needs.setup.outputs.environment-name }}
|
||||||
tag: ${{ inputs.branch }}
|
tag: ${{ inputs.branch-or-tag }}
|
||||||
slack-channel: team-eng-qa-devops
|
slack-channel: team-eng-qa-devops
|
||||||
event: 'start'
|
event: 'start'
|
||||||
url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
|
url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
|
||||||
|
@ -116,7 +116,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
_ENVIRONMENT_ARTIFACT: ${{ needs.setup.outputs.environment-artifact }}
|
_ENVIRONMENT_ARTIFACT: ${{ needs.setup.outputs.environment-artifact }}
|
||||||
steps:
|
steps:
|
||||||
- name: Download latest cloud asset from branch ${{ inputs.branch }}'
|
- name: 'Download latest cloud asset from branch/tag: ${{ inputs.branch-or-tag }}'
|
||||||
uses: bitwarden/gh-actions/download-artifacts@main
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
id: download-artifacts
|
id: download-artifacts
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -124,7 +124,7 @@ jobs:
|
||||||
workflow: build-web.yml
|
workflow: build-web.yml
|
||||||
path: apps/web
|
path: apps/web
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ inputs.branch }}
|
branch: ${{ inputs.branch-or-tag }}
|
||||||
artifacts: ${{ env._ENVIRONMENT_ARTIFACT }}
|
artifacts: ${{ env._ENVIRONMENT_ARTIFACT }}
|
||||||
|
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
|
@ -141,7 +141,7 @@ jobs:
|
||||||
keyvault: "bitwarden-ci"
|
keyvault: "bitwarden-ci"
|
||||||
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
||||||
|
|
||||||
- name: Trigger build web for missing branch ${{ inputs.branch }}'
|
- name: 'Trigger build web for missing branch/tag ${{ inputs.branch-or-tag }}'
|
||||||
if: ${{ steps.download-artifacts.outcome == 'failure' }}
|
if: ${{ steps.download-artifacts.outcome == 'failure' }}
|
||||||
uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be # v1.6.5
|
uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be # v1.6.5
|
||||||
with:
|
with:
|
||||||
|
@ -149,7 +149,7 @@ jobs:
|
||||||
repo: clients
|
repo: clients
|
||||||
github_token: ${{ steps.retrieve-secret.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
github_token: ${{ steps.retrieve-secret.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||||
workflow_file_name: build-web.yml
|
workflow_file_name: build-web.yml
|
||||||
ref: ${{ inputs.branch }}
|
ref: ${{ inputs.branch-or-tag }}
|
||||||
wait_interval: 100
|
wait_interval: 100
|
||||||
|
|
||||||
azure-deploy:
|
azure-deploy:
|
||||||
|
@ -175,7 +175,7 @@ jobs:
|
||||||
environment-url: ${{ env._ENVIRONMENT_URL }}
|
environment-url: ${{ env._ENVIRONMENT_URL }}
|
||||||
environment: ${{ env._ENVIRONMENT_NAME }}
|
environment: ${{ env._ENVIRONMENT_NAME }}
|
||||||
task: 'deploy'
|
task: 'deploy'
|
||||||
description: 'Deployment from branch ${{ inputs.branch }}'
|
description: 'Deployment from branch/tag: ${{ inputs.branch-or-tag }}'
|
||||||
|
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
||||||
|
@ -189,13 +189,13 @@ jobs:
|
||||||
keyvault: ${{ needs.setup.outputs.retrieve-secrets-keyvault }}
|
keyvault: ${{ needs.setup.outputs.retrieve-secrets-keyvault }}
|
||||||
secrets: "sa-bitwarden-web-vault-dev-key-temp"
|
secrets: "sa-bitwarden-web-vault-dev-key-temp"
|
||||||
|
|
||||||
- name: Download latest cloud asset
|
- name: 'Download cloud asset from branch/tag: ${{ inputs.branch-or-tag }}'
|
||||||
uses: bitwarden/gh-actions/download-artifacts@main
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
with:
|
with:
|
||||||
workflow: build-web.yml
|
workflow: build-web.yml
|
||||||
path: apps/web
|
path: apps/web
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ inputs.branch }}
|
branch: ${{ inputs.branch-or-tag }}
|
||||||
artifacts: ${{ env._ENVIRONMENT_ARTIFACT }}
|
artifacts: ${{ env._ENVIRONMENT_ARTIFACT }}
|
||||||
|
|
||||||
- name: Unzip build asset
|
- name: Unzip build asset
|
||||||
|
@ -249,7 +249,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
project: Clients
|
project: Clients
|
||||||
environment: ${{ needs.setup.outputs.environment-name }}
|
environment: ${{ needs.setup.outputs.environment-name }}
|
||||||
tag: ${{ inputs.branch }}
|
tag: ${{ inputs.branch-or-tag }}
|
||||||
slack-channel: team-eng-qa-devops
|
slack-channel: team-eng-qa-devops
|
||||||
event: ${{ needs.azure-deploy.result }}
|
event: ${{ needs.azure-deploy.result }}
|
||||||
url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
|
url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
|
||||||
|
|
Loading…
Reference in New Issue