Jason Mogavero
03/21/2024, 10:47 PMpre_workflow_hooks:
- run: python3 deploy.py 2>&1 | tee /opt/atlantis/packer.log
description: Run packer deployment script before running terraform/terragrunt
shell: bash
shellArgs: -cv
output: show
commands: plan
The python script underneath is executing packer with subprocess.run and catching the output. It's wrapped in a try/except block, and if it catches a CalledProcessError I exit with a status code of 1.
My understanding is this should cause the check for the step in GitHub to fail, but it still passes. Any ideas how I might fail the check when the script catches an error?PePe Amengual
03/22/2024, 3:34 AMPePe Amengual
03/22/2024, 3:35 AMSimon Heather
03/22/2024, 11:03 AMJason Mogavero
03/22/2024, 2:29 PM