Skip to content

Hotfix

Hotfix #5

Workflow file for this run

name: Hotfix
on:
workflow_dispatch:
inputs:
version:
description: 'Version (format: x.xxx.x, ie: 1.221.1)'
required: true
concurrency: CI
jobs:
set-release-version:
if: github.repository_owner == 'Informatievlaanderen'
name: Decide next version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Set Release Version
id: set-version
run: |
echo ${{ github.event.inputs.version }} > semver
echo $(cat semver)
echo ::set-output name=version::$(cat semver)
echo RELEASE_VERSION=$(cat semver) >> $GITHUB_ENV
shell: bash
build-acm-api:
name: Build ACM Api
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-acm-api-image.tar
image-name: verenigingsregister-acmapi
test-project: AssociationRegistry.Test.Acm.Api
build-project: AssociationRegistry.Acm.Api/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: true
run-docker-wiremock: false
run-docker-db: true
run-docker-elasticsearch: false
run-docker-localstack: false
run-docker-otelcollector: false
pre-gen-marten: true
secrets: inherit
build-public-api:
name: Build Public Api
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-public-api-image.tar
image-name: verenigingsregister-publicapi
test-project: AssociationRegistry.Test.Public.Api
build-project: AssociationRegistry.Public.Api/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: false
run-docker-wiremock: false
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: true
run-docker-otelcollector: true
pre-gen-marten: false
secrets: inherit
build-public-projections:
name: Build Public Projections
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-public-projections-image.tar
image-name: verenigingsregister-publicprojections
build-project: AssociationRegistry.Public.ProjectionHost/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: false
run-docker-wiremock: false
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: false
run-docker-otelcollector: true
pre-gen-marten: true
secrets: inherit
build-admin-api:
name: Build Admin Api
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-admin-api-image.tar
image-name: verenigingsregister-adminapi
test-project: AssociationRegistry.Test.Admin.Api
build-project: AssociationRegistry.Admin.Api/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: true
run-docker-wiremock: true
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: true
run-docker-otelcollector: true
pre-gen-marten: true
secrets: inherit
build-admin-projections:
name: Build Admin Projections
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-admin-projections-image.tar
image-name: verenigingsregister-adminprojections
build-project: AssociationRegistry.Admin.ProjectionHost/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: true
run-docker-wiremock: true
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: true
run-docker-otelcollector: true
pre-gen-marten: true
secrets: inherit
push_images_to_ik4_devops:
if: needs.set-release-version.outputs.version != 'none'
needs: [
set-release-version,
build-acm-api,
build-public-api,
build-public-projections,
build-admin-api,
build-admin-projections
]
name: Push images IK4 (DevOps)
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials (Test)
if: needs.set-release-version.outputs.version != 'none'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.VBR_AWS_BUILD_USER_ACCESS_KEY_ID_IK4 }}
aws-secret-access-key: ${{ secrets.VBR_AWS_BUILD_USER_SECRET_ACCESS_KEY_IK4 }}
aws-region: ${{ secrets.VBR_AWS_REGION_PRD }}
- name: Login to Amazon ECR (Test)
if: needs.set-release-version.outputs.version != 'none'
uses: aws-actions/amazon-ecr-login@v2.0.1
- name: Download Acm Api artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-acmapi
path: ~/
- name: Load Acm Api image
shell: bash
run: docker image load -i ~/ar-acm-api-image.tar
- name: Download Public Api artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-publicapi
path: ~/
- name: Load Public Api image
shell: bash
run: docker image load -i ~/ar-public-api-image.tar
- name: Download Public Projections artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-publicprojections
path: ~/
- name: Load Public Projections image
shell: bash
run: docker image load -i ~/ar-public-projections-image.tar
- name: Download Admin Api artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-adminapi
path: ~/
- name: Load Admin Api image
shell: bash
run: docker image load -i ~/ar-admin-api-image.tar
- name: Download Admin Projections artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-adminprojections
path: ~/
- name: Load Admin Projections image
shell: bash
run: docker image load -i ~/ar-admin-projections-image.tar
- name: Push docker images to ECR Test
if: needs.set-release-version.outputs.version != 'none'
shell: bash
run: |
echo $SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-acmapi:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-adminapi:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-adminprojections:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-publicapi:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-publicprojections:$SEMVER
env:
BUILD_DOCKER_REGISTRY_IK4: ${{ secrets.BUILD_DOCKER_REGISTRY_IK4 }}
SEMVER: ${{ needs.set-release-version.outputs.version }}
WORKSPACE: ${{ github.workspace }}