@@ -33,18 +33,6 @@ default:
33
33
- apt-get install nodejs -y
34
34
- npm install --global yarn
35
35
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
-
48
36
{ { range $runtime := (ds " runtimes" ).runtimes } }
49
37
50
38
# TODO(astuyve) - figure out python build cache
@@ -187,8 +175,17 @@ publish-layer-{{ $environment_name }} ({{ $runtime.name }}-{{ $runtime.arch }}):
187
175
before_script:
188
176
- EXTERNAL_ID_NAME={ { $environment .external_id } } ROLE_TO_ASSUME={ { $environment .role_to_assume } } AWS_ACCOUNT={ { $environment .account } } source ./ci/get_secrets.sh
189
177
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 } }
192
189
193
190
194
191
{ {- end } }
0 commit comments