Skip to content

Commit 69977e1

Browse files
ci(artifacts): Upload artifacts for all platforms (#4667)
Fixes: #687 --------- Co-authored-by: David Herberth <[email protected]>
1 parent 93801a1 commit 69977e1

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ jobs:
609609
strategy:
610610
matrix:
611611
image_name: ${{ fromJson(needs.build-setup.outputs.image_names) }}
612+
platform: ${{ fromJson(needs.build-setup.outputs.platforms) }}
612613

613614
# required for google auth
614615
permissions:
@@ -622,6 +623,8 @@ jobs:
622623
if: "!startsWith(github.ref, 'refs/heads/release-library/') && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && needs.build-setup.outputs.full_ci == 'true'"
623624

624625
steps:
626+
- uses: docker/setup-qemu-action@v3
627+
625628
- name: Google Auth
626629
id: auth
627630
uses: google-github-actions/auth@v2
@@ -641,14 +644,16 @@ jobs:
641644
version: ">= 390.0.0"
642645

643646
- name: Upload gocd deployment assets
647+
env:
648+
LIB_PATH: ${{ fromJson('{"linux/amd64":"/lib/x86_64-linux-gnu","linux/arm64":"/lib/aarch64-linux-gnu"}')[matrix.platform] }}
644649
run: |
645650
set -euxo pipefail
646651
VERSION="$(docker run --rm "${AR_DOCKER_IMAGE}:${REVISION}" --version | cut -d" " -f2)"
647652
echo "${{ matrix.image_name }}@${VERSION}+${REVISION}" > release-name
648653
649-
docker run --rm --entrypoint cat "${AR_DOCKER_IMAGE}:${REVISION}" /opt/relay-debug.zip > relay-debug.zip
650-
docker run --rm --entrypoint cat "${AR_DOCKER_IMAGE}:${REVISION}" /opt/relay.src.zip > relay.src.zip
651-
docker run --rm --entrypoint tar "${AR_DOCKER_IMAGE}:${REVISION}" -cf - /lib/x86_64-linux-gnu > libs.tar
654+
docker run --rm --platform ${{ matrix.platform }} --entrypoint cat "${AR_DOCKER_IMAGE}:${REVISION}" /opt/relay-debug.zip > relay-debug.zip
655+
docker run --rm --platform ${{ matrix.platform }} --entrypoint cat "${AR_DOCKER_IMAGE}:${REVISION}" /opt/relay.src.zip > relay.src.zip
656+
docker run --rm --platform ${{ matrix.platform }} --entrypoint tar "${AR_DOCKER_IMAGE}:${REVISION}" -cf - "${LIB_PATH}" > libs.tar
652657
653658
# debugging for mysterious "Couldn't write tracker file" issue:
654659
(env | grep runner) || true
@@ -660,7 +665,7 @@ jobs:
660665
/home/runner/.gsutil/tracker-files/upload_TRACKER_*.rc.zip__JSON.url \
661666
|| true
662667
gsutil -m cp -L gsutil.log ./libs.tar ./relay-debug.zip ./relay.src.zip ./release-name \
663-
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${{ matrix.image_name }}/" || status=$? && status=$?
668+
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${{ matrix.image_name }}/${{ matrix.platform }}/" || status=$? && status=$?
664669
cat gsutil.log
665670
exit "$status"
666671

scripts/create-sentry-release

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,24 @@ if [ -z "${SENTRY_ORG:-}" ] || [ -z "${SENTRY_PROJECT:-}" ]; then
2929
fi
3030

3131
echo 'Downloading debug info, source bundle, system symbols...'
32-
gsutil cp \
33-
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/release-name" \
34-
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/relay-debug.zip" \
35-
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/relay.src.zip" \
36-
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/libs.tar" \
37-
.
38-
39-
echo 'Uploading debug information and source bundle...'
40-
sentry-cli --version
41-
sentry-cli upload-dif ./relay-debug.zip ./relay.src.zip
42-
43-
echo 'Uploading system symbols...'
44-
tar xf libs.tar
45-
sentry-cli upload-dif lib/x86_64-linux-gnu
46-
32+
for PLATFORM in "linux/amd64" "linux/arm64"; do
33+
gsutil cp \
34+
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/${PLATFORM}/relay-debug.zip" \
35+
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/${PLATFORM}/relay.src.zip" \
36+
"gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/${PLATFORM}/libs.tar" \
37+
.
38+
echo "Uploading debug information and source bundle for $PLATFORM..."
39+
sentry-cli upload-dif ./relay-debug.zip ./relay.src.zip
40+
41+
echo "Uploading system symbols for $PLATFORM..."
42+
tar xf libs.tar
43+
sentry-cli upload-dif lib/
44+
45+
rm relay-debug.zip relay.src.zip libs.tar
46+
rm -rf lib
47+
done
48+
49+
gsutil cp "gs://dicd-team-devinfra-cd--relay/deployment-assets/${REVISION}/${NAME}/linux/amd64/release-name" .
4750
RELEASE=$(< ./release-name)
4851
echo "Creating a new release and deploy for ${RELEASE} in Sentry..."
4952
sentry-cli releases new "${RELEASE}"

0 commit comments

Comments
 (0)