-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: remove newproduction from release pipeline
- Loading branch information
Showing
1 changed file
with
0 additions
and
119 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 |
---|---|---|
|
@@ -1196,122 +1196,3 @@ jobs: | |
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} | ||
|
||
deploy_to_newproduction_start_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ push_images_to_newproduction, deploy_to_test_finish_slack ] | ||
name: Deploy to new production started | ||
environment: newprd | ||
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 started | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '#team-dinosaur-dev' | ||
slack-message: Deployment of streetname-registry to new production has started | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | ||
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} | ||
|
||
deploy_to_newproduction: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ push_images_to_newproduction, deploy_to_newproduction_start_slack, release ] | ||
name: Deploy to new production | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
services: [ | ||
'streetname-registry-api' | ||
, 'streetname-registry-projections' | ||
, 'streetname-registry-backoffice-api' | ||
, 'streetname-registry-consumer' | ||
, 'streetname-registry-producer' | ||
, 'streetname-registry-migrator-streetname' | ||
, 'streetname-registry-producer-snapshot-oslo' | ||
, 'streetname-registry-projections-backoffice' | ||
, 'streetname-registry-snapshot-verifier' | ||
] | ||
|
||
steps: | ||
- name: CD services | ||
env: | ||
BUILD_URL: ${{ secrets.VBR_AWS_BUILD_API }}/${{matrix.services}} | ||
STATUS_URL: ${{ secrets.VBR_AWS_BUILD_STATUS_API }}/${{matrix.services}} | ||
uses: informatievlaanderen/awscurl-polling-action/polling-action@main | ||
with: | ||
environment: acc | ||
version: ${{ needs.release.outputs.version }} | ||
status-url: $STATUS_URL | ||
deploy-url: $BUILD_URL | ||
access-key: ${{ secrets.VBR_AWS_BUILD_USER_ACCESS_KEY_ID }} | ||
secret-key: ${{ secrets.VBR_AWS_BUILD_USER_SECRET_ACCESS_KEY }} | ||
region: eu-west-1 | ||
interval: 2 | ||
|
||
- name: output CD services | ||
shell: bash | ||
run: | | ||
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_lambda_to_newproduction: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ deploy_to_newproduction, release ] | ||
name: Deploy lambda to new production | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: CD Lambda(s) Configure credentials | ||
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: Prepare Lambda(s) | ||
shell: bash | ||
run: | | ||
echo aws s3 cp s3://077849980894-vbr-prd-lam-sr-sqsbackoffice/$VERSION/lambda.zip s3://077849980894-vbr-prd-lam-sr-sqsbackoffice/lambda.zip --copy-props none | ||
aws s3 cp s3://077849980894-vbr-prd-lam-sr-sqsbackoffice/$VERSION/lambda.zip s3://077849980894-vbr-prd-lam-sr-sqsbackoffice/lambda.zip --copy-props none | ||
env: | ||
VERSION: ${{ needs.release.outputs.version }} | ||
|
||
- name: Promote Lambda(s) | ||
shell: bash | ||
run: | | ||
echo pulling awscurl docker image | ||
docker pull ghcr.io/okigan/awscurl:latest | ||
echo docker run --rm okigan/awscurl --access_key $ACCESS_KEY_ID --secret_key $SECRET_ACCESS_KEY_ID --region $REGION -X POST -d '{ "functionName": "sr-sqsbackofficefunction", "project": "basisregisters", "domain": "basisregisters" }' $PROMOTEURL/acc | ||
docker run --rm okigan/awscurl --access_key $ACCESS_KEY_ID --secret_key $SECRET_ACCESS_KEY_ID --region $REGION -X POST -d '{ "functionName": "sr-sqsbackofficefunction", "project": "basisregisters", "domain": "basisregisters" }' $PROMOTEURL/acc | ||
env: | ||
ACCESS_KEY_ID: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_TST }} | ||
SECRET_ACCESS_KEY_ID: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_TST }} | ||
REGION: ${{ secrets.VBR_AWS_REGION_PRD }} | ||
PROMOTEURL: ${{ secrets.VBR_AWS_PROMOTE_LAMBDA_BASEURL }} | ||
|
||
deploy_to_newproduction_finish_slack: | ||
if: github.repository_owner == 'Informatievlaanderen' | ||
needs: [ deploy_lambda_to_newproduction ] | ||
name: Deploy to new 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 streetname-registry to new production has finished | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | ||
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} | ||
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} |