Skip to content

Commit 54d4b49

Browse files
committed
ci: download serverless build for serverless system-tests
1 parent 46be034 commit 54d4b49

1 file changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/system-tests.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,42 @@ jobs:
391391
name: logs_parametric
392392
path: artifact.tar.gz
393393

394+
download-serverless-s3-wheels:
395+
needs: [should-run]
396+
if: needs.should-run.outputs.run == 'true' && (github.event_name != 'schedule' || github.event.repository.fork == false)
397+
runs-on: ubuntu-latest
398+
steps:
399+
- name: Checkout code
400+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
401+
with:
402+
persist-credentials: false
403+
404+
- name: Resolve commit SHA
405+
id: resolve-sha
406+
run: |
407+
if [ "${{ github.event_name }}" = "pull_request" ]; then
408+
echo "sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"
409+
else
410+
echo "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT"
411+
fi
412+
413+
- name: Download wheels from S3
414+
run: |
415+
bash scripts/download-s3-wheels.sh \
416+
"${{ steps.resolve-sha.outputs.sha }}" \
417+
./wheels \
418+
serverless
419+
420+
- name: Upload artifact
421+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
422+
with:
423+
name: serverless-wheels
424+
path: ./wheels/*.whl
425+
if-no-files-found: error
426+
394427
serverless-system-tests-build-layer:
395428
runs-on: ubuntu-latest
396-
needs: [download-s3-wheels]
429+
needs: [download-serverless-s3-wheels]
397430
steps:
398431
- name: Checkout datadog-lambda-python
399432
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -404,12 +437,12 @@ jobs:
404437
- name: Download wheel to binaries directory
405438
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
406439
with:
407-
name: wheels-manylinux_x86_64
440+
name: serverless-wheels
408441
path: artifacts/
409442

410443
- name: Build datadog_lambda layer
411444
run: |
412-
wheel_path=$(find ./artifacts -name "*cp313*manylinux*.whl" | head -n 1)
445+
wheel_path=$(find ./artifacts -name "*cp313*manylinux2014_x86_64.whl" | head -n 1)
413446
ARCH=amd64 PYTHON_VERSION=3.13 DD_TRACE_WHEEL=$wheel_path ./scripts/build_layers.sh
414447
415448
- name: Upload layer artifact

0 commit comments

Comments
 (0)