Skip to content

Commit

Permalink
chore: process queue verbosity (#653)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fibble authored Feb 19, 2025
1 parent 3b7c344 commit a679a03
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/run-liquibase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
3 changes: 2 additions & 1 deletion infra/terraform/modules/service/batch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a679a03

Please sign in to comment.