Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 8 additions & 46 deletions .github/workflows/build_layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,9 @@ on:
- "main"

jobs:
get-ddtrace-run-id:
runs-on: ubuntu-latest
outputs:
run-id: ${{ steps.get-ddtrace-run-id.outputs.run_id }}
steps:
- name: Resolve Run ID of latest dd-trace-py build
id: get-ddtrace-run-id
env:
GH_TOKEN: ${{ github.token }}
run: |
RUN_ID=$(gh run list \
--repo DataDog/dd-trace-py \
--workflow build_deploy.yml \
--branch main \
--status success \
--limit 1 \
--json databaseId \
--jq '.[0].databaseId')

echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT

build:
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}

needs: get-ddtrace-run-id

strategy:
fail-fast: false
matrix:
Expand All @@ -44,33 +21,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Build artifact name
id: build-artifact-name
- name: Download ddtrace Wheel
id: find-ddtrace-wheel
run: |
if [ "${{ matrix.arch }}" == "amd64" ]; then
ARCH="x86_64"
# Convert matrix.arch into pip platform tag
if [ "${{ matrix.arch }}" = "amd64" ]; then
PLATFORM_TAG="manylinux_2_17_x86_64"
else
ARCH="aarch64"
PLATFORM_TAG="manylinux_2_17_aarch64"
fi

VER="${{ matrix.python_version }}"
PY_VERSION_NO_DOT="${VER//./}"

echo "artifact_name=wheels-cp${PY_VERSION_NO_DOT}-manylinux_${ARCH}" >> $GITHUB_OUTPUT

- name: Download ddtrace Wheel
uses: actions/download-artifact@v4
with:
name: ${{ steps.build-artifact-name.outputs.artifact_name }}
repository: DataDog/dd-trace-py
run-id: ${{ needs.get-ddtrace-run-id.outputs.run-id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path: ./artifacts

- name: Find ddtrace Wheel
id: find-ddtrace-wheel
run: |
echo "wheel_path=$(find ./artifacts -name "*.whl" | head -n 1)" >> $GITHUB_OUTPUT
pip download --no-index --no-deps --find-links https://dd-trace-py-builds.s3.amazonaws.com/main/index.html --pre --python-version "${{ matrix.python_version}}" --platform "${PLATFORM_TAG}" ddtrace
echo "wheel_path=$(find . -name "*.whl" | head -n 1)" >> $GITHUB_OUTPUT

- name: Patch pyproject.toml
run: |
Expand Down
Loading