Skip to content

Commit

Permalink
ci: push only to devops
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD authored May 31, 2024
1 parent f9dd62f commit f37090b
Showing 1 changed file with 3 additions and 75 deletions.
78 changes: 3 additions & 75 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ jobs:
if: needs.release.outputs.version != 'none'
uses: aws-actions/amazon-ecr-login@v2

- name: Push TicketingService to ECR
- name: Push TicketingService to ECR Devops
if: needs.release.outputs.version != 'none'
shell: bash
run: |
Expand All @@ -359,7 +359,7 @@ jobs:
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

- name: Push TicketingService.Monitoring to ECR
- name: Push TicketingService.Monitoring to ECR Devops
if: needs.release.outputs.version != 'none'
shell: bash
run: |
Expand All @@ -370,78 +370,6 @@ jobs:
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

- name: Configure AWS credentials (Staging)
if: needs.release.outputs.version != 'none'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.VBR_AWS_REGION }}

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

- name: Push TicketingService to Staging
if: needs.release.outputs.version != 'none'
shell: bash
run: |
docker tag $BUILD_DOCKER_REGISTRY_TST/ticketing-service/ticketing:$SEMVER $BUILD_DOCKER_REGISTRY/ticketing-service/ticketing:$SEMVER
docker push $BUILD_DOCKER_REGISTRY/ticketing-service/ticketing:$SEMVER
env:
BUILD_DOCKER_REGISTRY_TST: ${{ secrets.VBR_DEVOPS_DOCKER_REGISTRY }}
BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

- name: Push TicketingService.Monitoring to Staging
if: needs.release.outputs.version != 'none'
shell: bash
run: |
docker tag $BUILD_DOCKER_REGISTRY_TST/ticketing-service/ticketing-monitoring:$SEMVER $BUILD_DOCKER_REGISTRY/ticketing-service/ticketing-monitoring:$SEMVER
docker push $BUILD_DOCKER_REGISTRY/ticketing-service/ticketing-monitoring:$SEMVER
env:
BUILD_DOCKER_REGISTRY_TST: ${{ secrets.VBR_DEVOPS_DOCKER_REGISTRY }}
BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

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

- name: Push TicketingService to New Production
if: needs.release.outputs.version != 'none'
shell: bash
run: |
docker tag $BUILD_DOCKER_REGISTRY_TST/ticketing-service/ticketing:$SEMVER $BUILD_DOCKER_REGISTRY_NEWPRD/ticketing-service/ticketing:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_NEWPRD/ticketing-service/ticketing:$SEMVER
env:
BUILD_DOCKER_REGISTRY_TST: ${{ secrets.VBR_DEVOPS_DOCKER_REGISTRY }}
BUILD_DOCKER_REGISTRY_NEWPRD: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_NEWPRD }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

- name: Push TicketingServiceMonitoring to New Production
if: needs.release.outputs.version != 'none'
shell: bash
run: |
docker tag $BUILD_DOCKER_REGISTRY_TST/ticketing-service/ticketing-monitoring:$SEMVER $BUILD_DOCKER_REGISTRY_NEWPRD/ticketing-service/ticketing-monitoring:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_NEWPRD/ticketing-service/ticketing-monitoring:$SEMVER
env:
BUILD_DOCKER_REGISTRY_TST: ${{ secrets.VBR_DEVOPS_DOCKER_REGISTRY }}
BUILD_DOCKER_REGISTRY_NEWPRD: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_NEWPRD }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

publish_to_atlassian:
needs: [ release ]
if: ${{ (github.repository_owner == 'Informatievlaanderen') && (needs.release.outputs.version != 'none') }}
Expand Down Expand Up @@ -490,4 +418,4 @@ jobs:
env:
CONFLUENCE_TITLE: ${{ env.REPOSITORY_NAME }}
CONFLUENCE_USERNAME: ${{ secrets.VBR_CONFLUENCE_USER }}
CONFLUENCE_PASSWORD: ${{ secrets.VBR_CONFLUENCE_PASSWORD }}
CONFLUENCE_PASSWORD: ${{ secrets.VBR_CONFLUENCE_PASSWORD }}

0 comments on commit f37090b

Please sign in to comment.