Skip to content

Merge pull request #52 from dfds/feature/2596-bug-confluent-gateway-c… #7

Merge pull request #52 from dfds/feature/2596-bug-confluent-gateway-c…

Merge pull request #52 from dfds/feature/2596-bug-confluent-gateway-c… #7

name: Dev environment - Develop
on:
push:
branches:
- 'develop'
- 'chore/dev-env-pipeline'
paths:
- '.github/workflows/shared-env-development.yml'
- 'src/**'
workflow_dispatch:
inputs:
deploy:
default: false
required: false
type: boolean
description: "Trigger build"
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
concurrency:
group: 'confluent-gateway_dev_environment_develop'
cancel-in-progress: true
jobs:
deploy:
name: '01 - Linux'
runs-on: [ubuntu-22.04]
strategy:
matrix:
arch: ['x86_64']
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
path: 'src'
- uses: actions/checkout@v3
with:
repository: 'dfds/ssu-apps'
path: 'ssu-apps'
token: ${{ secrets.SSU_APPS_GH_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: ./ssu-apps/.github/actions/build_push_container_ecr
name: Build & push container
id: build_push_container
with:
context_path: ./src
tag: develop
repo: 579478677147.dkr.ecr.eu-central-1.amazonaws.com/selfservice/confluent-gateway
role_arn: ${{ secrets.SSU_APPS_GH_IAM_ROLE }}
aws_region: eu-central-1
sha_tag_prefix: develop
- uses: ./ssu-apps/.github/actions/build_push_container_ecr
name: Build & push container
id: build_push_container_db_migration
with:
context_path: ./src/db
tag: develop
repo: 579478677147.dkr.ecr.eu-central-1.amazonaws.com/selfservice/confluent-gateway/dbmigrations
role_arn: ${{ secrets.GH_IAM_ROLE }}
aws_region: eu-central-1
sha_tag_prefix: develop
- shell: bash
name: "Update image tag"
env:
IMAGE_TAG: develop-${{ steps.build_push_container.outputs.sha }}
IMAGE_TAG_DB_MIGRATION: develop-${{ steps.build_push_container_db_migration.outputs.sha }}
run: |
wget https://github.com/mikefarah/yq/releases/download/v4.35.1/yq_linux_amd64 -O /tmp/yq
chmod +x /tmp/yq
cd ssu-apps/apps/ssu
/tmp/yq -i '.spec.values.image.tag = strenv(IMAGE_TAG)' confluent-gateway.yaml
/tmp/yq -i '.spec.values.dbMigration.image.tag = strenv(IMAGE_TAG_DB_MIGRATION)' confluent-gateway.yaml
git pull
git config user.name "ssu-apps SA"
git config user.email ssu-apps@dfds.cloud
git add confluent-gateway.yaml
git commit -m "Updated confluent-gateway image tag to develop-${{ steps.build_push_container.outputs.sha }}"
git push