From d5d68358a976e428fe36451a1b24cd2c73bd7ae5 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 2 Feb 2026 13:43:26 -0500 Subject: [PATCH 01/22] Adding e2e test trigger --- .gitlab/input_files/build.yaml.tpl | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 737d746e..7c1f9c06 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -1,3 +1,5 @@ +{{- $e2e_region := "us-west-2" -}} + variables: CI_DOCKER_TARGET_IMAGE: registry.ddbuild.io/ci/datadog-lambda-js CI_DOCKER_TARGET_VERSION: latest @@ -7,6 +9,7 @@ stages: - test - sign - publish + - e2e default: retry: @@ -126,6 +129,8 @@ publish layer {{ $environment.name }} ({{ $runtime.name }}): tags: ["arch:amd64"] image: ${CI_DOCKER_TARGET_IMAGE}:${CI_DOCKER_TARGET_VERSION} rules: + - if: '"{{ $environment_name }}" == "sandbox" && $REGION == "{{ $e2e_region }}"' + when: on_success - if: '"{{ $environment.name }}" =~ /^(sandbox|staging)/' when: manual allow_failure: true @@ -203,3 +208,56 @@ publish npm package: - mkdir -p datadog_lambda_js-{{ if eq $environment.name "prod"}}signed-{{ end }}bundle-${CI_JOB_ID} - cp .layers/datadog_lambda_node*.zip datadog_lambda_js-{{ if eq $environment.name "prod"}}signed-{{ end }}bundle-${CI_JOB_ID} {{ end }} + +e2e-test: + stage: e2e + trigger: + project: DataDog/serverless-e2e-tests + strategy: depend + variables: + LANGUAGES_SUBSET: node + # These env vars are inherited from the dotenv reports of the publish-layer jobs + {{- range (ds "runtimes").runtimes }} + {{- if eq .arch "amd64" }} + {{- $runtime.node_version := print (.name | strings.Trim "node") }} + NODEJS_{{ $runtime.node_version }}_VERSION: $NODEJS_{{ $runtime.node_version }}_VERSION + {{- end }} + {{- end }} + needs: {{ range (ds "runtimes").runtimes }} + {{- if eq .arch "amd64" }} + - "publish-layer-sandbox ({{ .name }}): [{{ $e2e_region }}]" + {{- end }} + {{- end }} + +e2e-test-status: + stage: e2e + image: registry.ddbuild.io/images/docker:20.10-py3 + tags: ["arch:amd64"] + timeout: 3h + script: | + GITLAB_API_TOKEN=$(aws ssm get-parameter --region us-east-1 --name "ci.${CI_PROJECT_NAME}.serverless-e2e-gitlab-token" --with-decryption --query "Parameter.Value" --out text) + URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" + echo "Fetching E2E job status from: $URL" + while true; do + RESPONSE=$(curl -s --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" "$URL") + E2E_JOB_STATUS=$(echo "$RESPONSE" | jq -r '.[] | select(.name=="e2e-test") | .downstream_pipeline.status') + echo -n "E2E job status: $E2E_JOB_STATUS, " + if [ "$E2E_JOB_STATUS" == "success" ]; then + echo "✅ E2E tests completed successfully" + exit 0 + elif [ "$E2E_JOB_STATUS" == "failed" ]; then + echo "❌ E2E tests failed" + exit 1 + elif [ "$E2E_JOB_STATUS" == "running" ]; then + echo "⏳ E2E tests are still running, retrying in 1 minute..." + elif [ "$E2E_JOB_STATUS" == "canceled" ]; then + echo "🚫 E2E tests were canceled" + exit 1 + elif [ "$E2E_JOB_STATUS" == "skipped" ]; then + echo "⏭️ E2E tests were skipped" + exit 0 + else + echo "❓ Unknown E2E test status: $E2E_JOB_STATUS, retrying in 1 minute..." + fi + sleep 60 + done From ac3dec3d7328a30d3505072cc72390c00c703706 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 2 Feb 2026 13:47:17 -0500 Subject: [PATCH 02/22] typo --- .gitlab/input_files/build.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 7c1f9c06..af32a614 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -129,7 +129,7 @@ publish layer {{ $environment.name }} ({{ $runtime.name }}): tags: ["arch:amd64"] image: ${CI_DOCKER_TARGET_IMAGE}:${CI_DOCKER_TARGET_VERSION} rules: - - if: '"{{ $environment_name }}" == "sandbox" && $REGION == "{{ $e2e_region }}"' + - if: '"{{ $environment.name }}" == "sandbox" && $REGION == "{{ $e2e_region }}"' when: on_success - if: '"{{ $environment.name }}" =~ /^(sandbox|staging)/' when: manual From 9ce643176749f909b762fba9af73b276f2884a5d Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 2 Feb 2026 13:56:11 -0500 Subject: [PATCH 03/22] more typos --- .gitlab/input_files/build.yaml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index af32a614..0d62466c 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -217,7 +217,7 @@ e2e-test: variables: LANGUAGES_SUBSET: node # These env vars are inherited from the dotenv reports of the publish-layer jobs - {{- range (ds "runtimes").runtimes }} + {{- range $runtime := (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} {{- $runtime.node_version := print (.name | strings.Trim "node") }} NODEJS_{{ $runtime.node_version }}_VERSION: $NODEJS_{{ $runtime.node_version }}_VERSION @@ -225,7 +225,7 @@ e2e-test: {{- end }} needs: {{ range (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} - - "publish-layer-sandbox ({{ .name }}): [{{ $e2e_region }}]" + - "publish-layer-sandbox ({{ $environment.name }}): [{{ $e2e_region }}]" {{- end }} {{- end }} From fe832d617f1b3f0add2202e4b26b6f0a985e6340 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 3 Feb 2026 15:10:24 -0500 Subject: [PATCH 04/22] another typo --- .gitlab/input_files/build.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 0d62466c..c4975480 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -217,7 +217,7 @@ e2e-test: variables: LANGUAGES_SUBSET: node # These env vars are inherited from the dotenv reports of the publish-layer jobs - {{- range $runtime := (ds "runtimes").runtimes }} + {{ range $runtime := (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} {{- $runtime.node_version := print (.name | strings.Trim "node") }} NODEJS_{{ $runtime.node_version }}_VERSION: $NODEJS_{{ $runtime.node_version }}_VERSION From afe6cc77f013c74b397832220a96e6769c3db6b4 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 3 Feb 2026 15:52:03 -0500 Subject: [PATCH 05/22] reformat --- .gitlab/input_files/build.yaml.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index c4975480..12016828 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -215,17 +215,17 @@ e2e-test: project: DataDog/serverless-e2e-tests strategy: depend variables: - LANGUAGES_SUBSET: node - # These env vars are inherited from the dotenv reports of the publish-layer jobs - {{ range $runtime := (ds "runtimes").runtimes }} + LANGUAGES_SUBSET: node + # These env vars are inherited from the dotenv reports of the publish-layer jobs + {{- range (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} {{- $runtime.node_version := print (.name | strings.Trim "node") }} - NODEJS_{{ $runtime.node_version }}_VERSION: $NODEJS_{{ $runtime.node_version }}_VERSION + NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION {{- end }} {{- end }} needs: {{ range (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} - - "publish-layer-sandbox ({{ $environment.name }}): [{{ $e2e_region }}]" + - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" {{- end }} {{- end }} From 2f28943a005b7f68dc151384b6891b5f0fe6f854 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 3 Feb 2026 15:53:32 -0500 Subject: [PATCH 06/22] typo --- .gitlab/input_files/build.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 12016828..2d478b9d 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -219,7 +219,7 @@ e2e-test: # These env vars are inherited from the dotenv reports of the publish-layer jobs {{- range (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} - {{- $runtime.node_version := print (.name | strings.Trim "node") }} + {{- .node_version := print (.name | strings.Trim "node") }} NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION {{- end }} {{- end }} From eff51df6ed783ca44b39ed267050b3d88556ec80 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 3 Feb 2026 15:56:23 -0500 Subject: [PATCH 07/22] remove var --- .gitlab/input_files/build.yaml.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 2d478b9d..35649393 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -219,7 +219,6 @@ e2e-test: # These env vars are inherited from the dotenv reports of the publish-layer jobs {{- range (ds "runtimes").runtimes }} {{- if eq .arch "amd64" }} - {{- .node_version := print (.name | strings.Trim "node") }} NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION {{- end }} {{- end }} From 3493c7c93d2dc31c406efd2521105b299aa80ac5 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 3 Feb 2026 16:38:12 -0500 Subject: [PATCH 08/22] remove arch --- .gitlab/input_files/build.yaml.tpl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 35649393..f47a7776 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -218,15 +218,11 @@ e2e-test: LANGUAGES_SUBSET: node # These env vars are inherited from the dotenv reports of the publish-layer jobs {{- range (ds "runtimes").runtimes }} - {{- if eq .arch "amd64" }} NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION {{- end }} - {{- end }} needs: {{ range (ds "runtimes").runtimes }} - {{- if eq .arch "amd64" }} - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" {{- end }} - {{- end }} e2e-test-status: stage: e2e From 00590559535fd5135e6313b2c994621e04056824 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 3 Feb 2026 17:09:16 -0500 Subject: [PATCH 09/22] remove status check --- .gitlab/input_files/build.yaml.tpl | 33 ------------------------------ 1 file changed, 33 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index f47a7776..972da4e8 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -223,36 +223,3 @@ e2e-test: needs: {{ range (ds "runtimes").runtimes }} - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" {{- end }} - -e2e-test-status: - stage: e2e - image: registry.ddbuild.io/images/docker:20.10-py3 - tags: ["arch:amd64"] - timeout: 3h - script: | - GITLAB_API_TOKEN=$(aws ssm get-parameter --region us-east-1 --name "ci.${CI_PROJECT_NAME}.serverless-e2e-gitlab-token" --with-decryption --query "Parameter.Value" --out text) - URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" - echo "Fetching E2E job status from: $URL" - while true; do - RESPONSE=$(curl -s --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" "$URL") - E2E_JOB_STATUS=$(echo "$RESPONSE" | jq -r '.[] | select(.name=="e2e-test") | .downstream_pipeline.status') - echo -n "E2E job status: $E2E_JOB_STATUS, " - if [ "$E2E_JOB_STATUS" == "success" ]; then - echo "✅ E2E tests completed successfully" - exit 0 - elif [ "$E2E_JOB_STATUS" == "failed" ]; then - echo "❌ E2E tests failed" - exit 1 - elif [ "$E2E_JOB_STATUS" == "running" ]; then - echo "⏳ E2E tests are still running, retrying in 1 minute..." - elif [ "$E2E_JOB_STATUS" == "canceled" ]; then - echo "🚫 E2E tests were canceled" - exit 1 - elif [ "$E2E_JOB_STATUS" == "skipped" ]; then - echo "⏭️ E2E tests were skipped" - exit 0 - else - echo "❓ Unknown E2E test status: $E2E_JOB_STATUS, retrying in 1 minute..." - fi - sleep 60 - done From 25d52582992d0fc99c2f31b1c54a26cc4967193a Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Thu, 5 Feb 2026 15:48:34 -0500 Subject: [PATCH 10/22] python test --- .gitlab/input_files/build.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 972da4e8..883d3a8d 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -215,7 +215,7 @@ e2e-test: project: DataDog/serverless-e2e-tests strategy: depend variables: - LANGUAGES_SUBSET: node + LANGUAGES_SUBSET: python # These env vars are inherited from the dotenv reports of the publish-layer jobs {{- range (ds "runtimes").runtimes }} NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION From d79eea220c736aceafb9b45dc4a98d65bed094ed Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Thu, 5 Feb 2026 16:46:25 -0500 Subject: [PATCH 11/22] indent --- .gitlab/input_files/build.yaml.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 883d3a8d..7bc275c8 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -215,11 +215,11 @@ e2e-test: project: DataDog/serverless-e2e-tests strategy: depend variables: - LANGUAGES_SUBSET: python + LANGUAGES_SUBSET: node # These env vars are inherited from the dotenv reports of the publish-layer jobs {{- range (ds "runtimes").runtimes }} - NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION + NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION {{- end }} needs: {{ range (ds "runtimes").runtimes }} - - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" + - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" {{- end }} From cff40c115ba13288040b8b837a1ef18839cb532d Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Thu, 5 Feb 2026 17:11:36 -0500 Subject: [PATCH 12/22] fix version --- .gitlab/input_files/build.yaml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 7bc275c8..40dc56d7 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -216,9 +216,9 @@ e2e-test: strategy: depend variables: LANGUAGES_SUBSET: node - # These env vars are inherited from the dotenv reports of the publish-layer jobs {{- range (ds "runtimes").runtimes }} - NODEJS_{{ .node_version }}_VERSION: $NODEJS_{{ .node_version }}_VERSION + {{- $version := print (.name | strings.Trim "node") }} + NODEJS_{{ $version }}_VERSION: $NODEJS_{{ $version }}_VERSION {{- end }} needs: {{ range (ds "runtimes").runtimes }} - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" From 6e5bb84b552f22988cc538735b2db3077d18e9d3 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Thu, 5 Feb 2026 17:25:26 -0500 Subject: [PATCH 13/22] status --- .gitlab/input_files/build.yaml.tpl | 36 +++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 40dc56d7..ac589f09 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -218,8 +218,42 @@ e2e-test: LANGUAGES_SUBSET: node {{- range (ds "runtimes").runtimes }} {{- $version := print (.name | strings.Trim "node") }} - NODEJS_{{ $version }}_VERSION: $NODEJS_{{ $version }}_VERSION + NODEJS_{{ $version }}_VERSION: "NODEJS_{{ $version }}_VERSION" {{- end }} needs: {{ range (ds "runtimes").runtimes }} - "publish layer sandbox ({{ .name }}): [{{ $e2e_region }}]" {{- end }} + + +e2e-test-status: + stage: e2e + image: registry.ddbuild.io/images/docker:20.10-py3 + tags: ["arch:amd64"] + timeout: 3h + script: | + GITLAB_API_TOKEN=$(aws ssm get-parameter --region us-east-1 --name "ci.${CI_PROJECT_NAME}.serverless-e2e-gitlab-token" --with-decryption --query "Parameter.Value" --out text) + URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" + echo "Fetching E2E job status from: $URL" + while true; do + RESPONSE=$(curl -s --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" "$URL") + E2E_JOB_STATUS=$(echo "$RESPONSE" | jq -r '.[] | select(.name=="e2e-test") | .downstream_pipeline.status') + echo -n "E2E job status: $E2E_JOB_STATUS, " + if [ "$E2E_JOB_STATUS" == "success" ]; then + echo "✅ E2E tests completed successfully" + exit 0 + elif [ "$E2E_JOB_STATUS" == "failed" ]; then + echo "❌ E2E tests failed" + exit 1 + elif [ "$E2E_JOB_STATUS" == "running" ]; then + echo "⏳ E2E tests are still running, retrying in 1 minute..." + elif [ "$E2E_JOB_STATUS" == "canceled" ]; then + echo "🚫 E2E tests were canceled" + exit 1 + elif [ "$E2E_JOB_STATUS" == "skipped" ]; then + echo "⏭️ E2E tests were skipped" + exit 0 + else + echo "❓ Unknown E2E test status: $E2E_JOB_STATUS, retrying in 1 minute..." + fi + sleep 60 + done From 2f2018c5a00e56eac067b9b8f501dfca0560bbe0 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 9 Feb 2026 15:29:46 -0500 Subject: [PATCH 14/22] fix gitlab api token --- .gitlab/input_files/build.yaml.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index ac589f09..12b5b668 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -231,7 +231,8 @@ e2e-test-status: tags: ["arch:amd64"] timeout: 3h script: | - GITLAB_API_TOKEN=$(aws ssm get-parameter --region us-east-1 --name "ci.${CI_PROJECT_NAME}.serverless-e2e-gitlab-token" --with-decryption --query "Parameter.Value" --out text) + GITLAB_API_TOKEN=$(curl -H "$(ddtool auth token sdm-staging --datacenter us1.ddbuild.staging.dog --http-header)" \ + "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" echo "Fetching E2E job status from: $URL" while true; do From 2d01ec6b1f0171e5f4f33d21d36fda5d2b6b849e Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 9 Feb 2026 15:53:37 -0500 Subject: [PATCH 15/22] trying new image for polling job --- .gitlab/input_files/build.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 12b5b668..e5e64ea1 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -227,7 +227,7 @@ e2e-test: e2e-test-status: stage: e2e - image: registry.ddbuild.io/images/docker:20.10-py3 + image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX tags: ["arch:amd64"] timeout: 3h script: | From 5884352dcee722254d1691b6355cc38a7f6a3ad4 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 9 Feb 2026 16:22:05 -0500 Subject: [PATCH 16/22] trying to add auth anywhere --- .gitlab/input_files/build.yaml.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index e5e64ea1..b39bd40b 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -227,11 +227,12 @@ e2e-test: e2e-test-status: stage: e2e - image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX + image: registry.ddbuild.io/images/docker:20.10-py3 tags: ["arch:amd64"] timeout: 3h script: | - GITLAB_API_TOKEN=$(curl -H "$(ddtool auth token sdm-staging --datacenter us1.ddbuild.staging.dog --http-header)" \ + auth_header=$(authanywhere --audience rapid-foo-bar) + GITLAB_API_TOKEN=$(curl -H "${auth_header}" "$(ddtool auth token sdm-staging --datacenter us1.ddbuild.staging.dog --http-header)" \ "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" echo "Fetching E2E job status from: $URL" From 12da3477775bef93de9fea2dd836eb877a09f18d Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Mon, 9 Feb 2026 16:52:43 -0500 Subject: [PATCH 17/22] auth anywhere install? --- .gitlab/input_files/build.yaml.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index b39bd40b..40e362c1 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -231,6 +231,7 @@ e2e-test-status: tags: ["arch:amd64"] timeout: 3h script: | + curl -OL "binaries.ddbuild.io/dd-source/authanywhere/LATEST/authanywhere-linux-amd64" && mv "authanywhere-linux-amd64" /bin/authanywhere && chmod +x /bin/authanywhere auth_header=$(authanywhere --audience rapid-foo-bar) GITLAB_API_TOKEN=$(curl -H "${auth_header}" "$(ddtool auth token sdm-staging --datacenter us1.ddbuild.staging.dog --http-header)" \ "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") From dbfd2b0fc7a462517828da63aa359222432ddc67 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 10 Feb 2026 14:40:27 -0500 Subject: [PATCH 18/22] more auth --- .gitlab/input_files/build.yaml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 40e362c1..8b6a4e30 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -231,8 +231,8 @@ e2e-test-status: tags: ["arch:amd64"] timeout: 3h script: | - curl -OL "binaries.ddbuild.io/dd-source/authanywhere/LATEST/authanywhere-linux-amd64" && mv "authanywhere-linux-amd64" /bin/authanywhere && chmod +x /bin/authanywhere - auth_header=$(authanywhere --audience rapid-foo-bar) + brew update && brew upgrade datadog/tap/ddr && brew install authanywhere + auth_header=$(authanywhere --serverless-e2e-tests) GITLAB_API_TOKEN=$(curl -H "${auth_header}" "$(ddtool auth token sdm-staging --datacenter us1.ddbuild.staging.dog --http-header)" \ "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" From c752b8aa8e4bf6e1ddc2b14f2e696b71aaf1d2c9 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 10 Feb 2026 14:57:33 -0500 Subject: [PATCH 19/22] no ddtool? --- .gitlab/input_files/build.yaml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 8b6a4e30..12765a54 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -232,8 +232,8 @@ e2e-test-status: timeout: 3h script: | brew update && brew upgrade datadog/tap/ddr && brew install authanywhere - auth_header=$(authanywhere --serverless-e2e-tests) - GITLAB_API_TOKEN=$(curl -H "${auth_header}" "$(ddtool auth token sdm-staging --datacenter us1.ddbuild.staging.dog --http-header)" \ + auth_header=$(authanywhere) + GITLAB_API_TOKEN=$(curl -H "${auth_header}" \ "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" echo "Fetching E2E job status from: $URL" From a949af700c49649714fbd16c5465f327971d6e74 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 10 Feb 2026 15:16:18 -0500 Subject: [PATCH 20/22] no brew --- .gitlab/input_files/build.yaml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 12765a54..897fbaa3 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -231,8 +231,8 @@ e2e-test-status: tags: ["arch:amd64"] timeout: 3h script: | - brew update && brew upgrade datadog/tap/ddr && brew install authanywhere - auth_header=$(authanywhere) + curl -OL "binaries.ddbuild.io/dd-source/authanywhere/LATEST/authanywhere-linux-amd64" && mv "authanywhere-linux-amd64" /bin/authanywhere && chmod +x /bin/authanywhere + auth_header=$(authanywhere --serverless-e2e-tests) GITLAB_API_TOKEN=$(curl -H "${auth_header}" \ "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" From 0f5cbb1a20a4165897a012e7013456c19defb286 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 10 Feb 2026 15:40:41 -0500 Subject: [PATCH 21/22] remove authanywhere flag --- .gitlab/input_files/build.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 897fbaa3..59f2a48d 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -232,7 +232,7 @@ e2e-test-status: timeout: 3h script: | curl -OL "binaries.ddbuild.io/dd-source/authanywhere/LATEST/authanywhere-linux-amd64" && mv "authanywhere-linux-amd64" /bin/authanywhere && chmod +x /bin/authanywhere - auth_header=$(authanywhere --serverless-e2e-tests) + auth_header=$(authanywhere) GITLAB_API_TOKEN=$(curl -H "${auth_header}" \ "https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests") URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges" From 90bed39ce771ecfbabf259598d4ba5980286d2e0 Mon Sep 17 00:00:00 2001 From: Rithika Narayan Date: Tue, 10 Feb 2026 16:04:08 -0500 Subject: [PATCH 22/22] debugging string indexing --- .gitlab/input_files/build.yaml.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/input_files/build.yaml.tpl b/.gitlab/input_files/build.yaml.tpl index 59f2a48d..73fe7027 100644 --- a/.gitlab/input_files/build.yaml.tpl +++ b/.gitlab/input_files/build.yaml.tpl @@ -239,6 +239,7 @@ e2e-test-status: echo "Fetching E2E job status from: $URL" while true; do RESPONSE=$(curl -s --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" "$URL") + echo $RESPONSE E2E_JOB_STATUS=$(echo "$RESPONSE" | jq -r '.[] | select(.name=="e2e-test") | .downstream_pipeline.status') echo -n "E2E job status: $E2E_JOB_STATUS, " if [ "$E2E_JOB_STATUS" == "success" ]; then