File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 runs-on : ${{ format('codebuild-java-cdk-serverless-clamscan-stage-us-east-runner-{0}-{1}', github.run_id, github.run_attempt) }}
2727 environment : stage-us-east
2828 outputs :
29- resolved_image_uri : ${{ steps.capture-image .outputs.resolved_image_uri }}
29+ resolved_image_uri : ${{ steps.capture_image .outputs.resolved_image_uri }}
3030
3131 steps :
3232 - name : Checkout Code
@@ -118,7 +118,7 @@ jobs:
118118 mvn --batch-mode --no-transfer-progress exec:java
119119
120120 - name : Capture Tested Image Manifest For Promotion
121- id : capture-image
121+ id : capture_image
122122 working-directory : ./cdk
123123 run : |
124124 FUNCTION_NAME=$(aws cloudformation describe-stacks \
@@ -212,6 +212,11 @@ jobs:
212212 - name : Promote Tested Image Into Production ECR
213213 run : |
214214 SOURCE_IMAGE_URI="${{ needs.deploy-stage.outputs.resolved_image_uri }}"
215+ if [ -z "$SOURCE_IMAGE_URI" ]; then
216+ echo "Stage job did not provide a resolved image URI for promotion." >&2
217+ exit 1
218+ fi
219+
215220 SOURCE_REGISTRY="${SOURCE_IMAGE_URI%%/*}"
216221 TARGET_REPOSITORY_NAME="cdk-hnb659fds-container-assets-${AWS_ACCOUNT_ID}-${{ vars.AWS_REGION || 'us-east-1' }}"
217222 PROMOTED_IMAGE_TAG="promoted-${GITHUB_SHA}"
You can’t perform that action at this time.
0 commit comments