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 }}):
175
175
before_script:
176
176
- EXTERNAL_ID_NAME={ { $environment .external_id } } ROLE_TO_ASSUME={ { $environment .role_to_assume } } AWS_ACCOUNT={ { $environment .account } } source ./ci/get_secrets.sh
177
177
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
191
179
192
180
{ {- end } }
193
181
Original file line number Diff line number Diff line change @@ -211,4 +211,10 @@ while [ $latest_version -lt $VERSION ]; do
211
211
fi
212
212
done
213
213
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
+
214
220
printf " [$REGION ] Finished publishing layers...\n\n"
You can’t perform that action at this time.
0 commit comments