File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ resources:
2222 type : key-value
2323 source :
2424 file : tag-output/tag
25+ - name : images-to-shared-ecr
26+ type : registry-image
27+ source :
28+ repository : keh-tech-audit-tool-api
29+ aws_role_arn : arn:aws:iam::((aws_account_sdp_((env)))):role/sdp-concourse-((env))
30+ aws_account_id : ((aws_account_ecr_shared_account))
31+ aws_region : eu-west-2
2532
2633# Define the common terraform task as an anchor
2734terraform-task : &terraform-task
@@ -128,6 +135,9 @@ jobs:
128135 inputs :
129136 - name : resource-repo
130137 - name : github-release-tag
138+ outputs :
139+ - name : built-images
140+ - name : release-tag-output
131141 params :
132142 aws_account_id : ((aws_account_sdp_((env))))
133143 aws_role_arn : arn:aws:iam::((aws_account_sdp_((env)))):role/sdp-concourse-((env))
@@ -151,6 +161,13 @@ jobs:
151161 source ./resource-repo/concourse/scripts/assume_role.sh
152162 ./resource-repo/concourse/scripts/build_image.sh
153163 timeout : 10m
164+ - put : images-to-shared-ecr
165+ inputs :
166+ - built-images
167+ - release-tag-output
168+ params :
169+ image : built-images/tech_audit_tool_api.tar
170+ additional_tags : release-tag-output/tag
154171 - << : *terraform-task
155172 params :
156173 secrets : ((sdp_((env))_secrets_tat_api))
Original file line number Diff line number Diff line change @@ -12,3 +12,6 @@ podman build -t ${container_image}:${tag} resource-repo/aws_lambda_script/
1212podman tag ${container_image} :${tag} ${aws_account_id} .dkr.ecr.eu-west-2.amazonaws.com/${container_image} :${tag}
1313
1414podman push ${aws_account_id} .dkr.ecr.eu-west-2.amazonaws.com/${container_image} :${tag}
15+
16+ echo " Saving image as tar for next task..."
17+ podman save --format=oci-dir " ${container_image} :${tag} " -o built-images/tech_audit_tool_api.tar
You can’t perform that action at this time.
0 commit comments