Skip to content

Commit

Permalink
fix: push ecr devops images
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lesage authored and janlesage committed Apr 3, 2024
1 parent fa388f2 commit a9735bf
Showing 1 changed file with 49 additions and 6 deletions.
55 changes: 49 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ jobs:
echo ${{ steps.set-version.outputs.version }}
echo 'END VERSION'
publish_to_atlassian:
if: needs.release.outputs.version != 'none'
needs: [ release ]
Expand Down Expand Up @@ -598,17 +595,17 @@ jobs:

- name: Configure AWS credentials (Production)
if: needs.release.outputs.version != 'none'
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4.0.2
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: Login to Amazon ECR (Production)
if: needs.release.outputs.version != 'none'
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2

- name: Push to Production
- name: Push to ECR (Production)
if: needs.release.outputs.version != 'none'
shell: bash
run: |
Expand Down Expand Up @@ -641,6 +638,51 @@ jobs:
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

- name: Configure AWS credentials (DevOps)
if: needs.release.outputs.version != 'none'
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }}
aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }}
aws-region: ${{ secrets.VBR_AWS_REGION_PRD }}

- name: Login to Amazon ECR (DevOps)
if: needs.release.outputs.version != 'none'
uses: aws-actions/amazon-ecr-login@v2

- name: Push to ECR (DevOps)
if: needs.release.outputs.version != 'none'
shell: bash
run: |
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/api:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/api:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/api:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/batch-agentschapzorgengezondheidftpdump:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/batch-agentschapzorgengezondheidftpdump:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/batch-agentschapzorgengezondheidftpdump:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/batch-vlaanderenbe:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/batch-vlaanderenbe:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/batch-vlaanderenbe:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/projections-elasticsearch:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/projections-elasticsearch:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/projections-elasticsearch:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/projections-delegations:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/projections-delegations:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/projections-delegations:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/projections-reporting:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/projections-reporting:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/projections-reporting:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/kbo-mutations:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/kbo-mutations:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/kbo-mutations:$SEMVER
docker tag $BUILD_DOCKER_REGISTRY/organisation-registry/ui:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/ui:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_PRD/organisation-registry/ui:$SEMVER
env:
BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY }}
BUILD_DOCKER_REGISTRY_PRD: ${{ secrets.VBR_DEVOPS_DOCKER_REGISTRY }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

deploy_staging:
needs:
- release
Expand Down Expand Up @@ -688,6 +730,7 @@ jobs:
echo ${{ steps.awscurl-polling-action.outputs.final-message }}
# - name: Publish to NuGet
# shell: bash
# run: |
Expand Down

0 comments on commit a9735bf

Please sign in to comment.