From a679a03225420cbe9e24b5129ca2246a2fd9d2cd Mon Sep 17 00:00:00 2001 From: Andrew Newton Date: Wed, 19 Feb 2025 14:55:40 +0000 Subject: [PATCH] chore: process queue verbosity (#653) * feat: create etl tag for release automatically when not dealing with main etl_ref * chore: enable verbose laminas cli output while batch testing etc continues --- .github/workflows/run-liquibase.yaml | 24 +++++++++++++++++++----- infra/terraform/modules/service/batch.tf | 3 ++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-liquibase.yaml b/.github/workflows/run-liquibase.yaml index c8376dfd73..a38f6d0fe5 100644 --- a/.github/workflows/run-liquibase.yaml +++ b/.github/workflows/run-liquibase.yaml @@ -87,7 +87,7 @@ jobs: build: environment: ${{ inputs.environment }} outputs: - image_tag: ${{ steps.build-details.outputs.image_tag }} + image_tag: ${{ steps.etl-sha.outputs.image_tag }} etl_sha: ${{ steps.etl-sha.outputs.sha }} etl_ref: ${{ inputs.etl_ref }} runs-on: ubuntu-24.04-arm @@ -113,6 +113,24 @@ jobs: ref: ${{ inputs.etl_ref }} token: ${{ steps.generate-token.outputs.token }} + - name: Check ETL tag existence + if: inputs.etl_ref != 'main' + id: check-tag + run: | + TAG_EXISTS=$(gh api repos/dvsa/olcs-etl/git/refs/tags/${{ inputs.etl_ref }} --silent && echo 'true' || echo 'false') + echo "exists=$TAG_EXISTS" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + + - name: Create ETL tag + if: inputs.etl_ref != 'main' && steps.check-tag.outputs.exists != 'true' + run: | + cd infra/docker/liquibase/changelog + git tag ${{ inputs.etl_ref }} + git push origin ${{ inputs.etl_ref }} + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -158,10 +176,6 @@ jobs: cache-from: type=gha,scope=liquibase cache-to: type=gha,mode=max,scope=liquibase - - name: Set build details - id: build-details - run: echo "image_tag=${{ steps.etl-sha.outputs.image_tag }}" >> $GITHUB_OUTPUT - submit-batch-job: outputs: job_id: ${{ steps.submit-job.outputs.job_id }} diff --git a/infra/terraform/modules/service/batch.tf b/infra/terraform/modules/service/batch.tf index 732c7b576b..413e2d81d3 100644 --- a/infra/terraform/modules/service/batch.tf +++ b/infra/terraform/modules/service/batch.tf @@ -107,7 +107,8 @@ locals { command = (job.type == "default" ? concat([ "/var/www/html/vendor/bin/laminas", - "--container=/var/www/html/config/container-cli.php" + "--container=/var/www/html/config/container-cli.php", + "-v" ], job.commands) : job.commands) image = lookup(local.job_types, job.type, local.job_types.default).image