@@ -33,18 +33,6 @@ default:
3333 - apt-get install nodejs -y
3434 - npm install --global yarn
3535
36- # Extract the arn from the publish log to be used as envvar in e2e tests
37- .extract-arn: &extract-arn
38- - |
39- layer_arn="$(grep 'Published arn' publish.log | grep -oE 'arn:aws:lambda:.*')"
40- if [ -z "$layer_arn" ]; then
41- echo "Error: Layer ARN not found in publish log"
42- exit 1
43- else
44- echo "Found layer arn, $layer_arn"
45- fi
46- echo "PYTHON_{ { $runtime .name | strings.Trim " python" } }_VERSION=$layer_arn" > { { $dotenv } }
47-
4836{ { range $runtime := (ds " runtimes" ).runtimes } }
4937
5038# TODO(astuyve) - figure out python build cache
@@ -187,8 +175,18 @@ publish-layer-{{ $environment_name }} ({{ $runtime.name }}-{{ $runtime.arch }}):
187175 before_script:
188176 - EXTERNAL_ID_NAME={ { $environment .external_id } } ROLE_TO_ASSUME={ { $environment .role_to_assume } } AWS_ACCOUNT={ { $environment .account } } source ./ci/get_secrets.sh
189177 script:
190- - STAGE={ { $environment_name } } PYTHON_VERSION={ { $runtime .python_version } } ARCH={ { $runtime .arch } } ./ci/publish_layers.sh | tee publish.log
191- - *extract-arn
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 } }
192190
193191
194192{ {- end } }
0 commit comments