1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

[ENG-71] Updated release job to create and update Github deployment for Jira integration (#2141)

* [ENG-71] updated release job to have Github deployment

* [ENG-71] Updated to use commit instead of v2.

* [ENG-71] Updated to track each server deployment.

Co-authored-by: Todd Martin <>
This commit is contained in:
Todd Martin 2022-07-25 17:19:56 -04:00 committed by GitHub
parent 7dfb04298d
commit dd75e8886a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 0 deletions

View File

@ -90,6 +90,22 @@ jobs:
mkdir publish
- name: Create GitHub deployment for ${{ matrix.name }}
uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48
id: deployment
with:
token: '${{ secrets.GITHUB_TOKEN }}'
environment: 'Server ${{ matrix.name }} - QA'
task: 'deploy'
description: 'Deploy from ${{ env.branch_name }} branch'
- name: Update ${{ matrix.name }} deployment status to In Progress
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: 'in_progress'
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
- name: Download latest ${{ matrix.name }} asset from ${{ env.branch_name }}
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
env:
@ -137,3 +153,19 @@ jobs:
run: |
az webapp start --name ${{ steps.retrieve-secrets.outputs.webapp-name }} \
--resource-group $AZURE_RESOURCE_GROUP
- name: Update ${{ matrix.name }} deployment status to Success
if: success()
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: 'success'
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
- name: Update ${{ matrix.name }} deployment status to Failure
if: failure()
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: 'failure'
deployment-id: ${{ steps.deployment.outputs.deployment_id }}

View File

@ -75,6 +75,22 @@ jobs:
echo "NAME_LOWER: $NAME_LOWER"
echo "::set-output name=name_lower::$NAME_LOWER"
- name: Create GitHub deployment for ${{ matrix.name }}
uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48
id: deployment
with:
token: '${{ secrets.GITHUB_TOKEN }}'
environment: 'Server ${{ matrix.name }} - Production'
task: 'deploy'
description: 'Deploy from ${{ needs.setup.outputs.branch-name }} branch'
- name: Update ${{ matrix.name }} deployment status to In Progress
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: 'in_progress'
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
- name: Download latest Release ${{ matrix.name }} asset
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
@ -139,6 +155,22 @@ jobs:
fi
az webapp start -n $WEBAPP_NAME -g $RESOURCE_GROUP -s staging
- name: Update ${{ matrix.name }} deployment status to Success
if: success()
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: 'success'
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
- name: Update ${{ matrix.name }} deployment status to Failure
if: failure()
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
with:
token: '${{ secrets.GITHUB_TOKEN }}'
state: 'failure'
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
release-docker:
name: Build Docker images