File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -175,19 +175,7 @@ publish-layer-{{ $environment_name }} ({{ $runtime.name }}-{{ $runtime.arch }}):
175175 before_script:
176176 - EXTERNAL_ID_NAME= {{ $environment .external_id }} ROLE_TO_ASSUME= {{ $environment .role_to_assume }} AWS_ACCOUNT= {{ $environment .account }} source . /ci/get_secrets.sh
177177 script:
178- - |
179- STAGE= {{ $environment_name }} PYTHON_VERSION= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} . /ci/publish_layers.sh | tee publish.log
180- # Extract the arn from the publish log to be used as envvar in e2e tests
181- layer_arn= " $(grep 'Published arn' publish.log | grep -oE 'arn:aws:lambda:.*')"
182- if [ -z " $layer_arn" ]; then
183- echo " Error: Layer ARN not found in publish log"
184- exit 1
185- else
186- echo " Found layer arn, $layer_arn"
187- fi
188- echo " PYTHON_{{ $runtime.name | strings.Trim " python" }}_VERSION=$layer_arn" > {{ $dotenv }}
189- cat {{ $dotenv }}
190-
178+ - STAGE= {{ $environment_name }} PYTHON_VERSION= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} DOTENV= {{ $dotenv }} . /ci/publish_layers.sh
191179
192180{{- end }}
193181
Original file line number Diff line number Diff line change @@ -211,4 +211,10 @@ while [ $latest_version -lt $VERSION ]; do
211211 fi
212212done
213213
214+ if [ -n " $DOTENV " ]; then
215+ printf " [$REGION ] Exporting layer version to $DOTENV file...\n"
216+ echo " PYTHON_${PYTHON_VERSION/ ./ } _VERSION=$latest_arn " >> " $DOTENV "
217+ cat " $DOTENV "
218+ fi
219+
214220printf " [$REGION ] Finished publishing layers...\n\n"
You can’t perform that action at this time.
0 commit comments