Skip to content

Commit

Permalink
feat(gitlab): Rework e2e test stages (#28145)
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz authored Aug 29, 2024
1 parent 2e81eef commit 784c432
Show file tree
Hide file tree
Showing 18 changed files with 144 additions and 324 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,14 @@

/.gitlab/kitchen_* @DataDog/agent-delivery
/.gitlab/kitchen_testing/windows.yml @DataDog/agent-delivery @DataDog/windows-agent
/.gitlab/kitchen_testing/new-e2e_testing/windows.yml @DataDog/agent-delivery @DataDog/windows-agent
/.gitlab/e2e_install_packages/windows.yml @DataDog/agent-delivery @DataDog/windows-agent

/.gitlab/common/ @DataDog/agent-devx-infra
/.gitlab/common/test_infra_version.yml @DataDog/agent-devx-loops @DataDog/agent-devx-infra

/.gitlab/e2e/e2e.yml @DataDog/container-integrations @DataDog/agent-devx-loops
/.gitlab/e2e/k8s_e2e.yml @DataDog/container-integrations @DataDog/agent-devx-loops
/.gitlab/e2e/install_packages @DataDog/agent-delivery
/.gitlab/container_build/fakeintake.yml @DataDog/agent-e2e-testing @DataDog/agent-devx-loops
/.gitlab/binary_build/fakeintake.yml @DataDog/agent-e2e-testing @DataDog/agent-devx-loops

Expand Down
6 changes: 5 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include:
- .gitlab/deps_fetch/deps_fetch.yml
- .gitlab/dev_container_deploy/include.yml
- .gitlab/e2e/e2e.yml
- .gitlab/e2e_k8s/e2e_k8s.yml
- .gitlab/e2e_install_packages/include.yml
- .gitlab/e2e_pre_test/e2e_pre_test.yml
- .gitlab/functional_test/include.yml
- .gitlab/functional_test_cleanup/functional_test_cleanup.yml
Expand Down Expand Up @@ -93,6 +95,8 @@ stages:
- install_script_testing
- e2e_pre_test
- e2e
- e2e_k8s
- e2e_install_packages
- kitchen_cleanup
- functional_test
- functional_test_cleanup
Expand Down Expand Up @@ -718,7 +722,7 @@ workflow:
changes:
paths:
- tools/windows/DatadogAgentInstaller/**/*
- .gitlab/kitchen_testing/new-e2e_testing/windows.yml
- .gitlab/e2e_install_packages/windows.yml
- test/new-e2e/tests/windows/install-test/**/*
- test/new-e2e/tests/windows/domain-test/**/*
- tasks/msi.py
Expand Down
107 changes: 28 additions & 79 deletions .gitlab/e2e/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,6 @@
---
# e2e stage
# Contains jobs which runs e2e tests on our Docker images.

.k8s_e2e_template:
stage: e2e
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
dependencies: []
variables:
LANG: C.UTF-8
before_script:
- export DOCKER_REGISTRY_LOGIN=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $DOCKER_REGISTRY_LOGIN_SSM_KEY)
- export DOCKER_REGISTRY_PWD=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $DOCKER_REGISTRY_PWD_SSM_KEY)
- export DD_API_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $API_KEY_DDDEV_SSM_NAME)

.k8s-e2e-cws-cspm-init:
- set +x
- export DATADOG_AGENT_SITE=datadoghq.com
- export DATADOG_AGENT_API_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_API_KEY_SSM_NAME)
- export DATADOG_AGENT_APP_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_APP_KEY_SSM_NAME)
- export DATADOG_AGENT_RC_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_RC_KEY_SSM_NAME)

.k8s_e2e_template_needs_dev:
extends: .k8s_e2e_template
needs:
- dev_branch_multiarch-a7
- dca_dev_branch

.k8s_e2e_template_dev:
extends: .k8s_e2e_template_needs_dev
script:
- inv -e e2e-tests --agent-image=datadog/agent-dev:${CI_COMMIT_REF_SLUG}-py3 --dca-image=datadog/cluster-agent-dev:${CI_COMMIT_REF_SLUG} --argo-workflow=$ARGO_WORKFLOW

.k8s_e2e_template_dev_with_cws_cspm_init:
extends: .k8s_e2e_template_needs_dev
script:
- !reference [.k8s-e2e-cws-cspm-init]
- inv -e e2e-tests --agent-image=datadog/agent-dev:${CI_COMMIT_REF_SLUG}-py3 --dca-image=datadog/cluster-agent-dev:${CI_COMMIT_REF_SLUG} --argo-workflow=$ARGO_WORKFLOW

.k8s_e2e_template_needs_main:
extends: .k8s_e2e_template
needs:
- dev_master-a7
- dca_dev_master

.k8s_e2e_template_main_with_cws_cspm_init:
extends: .k8s_e2e_template_needs_main
script:
- !reference [.k8s-e2e-cws-cspm-init]
- inv -e e2e-tests --agent-image=datadog/agent-dev:master-py3 --dca-image=datadog/cluster-agent-dev:master --argo-workflow=$ARGO_WORKFLOW

.k8s_e2e_template_main:
extends: .k8s_e2e_template_needs_main
script:
- inv -e e2e-tests --agent-image=datadog/agent-dev:master-py3 --dca-image=datadog/cluster-agent-dev:master --argo-workflow=$ARGO_WORKFLOW

k8s-e2e-cspm-dev:
extends: .k8s_e2e_template_dev_with_cws_cspm_init
rules: !reference [.on_dev_branch_manual]
variables:
ARGO_WORKFLOW: cspm

k8s-e2e-cspm-main:
extends: .k8s_e2e_template_main_with_cws_cspm_init
rules: !reference [.on_main]
retry: 1
variables:
ARGO_WORKFLOW: cspm

k8s-e2e-otlp-dev:
extends: .k8s_e2e_template_dev
rules: !reference [.on_dev_branch_manual]
variables:
ARGO_WORKFLOW: otlp

k8s-e2e-otlp-main:
extends: .k8s_e2e_template_main
rules: !reference [.on_main]
variables:
ARGO_WORKFLOW: otlp
# Contains test jobs based on the new-e2e tests framework

.new_e2e_template:
stage: e2e
Expand Down Expand Up @@ -460,6 +382,33 @@ new-e2e-otel:
TARGETS: ./tests/otel
TEAM: otel

.new-e2e_package_signing:
variables:
TARGETS: ./tests/agent-platform/package-signing
TEAM: agent-delivery
EXTRA_PARAMS: --osversion $E2E_BRANCH_OSVERS

new-e2e-package-signing-amazonlinux-a6-x86_64:
extends:
- .new_e2e_template
- .new-e2e_amazonlinux_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

new-e2e-package-signing-debian-a7-x86_64:
extends:
- .new_e2e_template
- .new-e2e_debian_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

new-e2e-package-signing-suse-a7-x86_64:
extends:
- .new_e2e_template
- .new-e2e_suse_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

generate-flakes-finder-pipeline:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
stage: e2e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
- deploy_rpm_testing-a7_arm64

new-e2e-agent-platform-install-script-amazonlinux-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -54,7 +53,6 @@ new-e2e-agent-platform-install-script-amazonlinux-a6-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-amazonlinux-a6-arm64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -65,7 +63,6 @@ new-e2e-agent-platform-install-script-amazonlinux-a6-arm64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-amazonlinux-a7-x64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -77,7 +74,6 @@ new-e2e-agent-platform-install-script-amazonlinux-a7-x64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-amazonlinux-a7-arm64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -88,16 +84,7 @@ new-e2e-agent-platform-install-script-amazonlinux-a7-arm64:
variables:
FLAVOR: datadog-agent

new-e2e-agent-platform-package-signing-amazonlinux-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_amazonlinux_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

new-e2e-agent-platform-step-by-step-amazonlinux-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_step_by_step
Expand All @@ -110,7 +97,6 @@ new-e2e-agent-platform-step-by-step-amazonlinux-a6-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-step-by-step-amazonlinux-a6-arm64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_step_by_step
Expand All @@ -123,7 +109,6 @@ new-e2e-agent-platform-step-by-step-amazonlinux-a6-arm64:
FLAVOR: datadog-agent

new-e2e-agent-platform-step-by-step-amazonlinux-a7-x64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_step_by_step
Expand All @@ -136,7 +121,6 @@ new-e2e-agent-platform-step-by-step-amazonlinux-a7-x64:
FLAVOR: datadog-agent

new-e2e-agent-platform-step-by-step-amazonlinux-a7-arm64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_step_by_step
Expand All @@ -149,7 +133,6 @@ new-e2e-agent-platform-step-by-step-amazonlinux-a7-arm64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-upgrade7-amazonlinux-x64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade7
Expand All @@ -160,7 +143,6 @@ new-e2e-agent-platform-install-script-upgrade7-amazonlinux-x64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-upgrade6-amazonlinux-x64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade6
Expand All @@ -171,7 +153,6 @@ new-e2e-agent-platform-install-script-upgrade6-amazonlinux-x64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-upgrade7-amazonlinux-iot-agent-x64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
- deploy_rpm_testing-a7_x64

new-e2e-agent-platform-install-script-centos-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -64,7 +63,6 @@ new-e2e-agent-platform-install-script-centos-a6-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-centos-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -76,7 +74,6 @@ new-e2e-agent-platform-install-script-centos-a7-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-centos-iot-agent-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -88,7 +85,6 @@ new-e2e-agent-platform-install-script-centos-iot-agent-a7-x86_64:
FLAVOR: datadog-iot-agent

new-e2e-agent-platform-install-script-centos-dogstatsd-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -99,7 +95,6 @@ new-e2e-agent-platform-install-script-centos-dogstatsd-a7-x86_64:
FLAVOR: datadog-dogstatsd

new-e2e-agent-platform-install-script-centos-fips-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -110,7 +105,6 @@ new-e2e-agent-platform-install-script-centos-fips-a6-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-centos-fips-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -122,7 +116,6 @@ new-e2e-agent-platform-install-script-centos-fips-a7-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-centos-fips-iot-agent-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -134,7 +127,6 @@ new-e2e-agent-platform-install-script-centos-fips-iot-agent-a7-x86_64:
FLAVOR: datadog-iot-agent

new-e2e-agent-platform-install-script-centos-fips-dogstatsd-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_install_script
Expand All @@ -145,7 +137,6 @@ new-e2e-agent-platform-install-script-centos-fips-dogstatsd-a7-x86_64:
FLAVOR: datadog-dogstatsd

new-e2e-agent-platform-step-by-step-centos-a6-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_step_by_step
Expand All @@ -157,7 +148,6 @@ new-e2e-agent-platform-step-by-step-centos-a6-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-step-by-step-centos-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_step_by_step
Expand All @@ -169,7 +159,6 @@ new-e2e-agent-platform-step-by-step-centos-a7-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-upgrade6-centos-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade6
Expand All @@ -180,7 +169,6 @@ new-e2e-agent-platform-install-script-upgrade6-centos-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-upgrade7-centos-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade7
Expand All @@ -191,7 +179,6 @@ new-e2e-agent-platform-install-script-upgrade7-centos-x86_64:
FLAVOR: datadog-agent

new-e2e-agent-platform-install-script-upgrade7-centos-iot-agent-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade7
Expand All @@ -206,7 +193,6 @@ new-e2e-agent-platform-install-script-upgrade7-centos-iot-agent-x86_64:
END_MAJOR_VERSION: [7]

new-e2e-agent-platform-install-script-upgrade7-centos-fips-iot-agent-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade7
Expand All @@ -221,7 +207,6 @@ new-e2e-agent-platform-install-script-upgrade7-centos-fips-iot-agent-x86_64:
END_MAJOR_VERSION: [7]

new-e2e-agent-platform-install-script-upgrade6-centos-fips-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade6
Expand All @@ -236,7 +221,6 @@ new-e2e-agent-platform-install-script-upgrade6-centos-fips-x86_64:
END_MAJOR_VERSION: [6]

new-e2e-agent-platform-install-script-upgrade7-centos-fips-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_script_upgrade7
Expand All @@ -251,7 +235,6 @@ new-e2e-agent-platform-install-script-upgrade7-centos-fips-x86_64:
END_MAJOR_VERSION: [7]

new-e2e-agent-platform-rpm-centos6-a7-x86_64:
stage: kitchen_testing
extends:
- .new_e2e_template
- .new-e2e_rpm
Expand Down
Loading

0 comments on commit 784c432

Please sign in to comment.