Skip to content

Commit 883bd33

Browse files
committedJun 17, 2025
No more subscript.
1 parent 5b8d616 commit 883bd33

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed
 

‎ci/input_files/build.yaml.tpl

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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,17 @@ 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 }}
192189

193190

194191
{{- end }}

0 commit comments

Comments
 (0)