diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f36a781..417398ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,6 @@ +variables: + SKIP_E2E_TESTS: "false" + stages: - pre - build @@ -25,5 +28,7 @@ build-layers: - artifact: ci/build-pipeline.yaml job: generator strategy: depend + forward: + pipeline_variables: true rules: - - when: on_success + - when: on_success \ No newline at end of file diff --git a/ci/input_files/build.yaml.tpl b/ci/input_files/build.yaml.tpl index 599160fb..10ff9984 100644 --- a/ci/input_files/build.yaml.tpl +++ b/ci/input_files/build.yaml.tpl @@ -142,6 +142,8 @@ publish-layer-{{ $environment_name }} ({{ $runtime.name }}-{{ $runtime.arch }}): tags: ["arch:amd64"] image: registry.ddbuild.io/images/docker:20.10-py3 rules: + - if: '$SKIP_E2E_TESTS == "true"' + when: never - if: '"{{ $environment_name }}" == "sandbox" && $REGION == "{{ $e2e_region }}" && "{{ $runtime.arch }}" == "amd64"' when: on_success - if: '"{{ $environment_name }}" == "sandbox"' @@ -247,6 +249,10 @@ e2e-test: trigger: project: DataDog/serverless-e2e-tests strategy: depend + rules: + - if: '$SKIP_E2E_TESTS == "true"' + when: never + - when: on_success variables: LANGUAGES_SUBSET: python # These env vars are inherited from the dotenv reports of the publish-layer jobs @@ -267,6 +273,10 @@ e2e-test-status: image: registry.ddbuild.io/images/docker:20.10-py3 tags: ["arch:amd64"] timeout: 3h + rules: + - if: '$SKIP_E2E_TESTS == "true"' + when: never + - when: on_success 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"