Skip to content

Commit

Permalink
fix: or-2282 revert commented workflow steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lesage committed Aug 5, 2024
1 parent dee3e5c commit d762356
Showing 1 changed file with 154 additions and 154 deletions.
308 changes: 154 additions & 154 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,118 +346,118 @@ jobs:
JIRA_PROJECT: OR
JIRA_VERSION: ${{ needs.release.outputs.version }}

# push_images_to_staging:
# if: needs.release.outputs.version != 'none'
# needs: [ release ]
# name: Push images to Staging
# runs-on: ubuntu-latest
# strategy:
# matrix:
# image: [
# 'api',
# 'batch-agentschapzorgengezondheidftpdump',
# 'batch-vlaanderenbe',
# 'projections-elasticsearch',
# 'projections-delegations',
# 'projections-reporting',
# 'kbo-mutations',
# 'ui'
# ]
# steps:
# - name: Configure AWS credentials (Staging)
# if: needs.release.outputs.version != 'none'
# uses: aws-actions/[email protected]
# 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
# uses: aws-actions/amazon-ecr-login@v2
#
# - name: Download artifact
# uses: actions/download-artifact@v4
# continue-on-error: false
# with:
# name: ${{ matrix.image }}
# path: ~/artifacts
#
# - name: Debug output
# shell: bash
# run: |
# ls -al
#
# - name: Load artifact
# shell: bash
# run: |
# docker image load -i ~/artifacts/$IMAGE.tar
# env:
# IMAGE: ${{ matrix.image }}
#
# - name: Push artifacts to ECR
# shell: bash
# run: |
# echo $IMAGE:$SEMVER
# docker push $BUILD_DOCKER_REGISTRY/organisation-registry/$IMAGE:$SEMVER
# env:
# BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY }}
# IMAGE: ${{ matrix.image }}
# SEMVER: ${{ needs.release.outputs.version }}
# WORKSPACE: ${{ github.workspace }}
#
# push_images_to_production:
# if: needs.release.outputs.version != 'none'
# needs: [ release ]
# name: Push images to Production
# runs-on: ubuntu-latest
# strategy:
# matrix:
# image: [
# 'api',
# 'batch-agentschapzorgengezondheidftpdump',
# 'batch-vlaanderenbe',
# 'projections-elasticsearch',
# 'projections-delegations',
# 'projections-reporting',
# 'kbo-mutations',
# 'ui'
# ]
# steps:
# - name: Configure AWS credentials (Production)
# if: needs.release.outputs.version != 'none'
# uses: aws-actions/[email protected]
# 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
# uses: aws-actions/amazon-ecr-login@v2
#
# - name: Download artifact
# uses: actions/download-artifact@v4
# continue-on-error: false
# with:
# name: ${{ matrix.image }}
# path: ~/artifacts
#
# - name: Load artifact
# shell: bash
# run: |
# docker image load -i ~/artifacts/$IMAGE.tar
# env:
# IMAGE: ${{ matrix.image }}
#
# - name: Push artifacts to ECR
# shell: bash
# run: |
# echo $IMAGE:$SEMVER
# docker push $BUILD_DOCKER_REGISTRY/organisation-registry/$IMAGE:$SEMVER
# env:
# BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_PRD }}
# IMAGE: ${{ matrix.image }}
# SEMVER: ${{ needs.release.outputs.version }}
# WORKSPACE: ${{ github.workspace }}
push_images_to_staging:
if: needs.release.outputs.version != 'none'
needs: [ release ]
name: Push images to Staging
runs-on: ubuntu-latest
strategy:
matrix:
image: [
'api',
'batch-agentschapzorgengezondheidftpdump',
'batch-vlaanderenbe',
'projections-elasticsearch',
'projections-delegations',
'projections-reporting',
'kbo-mutations',
'ui'
]
steps:
- name: Configure AWS credentials (Staging)
if: needs.release.outputs.version != 'none'
uses: aws-actions/[email protected]
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
uses: aws-actions/amazon-ecr-login@v2

- name: Download artifact
uses: actions/download-artifact@v4
continue-on-error: false
with:
name: ${{ matrix.image }}
path: ~/artifacts

- name: Debug output
shell: bash
run: |
ls -al
- name: Load artifact
shell: bash
run: |
docker image load -i ~/artifacts/$IMAGE.tar
env:
IMAGE: ${{ matrix.image }}

- name: Push artifacts to ECR
shell: bash
run: |
echo $IMAGE:$SEMVER
docker push $BUILD_DOCKER_REGISTRY/organisation-registry/$IMAGE:$SEMVER
env:
BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY }}
IMAGE: ${{ matrix.image }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

push_images_to_production:
if: needs.release.outputs.version != 'none'
needs: [ release ]
name: Push images to Production
runs-on: ubuntu-latest
strategy:
matrix:
image: [
'api',
'batch-agentschapzorgengezondheidftpdump',
'batch-vlaanderenbe',
'projections-elasticsearch',
'projections-delegations',
'projections-reporting',
'kbo-mutations',
'ui'
]
steps:
- name: Configure AWS credentials (Production)
if: needs.release.outputs.version != 'none'
uses: aws-actions/[email protected]
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
uses: aws-actions/amazon-ecr-login@v2

- name: Download artifact
uses: actions/download-artifact@v4
continue-on-error: false
with:
name: ${{ matrix.image }}
path: ~/artifacts

- name: Load artifact
shell: bash
run: |
docker image load -i ~/artifacts/$IMAGE.tar
env:
IMAGE: ${{ matrix.image }}

- name: Push artifacts to ECR
shell: bash
run: |
echo $IMAGE:$SEMVER
docker push $BUILD_DOCKER_REGISTRY/organisation-registry/$IMAGE:$SEMVER
env:
BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_PRD }}
IMAGE: ${{ matrix.image }}
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

push_images_to_devops:
if: needs.release.outputs.version != 'none'
Expand Down Expand Up @@ -512,48 +512,48 @@ jobs:
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}

# deploy_staging:
# if: needs.release.outputs.version != 'none'
# needs: [ release, push_images_to_staging ]
# name: Deploy to Staging
# runs-on: ubuntu-latest
# strategy:
# matrix:
# image: [
# 'organisation-registry-api',
# 'organisation-registry-delegations',
# 'organisation-registry-elasticsearch',
# 'organisation-registry-kbomutations',
# 'organisation-registry-reporting',
# 'organisation-registry-ui',
# 'organisation-registry-vlaanderenbe',
# 'organisation-registry-zorgengezondheid',
# 'organisation-registry-rebuilder'
# ]
# steps:
# - name: CD
# id: awscurl-polling-action
# 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: stg
# 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 }}
# interval: 2
# - name: output
# 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_staging:
if: needs.release.outputs.version != 'none'
needs: [ release, push_images_to_staging ]
name: Deploy to Staging
runs-on: ubuntu-latest
strategy:
matrix:
image: [
'organisation-registry-api',
'organisation-registry-delegations',
'organisation-registry-elasticsearch',
'organisation-registry-kbomutations',
'organisation-registry-reporting',
'organisation-registry-ui',
'organisation-registry-vlaanderenbe',
'organisation-registry-zorgengezondheid',
'organisation-registry-rebuilder'
]
steps:
- name: CD
id: awscurl-polling-action
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: stg
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 }}
interval: 2
- name: output
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_staging_new:
if: needs.release.outputs.version != 'none'
Expand Down

0 comments on commit d762356

Please sign in to comment.