Skip to content

Commit 3f57731

Browse files
committed
build(system-tests): fetch manylinux builds from ddtrace
1 parent db67384 commit 3f57731

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build_layer.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- "main"
7+
- "florentinl/fix-glibc-compat"
78

89
jobs:
910
build:
@@ -18,6 +19,32 @@ jobs:
1819
- name: Checkout
1920
uses: actions/checkout@v4
2021

22+
- name: Generate token
23+
id: generate_token
24+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
25+
with:
26+
app-id: ${{ secrets.GH_APP_ID }}
27+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
28+
29+
- name: Download ddtrace wheel from GitHub workflow artifacts
30+
env:
31+
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
32+
33+
run: |
34+
WORKFLOWS=$(curl --silent --fail --show-error -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/DataDog/dd-trace-py/actions/workflows/build_deploy.yml/runs?per_page=100")
35+
ARTIFACT_URL=$(echo "$WORKFLOWS" | jq -r '[.workflow_runs[] | select(.conclusion != "failure" and .head_branch == "main" and .status == "completed")][0] | .artifacts_url')
36+
ARTIFACTS=$(curl --silent --fail --show-error -H "Authorization: token $GH_TOKEN" "$ARTIFACT_URL")
37+
38+
VERSION_NO_DOT=$(echo ${{ matrix.python_version }} | sed 's/\.//g')
39+
DDTRACE_ARCH=$(if [ "${{ matrix.arch }}" == "arm64" ]; then echo "aarch64"; else echo "x86_64"; fi)
40+
ARTIFACT_NAME=wheels-cp${VERSION_NO_DOT}-manylinux_${DDTRACE_ARCH}
41+
42+
ARCHIVE_URL=$(echo "$ARTIFACTS" | jq -r '.artifacts[] | select(.name == "'"${ARTIFACT_NAME}"'") | .archive_download_url')
43+
44+
curl --silent --fail --show-error -H "Authorization: token $GH_TOKEN" -L "$ARCHIVE_URL" --output artifacts.zip
45+
unzip artifacts.zip
46+
47+
2148
- name: Patch pyproject.toml
2249
run: |
2350
echo "Patching pyproject.toml to use main branch of dd-trace-py"

0 commit comments

Comments
 (0)