From 616f0fb17c6d83078c79c3dafb969be38d7e86cb Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 10:36:57 -0400 Subject: [PATCH 01/15] let's try this --- .gitlab-ci.yml | 14 +++++++++- .gitlab/benchmarks/serverless.yml | 45 +++++++++++++++++-------------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 444546b123c..76fb9b05c81 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,6 @@ include: - local: ".gitlab/package.yml" - local: ".gitlab/release.yml" - local: ".gitlab/testrunner.yml" - - local: ".gitlab/benchmarks/serverless.yml" - local: ".gitlab/native.yml" tests-gen: @@ -105,6 +104,19 @@ microbenchmarks: # Disable VPA for benchmarks DD_DISABLE_VPA: true +serverless-benchmarks: + stage: benchmarks + needs: [] + rules: + - if: $RELEASE_ALLOW_BENCHMARK_FAILURES == "true" + allow_failure: true + - allow_failure: false + trigger: + include: .gitlab/benchmarks/serverless.yml + strategy: depend + variables: + PARENT_PIPELINE_ID: $CI_PIPELINE_ID + macrobenchmarks: stage: benchmarks needs: [ "download_ddtrace_artifacts" ] diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index d6d4685558e..306ba2f0bf5 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -1,23 +1,28 @@ variables: SLS_CI_IMAGE: registry.ddbuild.io/ci/serverless-tools:1 -benchmark-serverless: - stage: benchmarks - trigger: - project: DataDog/serverless-tools - strategy: depend - needs: [] - rules: - - if: $RELEASE_ALLOW_BENCHMARK_FAILURES == "true" - allow_failure: true - - allow_failure: false - variables: - UPSTREAM_PIPELINE_ID: $CI_PIPELINE_ID - UPSTREAM_PROJECT_URL: $CI_PROJECT_URL - UPSTREAM_COMMIT_BRANCH: $CI_COMMIT_BRANCH - UPSTREAM_COMMIT_AUTHOR: $CI_COMMIT_AUTHOR - UPSTREAM_COMMIT_TITLE: $CI_COMMIT_TITLE - UPSTREAM_COMMIT_TAG: $CI_COMMIT_TAG - UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME - UPSTREAM_GITLAB_USER_LOGIN: $GITLAB_USER_LOGIN - UPSTREAM_GITLAB_USER_EMAIL: $GITLAB_USER_EMAIL +include: + - project: 'DataDog/serverless-tools' + file: '.gitlab-ci.yml' + ref: main + +# benchmark-serverless: +# stage: benchmarks +# trigger: +# project: DataDog/serverless-tools +# strategy: depend +# needs: [] +# rules: +# - if: $RELEASE_ALLOW_BENCHMARK_FAILURES == "true" +# allow_failure: true +# - allow_failure: false +# variables: +# UPSTREAM_PIPELINE_ID: $CI_PIPELINE_ID +# UPSTREAM_PROJECT_URL: $CI_PROJECT_URL +# UPSTREAM_COMMIT_BRANCH: $CI_COMMIT_BRANCH +# UPSTREAM_COMMIT_AUTHOR: $CI_COMMIT_AUTHOR +# UPSTREAM_COMMIT_TITLE: $CI_COMMIT_TITLE +# UPSTREAM_COMMIT_TAG: $CI_COMMIT_TAG +# UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME +# UPSTREAM_GITLAB_USER_LOGIN: $GITLAB_USER_LOGIN +# UPSTREAM_GITLAB_USER_EMAIL: $GITLAB_USER_EMAIL From fc9293bb2d03d361f5bd6c69b829dd8670b88a3a Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 10:48:19 -0400 Subject: [PATCH 02/15] let's keep going --- .gitlab/benchmarks/serverless.yml | 82 ++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 22 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 306ba2f0bf5..0132160b944 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -1,28 +1,66 @@ variables: + SERVERLESS_TOOLS_REF: main SLS_CI_IMAGE: registry.ddbuild.io/ci/serverless-tools:1 + PACKAGE_IMAGE: registry.ddbuild.io/images/mirror/pypa/manylinux2014_x86_64:2024-08-12-7fde9b1 + UPSTREAM_PIPELINE_ID: $CI_PIPELINE_ID + UPSTREAM_PROJECT_URL: $CI_PROJECT_URL + UPSTREAM_COMMIT_BRANCH: $CI_COMMIT_BRANCH + UPSTREAM_COMMIT_AUTHOR: $CI_COMMIT_AUTHOR + UPSTREAM_COMMIT_TITLE: $CI_COMMIT_TITLE + UPSTREAM_COMMIT_TAG: $CI_COMMIT_TAG + UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME + UPSTREAM_GITLAB_USER_LOGIN: $GITLAB_USER_LOGIN + UPSTREAM_GITLAB_USER_EMAIL: $GITLAB_USER_EMAIL + + +stages: + - build + - benchmark + - notify include: - project: 'DataDog/serverless-tools' file: '.gitlab-ci.yml' - ref: main - -# benchmark-serverless: -# stage: benchmarks -# trigger: -# project: DataDog/serverless-tools -# strategy: depend -# needs: [] -# rules: -# - if: $RELEASE_ALLOW_BENCHMARK_FAILURES == "true" -# allow_failure: true -# - allow_failure: false -# variables: -# UPSTREAM_PIPELINE_ID: $CI_PIPELINE_ID -# UPSTREAM_PROJECT_URL: $CI_PROJECT_URL -# UPSTREAM_COMMIT_BRANCH: $CI_COMMIT_BRANCH -# UPSTREAM_COMMIT_AUTHOR: $CI_COMMIT_AUTHOR -# UPSTREAM_COMMIT_TITLE: $CI_COMMIT_TITLE -# UPSTREAM_COMMIT_TAG: $CI_COMMIT_TAG -# UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME -# UPSTREAM_GITLAB_USER_LOGIN: $GITLAB_USER_LOGIN -# UPSTREAM_GITLAB_USER_EMAIL: $GITLAB_USER_EMAIL + ref: $SERVERLESS_TOOLS_REF + +candidate: + image: $PACKAGE_IMAGE + stage: build + tags: [ "arch:amd64" ] + needs: + - pipeline: $PARENT_PIPELINE_ID + job: download_ddtrace_artifacts + script: | + cp pywheels/*-cp311-cp311-manylinux*_x86_64*.whl ./ + cp pywheels/*-cp311-cp311-musllinux*_aarch64*.whl ./ + echo "CANDIDATE_AMD64_WHL=$(ls *x86_64*.whl | head -n 1)" | tee candidate.env + echo "CANDIDATE_ARM64_WHL=$(ls *aarch64*.whl | head -n 1)" | tee candidate.env + artifacts: + reports: + dotenv: candidate.env + paths: + - "*.whl" + +.common: + # We are in a child pipeline of dd-trace-py so we need to clone and enter the serverless-tools repo for jobs to work + before: | + if [[ -n "$CI_JOB_TOKEN" ]]; + then + git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" + fi + git clone --branch "${SERVERLESS_TOOLS_REF}" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools + cd ./serverless-tools + +.setup: + needs: + - candidate + before: + - !reference [.common, before] + +.layer-size: + before: + - !reference [.common, before] + +.cold-start: + before: + - !reference [.common, before] From 919dcbf4e1ee9a3f56d446922b3bbaf8d526b7c6 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 10:53:09 -0400 Subject: [PATCH 03/15] fix ref? --- .gitlab/benchmarks/serverless.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 0132160b944..a766822df04 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -1,5 +1,4 @@ variables: - SERVERLESS_TOOLS_REF: main SLS_CI_IMAGE: registry.ddbuild.io/ci/serverless-tools:1 PACKAGE_IMAGE: registry.ddbuild.io/images/mirror/pypa/manylinux2014_x86_64:2024-08-12-7fde9b1 UPSTREAM_PIPELINE_ID: $CI_PIPELINE_ID @@ -21,7 +20,7 @@ stages: include: - project: 'DataDog/serverless-tools' file: '.gitlab-ci.yml' - ref: $SERVERLESS_TOOLS_REF + ref: main candidate: image: $PACKAGE_IMAGE @@ -48,7 +47,7 @@ candidate: then git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" fi - git clone --branch "${SERVERLESS_TOOLS_REF}" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools + git clone --branch "main" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools cd ./serverless-tools .setup: From 46075b42423b664f63cdf1e0bea8dfff273df45b Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 10:56:17 -0400 Subject: [PATCH 04/15] before_script --- .gitlab/benchmarks/serverless.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index a766822df04..bbf0bcaa394 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -42,7 +42,7 @@ candidate: .common: # We are in a child pipeline of dd-trace-py so we need to clone and enter the serverless-tools repo for jobs to work - before: | + before_script: | if [[ -n "$CI_JOB_TOKEN" ]]; then git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" @@ -53,13 +53,13 @@ candidate: .setup: needs: - candidate - before: - - !reference [.common, before] + before_script: + - !reference [.common, before_script] .layer-size: - before: - - !reference [.common, before] + before_script: + - !reference [.common, before_script] .cold-start: - before: - - !reference [.common, before] + before_script: + - !reference [.common, before_script] From 943ebe4c65a89c2b0fb0b849d3e9c45cb1f81706 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 11:01:53 -0400 Subject: [PATCH 05/15] missing dep --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76fb9b05c81..0e529d83720 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -106,7 +106,7 @@ microbenchmarks: serverless-benchmarks: stage: benchmarks - needs: [] + needs: [ "download_ddtrace_artifacts" ] rules: - if: $RELEASE_ALLOW_BENCHMARK_FAILURES == "true" allow_failure: true From e195ac861b5bf492d36c1a05aa21f285e2f449b5 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 11:11:15 -0400 Subject: [PATCH 06/15] use the wheels --- .gitlab/benchmarks/serverless.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index bbf0bcaa394..fcd2b91ef28 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -20,7 +20,7 @@ stages: include: - project: 'DataDog/serverless-tools' file: '.gitlab-ci.yml' - ref: main + ref: brettlangdon/candidate.wheels candidate: image: $PACKAGE_IMAGE @@ -47,7 +47,8 @@ candidate: then git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" fi - git clone --branch "main" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools + git clone --branch "brettlangdon/candidate.wheels" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools + cp *.whl ./serverless-tools/ cd ./serverless-tools .setup: From 3b2045f68d2aa6e12d7762d4f1de566284ca2118 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 12:47:22 -0400 Subject: [PATCH 07/15] needs -> dependencies? --- .gitlab/benchmarks/serverless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index fcd2b91ef28..1fc1b7c58a3 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -52,7 +52,7 @@ candidate: cd ./serverless-tools .setup: - needs: + dependencies: - candidate before_script: - !reference [.common, before_script] From b5f89565e1e4f517cd9cc30b61d217ec0170eb8b Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 13:05:06 -0400 Subject: [PATCH 08/15] must be needs --- .gitlab/benchmarks/serverless.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 1fc1b7c58a3..8ac3739ccc8 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -52,8 +52,9 @@ candidate: cd ./serverless-tools .setup: - dependencies: - - candidate + needs: + - job: candidate + artifacts: true before_script: - !reference [.common, before_script] From 83c59e8835eed194a7dc5460d4d5030a2aaeb54d Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 13:23:18 -0400 Subject: [PATCH 09/15] needs AND dependencies? --- .gitlab/benchmarks/serverless.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 8ac3739ccc8..496179d179b 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -55,6 +55,8 @@ candidate: needs: - job: candidate artifacts: true + dependencies: + - candidate before_script: - !reference [.common, before_script] From c945d1d305cf172fa5209a1911d06d9d10ae9656 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 14:47:06 -0400 Subject: [PATCH 10/15] try more things --- .gitlab/benchmarks/serverless.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 496179d179b..ba6b68ef9d6 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -43,15 +43,27 @@ candidate: .common: # We are in a child pipeline of dd-trace-py so we need to clone and enter the serverless-tools repo for jobs to work before_script: | + echo $CANDIDATE_AMD64_WHL + echo $CANDIDATE_ARM64_WHL + if [[ -n "$CI_JOB_TOKEN" ]]; then git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" fi git clone --branch "brettlangdon/candidate.wheels" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools - cp *.whl ./serverless-tools/ cd ./serverless-tools -.setup: +setup (amd64): + needs: + - job: candidate + artifacts: true + dependencies: + - candidate + before_script: + - !reference [.common, before_script] + - "cp ../*.whl ./" + +setup (arm64): needs: - job: candidate artifacts: true @@ -59,6 +71,7 @@ candidate: - candidate before_script: - !reference [.common, before_script] + - "cp ../*.whl ./" .layer-size: before_script: From 7377de8b5d6493b39259a222c5e569f10cbd18d6 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 15:08:33 -0400 Subject: [PATCH 11/15] append --- .gitlab/benchmarks/serverless.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index ba6b68ef9d6..ed28c449873 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -33,7 +33,7 @@ candidate: cp pywheels/*-cp311-cp311-manylinux*_x86_64*.whl ./ cp pywheels/*-cp311-cp311-musllinux*_aarch64*.whl ./ echo "CANDIDATE_AMD64_WHL=$(ls *x86_64*.whl | head -n 1)" | tee candidate.env - echo "CANDIDATE_ARM64_WHL=$(ls *aarch64*.whl | head -n 1)" | tee candidate.env + echo "CANDIDATE_ARM64_WHL=$(ls *aarch64*.whl | head -n 1)" | tee -a candidate.env artifacts: reports: dotenv: candidate.env @@ -43,9 +43,6 @@ candidate: .common: # We are in a child pipeline of dd-trace-py so we need to clone and enter the serverless-tools repo for jobs to work before_script: | - echo $CANDIDATE_AMD64_WHL - echo $CANDIDATE_ARM64_WHL - if [[ -n "$CI_JOB_TOKEN" ]]; then git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" From e2e950ad57fea07221dae33231a565ac5a56cc3a Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Tue, 14 Oct 2025 15:51:55 -0400 Subject: [PATCH 12/15] manylinux all around --- .gitlab/benchmarks/serverless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index ed28c449873..43d90e8e58d 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -31,7 +31,7 @@ candidate: job: download_ddtrace_artifacts script: | cp pywheels/*-cp311-cp311-manylinux*_x86_64*.whl ./ - cp pywheels/*-cp311-cp311-musllinux*_aarch64*.whl ./ + cp pywheels/*-cp311-cp311-manylinux*_aarch64*.whl ./ echo "CANDIDATE_AMD64_WHL=$(ls *x86_64*.whl | head -n 1)" | tee candidate.env echo "CANDIDATE_ARM64_WHL=$(ls *aarch64*.whl | head -n 1)" | tee -a candidate.env artifacts: From 502e2e2cd02ae5eea886581f6f56c1a1a54263c6 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Wed, 15 Oct 2025 09:46:57 -0400 Subject: [PATCH 13/15] move artifacts --- .gitlab/benchmarks/serverless.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 43d90e8e58d..3286636342c 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -50,6 +50,10 @@ candidate: git clone --branch "brettlangdon/candidate.wheels" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools cd ./serverless-tools + # We are in ./serverless-tools, but we need the artifacts in the parent dir + after_script: | + mv ${CI_PROJECT_DIR}/serverless-tools/*.zip ${CI_PROJECT_DIR}/ + setup (amd64): needs: - job: candidate From 958a15ac210088c89d335fa474f908964ba7723c Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Wed, 15 Oct 2025 10:13:45 -0400 Subject: [PATCH 14/15] fix artifact location --- .gitlab/benchmarks/serverless.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 3286636342c..502305c8b10 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -50,9 +50,19 @@ candidate: git clone --branch "brettlangdon/candidate.wheels" --single-branch https://github.com/DataDog/serverless-tools ./serverless-tools cd ./serverless-tools - # We are in ./serverless-tools, but we need the artifacts in the parent dir - after_script: | - mv ${CI_PROJECT_DIR}/serverless-tools/*.zip ${CI_PROJECT_DIR}/ + +.common_setup: + before_script: + - !reference [.common, before_script] + - "cp ../*.whl ./" + + # We are in ./serverless-tools, and child jobs will be in serverless-tools as well + artifacts: + expire_in: 1 hr # Unsigned zips expire in 1 hour + paths: + - ${CI_PROJECT_DIR}/serverless-tools/layer.zip + reports: + dotenv: ${CI_PROJECT_DIR}/serverless-tools/.env # To pass environment variables setup (amd64): needs: @@ -61,8 +71,8 @@ setup (amd64): dependencies: - candidate before_script: - - !reference [.common, before_script] - - "cp ../*.whl ./" + - !reference [.common_setup, before_script] + artifacts: !reference [.common_setup, artifacts] setup (arm64): needs: @@ -71,8 +81,8 @@ setup (arm64): dependencies: - candidate before_script: - - !reference [.common, before_script] - - "cp ../*.whl ./" + - !reference [.common_setup, before_script] + artifacts: !reference [.common_setup, artifacts] .layer-size: before_script: From af4e71d5ec395614207b1c03cb21c3ef2fffa012 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Wed, 15 Oct 2025 10:34:09 -0400 Subject: [PATCH 15/15] more artifact wrangling --- .gitlab/benchmarks/serverless.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitlab/benchmarks/serverless.yml b/.gitlab/benchmarks/serverless.yml index 502305c8b10..aedc3a9b755 100644 --- a/.gitlab/benchmarks/serverless.yml +++ b/.gitlab/benchmarks/serverless.yml @@ -55,14 +55,16 @@ candidate: before_script: - !reference [.common, before_script] - "cp ../*.whl ./" + after_script: + - cp ${CI_PROJECT_DIR}/serverless-tools/.env ${CI_PROJECT_DIR}/serverless-tools/layer.zip ${CI_PROJECT_DIR}/ # We are in ./serverless-tools, and child jobs will be in serverless-tools as well artifacts: expire_in: 1 hr # Unsigned zips expire in 1 hour paths: - - ${CI_PROJECT_DIR}/serverless-tools/layer.zip + - layer.zip reports: - dotenv: ${CI_PROJECT_DIR}/serverless-tools/.env # To pass environment variables + dotenv: .env # To pass environment variables setup (amd64): needs: @@ -72,6 +74,8 @@ setup (amd64): - candidate before_script: - !reference [.common_setup, before_script] + after_script: + - !reference [.common_setup, after_script] artifacts: !reference [.common_setup, artifacts] setup (arm64): @@ -82,12 +86,20 @@ setup (arm64): - candidate before_script: - !reference [.common_setup, before_script] + after_script: + - !reference [.common_setup, after_script] artifacts: !reference [.common_setup, artifacts] + +.common_tests: + before_script: + - !reference [.common, before_script] + - "cp ${CI_PROJECT_DIR}/*.zip ./" + .layer-size: before_script: - - !reference [.common, before_script] + - !reference [.common_tests, before_script] .cold-start: before_script: - - !reference [.common, before_script] + - !reference [.common_tests, before_script]