Skip to content

Commit f49d1f5

Browse files
authored
ci: debug the aws lambda publishing (#745)
1 parent 466d3e9 commit f49d1f5

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

.ci/publish-aws.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,28 @@ zip_file="./dist/${VERSION}-${GOOS}-${GOARCH}.zip"
4545

4646
for region in $ALL_AWS_REGIONS; do
4747
echo "Publish ${FULL_LAYER_NAME} in ${region}"
48-
publish_output=$(aws lambda \
48+
aws lambda \
4949
--output json \
5050
publish-layer-version \
5151
--region="${region}" \
5252
--layer-name="${FULL_LAYER_NAME}" \
5353
--compatible-architectures="${ARCHITECTURE}" \
5454
--description="AWS Lambda Extension Layer for Elastic APM ${ARCHITECTURE}" \
5555
--license="Apache-2.0" \
56-
--zip-file="fileb://${zip_file}")
57-
echo "${publish_output}" > "${AWS_FOLDER}/${region}"
56+
--zip-file="fileb://${zip_file}" > "${AWS_FOLDER}/${region}"
57+
publish_output=$(cat "${AWS_FOLDER}/${region}")
5858
layer_version=$(echo "${publish_output}" | jq '.Version')
59+
5960
echo "Grant public layer access ${FULL_LAYER_NAME}:${layer_version} in ${region}"
60-
grant_access_output=$(aws lambda \
61+
aws lambda \
6162
--output json \
6263
add-layer-version-permission \
6364
--region="${region}" \
6465
--layer-name="${FULL_LAYER_NAME}" \
6566
--action="lambda:GetLayerVersion" \
6667
--principal='*' \
6768
--statement-id="${FULL_LAYER_NAME}" \
68-
--version-number="${layer_version}")
69-
echo "${grant_access_output}" > "${AWS_FOLDER}/.${region}-public"
69+
--version-number="${layer_version}" > "${AWS_FOLDER}/.${region}-public"
7070
done
7171

7272
sh -c "./.ci/create-arn-table.sh"

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ jobs:
6060
path: "dist/*.*"
6161
retention-days: 5
6262

63+
# Store artifacts to help with troubleshooting
64+
- uses: actions/upload-artifact@v6
65+
if: always()
66+
with:
67+
name: aws
68+
path: ".aws*/**/*"
69+
retention-days: 5
70+
6371
- name: generate build provenance (binaries)
6472
uses: actions/attest-build-provenance@v3
6573
with:

0 commit comments

Comments
 (0)