-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add finish slack + rename new production
- Loading branch information
Showing
1 changed file
with
73 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,17 +242,6 @@ jobs: | |
CONFLUENCE_USERNAME: ${{ secrets.VBR_CONFLUENCE_USER }} | ||
CONFLUENCE_PASSWORD: ${{ secrets.VBR_CONFLUENCE_PASSWORD }} | ||
|
||
# - name: Create Jira Release | ||
# shell: bash | ||
# run: ./packages/Be.Vlaanderen.Basisregisters.Build.Pipeline/Content/ci-jira.sh | ||
# env: | ||
# CONFLUENCE_TITLE: ${{ env.REPOSITORY_NAME }} | ||
# CONFLUENCE_USERNAME: ${{ secrets.VBR_CONFLUENCE_USER }} | ||
# CONFLUENCE_PASSWORD: ${{ secrets.VBR_CONFLUENCE_PASSWORD }} | ||
# JIRA_PREFIX: OpsWeb | ||
# JIRA_PROJECT: GAWR | ||
# JIRA_VERSION: ${{ needs.release.outputs.version }} | ||
|
||
push_images_to_test: | ||
if: needs.release.outputs.version != 'none' | ||
needs: [ release ] | ||
|
@@ -353,25 +342,25 @@ jobs: | |
SEMVER: ${{ needs.release.outputs.version }} | ||
WORKSPACE: ${{ github.workspace }} | ||
|
||
push_images_to_newproduction: | ||
push_images_to_production: | ||
if: needs.release.outputs.version != 'none' | ||
needs: [ release ] | ||
name: Push images to New Production | ||
name: Push images to Production | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: [ | ||
'dashboard' | ||
] | ||
steps: | ||
- name: Configure AWS credentials (New Production) | ||
- name: Configure AWS credentials (Production) | ||
uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_NEWPRD }} | ||
aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_NEWPRD }} | ||
aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} | ||
|
||
- name: Login to Amazon ECR (New Production) | ||
- name: Login to Amazon ECR (Production) | ||
uses: aws-actions/[email protected] | ||
|
||
# Download artifact | ||
|
@@ -391,7 +380,7 @@ jobs: | |
env: | ||
IMAGE: ${{ matrix.image }} | ||
|
||
- name: Push artifacts to ECR New Production | ||
- name: Push artifacts to ECR Production | ||
shell: bash | ||
run: | | ||
echo $IMAGE:$SEMVER | ||
|
@@ -460,6 +449,27 @@ jobs: | |
echo Status: ${{ steps.awscurl-polling-action.outputs.status }} | ||
echo ${{ steps.awscurl-polling-action.outputs.final-message }} | ||
deploy_to_test_finish_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ deploy_to_test ] | ||
name: Deploy to test finished | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Parse repository name | ||
run: echo REPOSITORY_NAME=$(echo ""$GITHUB_REPOSITORY"" | awk -F / '{print $2}' | sed -e ""s/:refs//"") >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Notify deployment finished | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '#team-dinosaur-dev' | ||
slack-message: Deployment of ops-web to test has finished | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | ||
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} | ||
|
||
deploy_to_staging_start_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ push_images_to_staging, release ] | ||
|
@@ -515,10 +525,31 @@ jobs: | |
echo Status: ${{ steps.awscurl-polling-action.outputs.status }} | ||
echo ${{ steps.awscurl-polling-action.outputs.final-message }} | ||
deploy_to_newproduction_start_slack: | ||
deploy_to_staging_finish_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ push_images_to_newproduction, release ] | ||
name: Deploy to new production started | ||
needs: [ deploy_to_staging ] | ||
name: Deploy to staging finished | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Parse repository name | ||
run: echo REPOSITORY_NAME=$(echo ""$GITHUB_REPOSITORY"" | awk -F / '{print $2}' | sed -e ""s/:refs//"") >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Notify deployment finished | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '#team-dinosaur-dev' | ||
slack-message: Deployment of ops-web to staging has finished | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | ||
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} | ||
|
||
deploy_to_production_start_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ push_images_to_production, release ] | ||
name: Deploy to production started | ||
environment: newprd | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -537,9 +568,9 @@ jobs: | |
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} | ||
|
||
deploy_to_newproduction: | ||
deploy_to_production: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ deploy_to_newproduction_start_slack, release ] | ||
needs: [ deploy_to_production_start_slack, release ] | ||
name: Deploy to new production | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -569,3 +600,24 @@ jobs: | |
echo build-uuid: ${{ steps.awscurl-polling-action.outputs.build-uuid }} | ||
echo Status: ${{ steps.awscurl-polling-action.outputs.status }} | ||
echo ${{ steps.awscurl-polling-action.outputs.final-message }} | ||
deploy_to_production_finish_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ deploy_to_production ] | ||
name: Deploy to production finished | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Parse repository name | ||
run: echo REPOSITORY_NAME=$(echo ""$GITHUB_REPOSITORY"" | awk -F / '{print $2}' | sed -e ""s/:refs//"") >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Notify deployment finished | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '#team-dinosaur-dev' | ||
slack-message: Deployment of ops-web to production has finished | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | ||
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} |