File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,13 +232,20 @@ e2e-test-status:
232232 timeout: 3h
233233 script: |
234234 curl -OL " binaries.ddbuild.io/dd-source/authanywhere/LATEST/authanywhere-linux-amd64" && mv " authanywhere-linux-amd64" /bin/authanywhere && chmod +x /bin/authanywhere
235- auth_header= $ (authanywhere --audience rapid-devex-ci)
236- GITLAB_API_TOKEN= $ (curl -H " ${auth_header}" \
237- " https://bti-ci-api.us1.ddbuild.staging.dog/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests" )
235+ BTI_CI_API_TOKEN= $ (authanywhere --audience rapid-devex-ci)
236+ BTI_RESPONSE= $ (curl --silent --request GET \
237+ --header " $BTI_CI_API_TOKEN" \
238+ --header " Content-Type: application/vnd.api+json" \
239+ " https://bti-ci-api.us1.ddbuild.io/internal/ci/gitlab/token?owner=DataDog&repository=serverless-e2e-tests" )
240+ GITLAB_TOKEN= $ (echo " $BTI_RESPONSE" | jq -r '.token // empty')
241+ if [ -z " $GITLAB_TOKEN" ]; then
242+ echo " Error: Failed to get GitLab token from BTI CI API. Response: $BTI_RESPONSE"
243+ exit 1
244+ fi
238245 URL= " ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/bridges"
239246 echo " Fetching E2E job status from: $URL"
240247 while true; do
241- RESPONSE= $ (curl -s " $URL" )
248+ RESPONSE= $ (curl -s --header " PRIVATE-TOKEN: ${GITLAB_TOKEN} " " $URL" )
242249 echo $RESPONSE
243250 E2E_JOB_STATUS= $ (echo " $RESPONSE" | jq -r '. [] | select(.name == " e2e-test" ) | .downstream_pipeline.status ')
244251 echo -n " E2E job status: $E2E_JOB_STATUS, "
You can’t perform that action at this time.
0 commit comments