diff --git a/.github/workflows/deploy_newprd.yml b/.github/workflows/deploy_newprd.yml index 04a5d9d7a..4daaf387b 100644 --- a/.github/workflows/deploy_newprd.yml +++ b/.github/workflows/deploy_newprd.yml @@ -1,4 +1,4 @@ -name: Manual New Production Deploy +name: Manual Production Deploy on: workflow_dispatch: @@ -7,13 +7,13 @@ on: description: 'Version' required: true -concurrency: Manual New Production Deploy +concurrency: Manual Production Deploy jobs: deploy_to_production_start_slack: if: github.repository_owner == 'Informatievlaanderen' - name: Deploy to new production started - environment: newprd + name: Deploy to production started + environment: prd runs-on: ubuntu-latest steps: @@ -25,7 +25,7 @@ jobs: uses: slackapi/slack-github-action@v1.23.0 with: channel-id: '#team-dinosaur-dev' - slack-message: Deployment of streetname-registry to new production has started + slack-message: Deployment of streetname-registry to production has started env: SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} @@ -34,7 +34,7 @@ jobs: deploy_to_production: if: github.repository_owner == 'Informatievlaanderen' needs: [ deploy_to_production_start_slack ] - name: Deploy to New Production + name: Deploy to Production runs-on: ubuntu-latest strategy: matrix: @@ -111,7 +111,7 @@ jobs: deploy_to_production_finish_slack: if: github.repository_owner == 'Informatievlaanderen' needs: [ deploy_lambda_to_production ] - name: Deploy to new production finished + name: Deploy to production finished runs-on: ubuntu-latest steps: @@ -123,7 +123,7 @@ jobs: uses: slackapi/slack-github-action@v1.23.0 with: channel-id: '#team-dinosaur-dev' - slack-message: Deployment of streetname-registry to new production has finished + slack-message: Deployment of streetname-registry to production has finished env: SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }} SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} diff --git a/.github/workflows/deploy_prd.yml b/.github/workflows/deploy_prd.yml deleted file mode 100644 index 4f3ceac8d..000000000 --- a/.github/workflows/deploy_prd.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Manual Production Deploy - -on: - workflow_dispatch: - inputs: - version: - description: 'Version' - required: true - -jobs: - deploy_to_production_start_slack: - if: github.repository_owner == 'Informatievlaanderen' - name: Deploy to production started - environment: prd - 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/slack-github-action@v1.23.0 - with: - channel-id: '#team-dinosaur-dev' - slack-message: Deployment of streetname-registry to 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_production: - if: github.repository_owner == 'Informatievlaanderen' - needs: [ deploy_to_production_start_slack ] - name: Deploy to Production - runs-on: ubuntu-latest - strategy: - matrix: - services: ['streetname-registry-api', 'streetname-registry-import-api', 'streetname-registry-projections'] - - 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: prd - version: ${{ github.event.inputs.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_production: - if: github.repository_owner == 'Informatievlaanderen' - needs: [deploy_to_production] - name: Deploy lambda to 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_PRD }} - aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_PRD }} - aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} - - - name: Prepare Lambda(s) - shell: bash - run: | - echo aws s3 cp s3://s3-vbr-prd-basisregisters-lam-sr-sqsbackofficehandlerfunction/$VERSION/lambda.zip s3://s3-vbr-prd-basisregisters-lam-sr-sqsbackofficehandlerfunction/lambda.zip --copy-props none - aws s3 cp s3://s3-vbr-prd-basisregisters-lam-sr-sqsbackofficehandlerfunction/$VERSION/lambda.zip s3://s3-vbr-prd-basisregisters-lam-sr-sqsbackofficehandlerfunction/lambda.zip --copy-props none - env: - VERSION: ${{ github.event.inputs.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-sqsbackofficehandlerfunction", "project": "basisregisters", "domain": "basisregisters" }' $PROMOTEURL/prd - docker run --rm okigan/awscurl --access_key $ACCESS_KEY_ID --secret_key $SECRET_ACCESS_KEY_ID --region $REGION -X POST -d '{ "functionName": "sr-sqsbackofficehandlerfunction", "project": "basisregisters", "domain": "basisregisters" }' $PROMOTEURL/prd - 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_production_finish_slack: - if: github.repository_owner == 'Informatievlaanderen' - needs: [ deploy_lambda_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/slack-github-action@v1.23.0 - with: - channel-id: '#team-dinosaur-dev' - slack-message: Deployment of streetname-registry 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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80bdf1cc5..d977f7af1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,21 +98,6 @@ jobs: semver: ${{ needs.set-release-version.outputs.version }} secrets: inherit - build-api-crab-import: - name: Build Api CrabImport - uses: Informatievlaanderen/build-pipeline/.github/workflows/build-image.yml@main - needs: [ set-release-version ] - if: ${{ (github.repository_owner == 'Informatievlaanderen') && (needs.set-release-version.outputs.version != 'none') }} - with: - registry: streetname-registry - build-target: Containerize_ApiCrabImport - image-file: sr-api-crab-import-image.tar - image-name: api-crab-import - test-project: StreetNameRegistry.Tests - build-project: StreetNameRegistry.Api.CrabImport - semver: ${{ needs.set-release-version.outputs.version }} - secrets: inherit - build-api-extract: name: Build Api Extract uses: Informatievlaanderen/build-pipeline/.github/workflows/build-image.yml@main @@ -323,18 +308,6 @@ jobs: semver: ${{ needs.set-release-version.outputs.version }} secrets: inherit - pack-api-crab-import: - name: Pack Api CrabImport - uses: Informatievlaanderen/build-pipeline/.github/workflows/pack.yml@main - needs: [ set-release-version ] - if: ${{ (github.repository_owner == 'Informatievlaanderen') && (needs.set-release-version.outputs.version != 'none') }} - with: - pack-file: Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.CrabImport - test-project: StreetNameRegistry.Tests - build-project: StreetNameRegistry.Api.CrabImport - semver: ${{ needs.set-release-version.outputs.version }} - secrets: inherit - build-lambda-backoffice: name: Build Lambda uses: Informatievlaanderen/build-pipeline/.github/workflows/build-lambda.yml@main @@ -357,12 +330,10 @@ jobs: , pack-api-legacy , pack-api-oslo , pack-api-extract - , pack-api-crab-import , build-api-backoffice , build-api-legacy , build-api-oslo , build-api-extract - , build-api-crab-import , build-projector , build-projections-backoffice , build-projections-syndication @@ -460,13 +431,6 @@ jobs: name: nuget-Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.Extract-${{ needs.set-release-version.outputs.version }} path: dist/nuget/ - - name: Download NuGet Api CrabImport - uses: actions/download-artifact@v3 - continue-on-error: false - with: - name: nuget-Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.CrabImport-${{ needs.set-release-version.outputs.version }} - path: dist/nuget/ - - name: Run Semantic Release shell: bash run: npx semantic-release @@ -628,12 +592,6 @@ jobs: name: nuget-Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.Extract-${{ needs.release.outputs.version }} path: ~/ - - name: Download NuGet package api-crab-import - uses: actions/download-artifact@v3 - with: - name: nuget-Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.CrabImport-${{ needs.release.outputs.version }} - path: ~/ - - name: Publish packages to NuGet shell: bash run: | @@ -642,7 +600,6 @@ jobs: dotnet nuget push ~/Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.Legacy.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY dotnet nuget push ~/Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.Oslo.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY dotnet nuget push ~/Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.Extract.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY - dotnet nuget push ~/Be.Vlaanderen.Basisregisters.StreetNameRegistry.Api.CrabImport.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY env: SEMVER: ${{ needs.release.outputs.version }} WORKSPACE: ${{ github.workspace }} @@ -720,7 +677,6 @@ jobs: 'api-backoffice' , 'api-legacy' , 'api-oslo' - , 'api-crab-import' , 'api-extract' , 'projector' , 'projections-syndication' @@ -781,7 +737,6 @@ jobs: 'api-backoffice' , 'api-legacy' , 'api-oslo' - , 'api-crab-import' , 'api-extract' , 'projector' , 'projections-syndication' @@ -844,7 +799,6 @@ jobs: 'api-backoffice' , 'api-legacy' , 'api-oslo' - , 'api-crab-import' , 'api-extract' , 'projector' , 'projections-syndication' @@ -907,7 +861,6 @@ jobs: 'api-backoffice' , 'api-legacy' , 'api-oslo' - , 'api-crab-import' , 'api-extract' , 'projector' , 'projections-syndication' @@ -989,7 +942,6 @@ jobs: matrix: services: [ 'streetname-registry-api' - , 'streetname-registry-import-api' , 'streetname-registry-projections' , 'streetname-registry-producer' , 'streetname-registry-producer-snapshot-oslo'