diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 644af9e70c55f..46155afc84a4d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,46 +1,47 @@
---
include:
- - /.gitlab/.pre/cancel-prev-pipelines.yml
- - /.gitlab/benchmarks/include.yml
- - /.gitlab/binary_build/include.yml
- - /.gitlab/check_deploy/check_deploy.yml
- - /.gitlab/check_merge/do_not_merge.yml
- - /.gitlab/choco_build/choco_build.yml
- - /.gitlab/choco_deploy/choco_deploy.yml
- - /.gitlab/common/shared.yml
- - /.gitlab/common/pr_commenter.yml
- - /.gitlab/container_build/include.yml
- - /.gitlab/container_scan/container_scan.yml
- - /.gitlab/deploy_containers/deploy_containers.yml
- - /.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml
- - /.gitlab/deploy_dca/deploy_dca.yml
- - /.gitlab/deploy_packages/include.yml
- - /.gitlab/deps_build/deps_build.yml
- - /.gitlab/deps_fetch/deps_fetch.yml
- - /.gitlab/dev_container_deploy/include.yml
- - /.gitlab/e2e/e2e.yml
- - /.gitlab/e2e_pre_test/e2e_pre_test.yml
- - /.gitlab/functional_test/include.yml
- - /.gitlab/functional_test_cleanup/functional_test_cleanup.yml
- - /.gitlab/install_script_testing/install_script_testing.yml
- - /.gitlab/integration_test/include.yml
- - /.gitlab/internal_image_deploy/internal_image_deploy.yml
- - /.gitlab/internal_kubernetes_deploy/include.yml
- - /.gitlab/junit_upload/junit_upload.yml
- - /.gitlab/kitchen_cleanup/include.yml
- - /.gitlab/kitchen_deploy/kitchen_deploy.yml
- - /.gitlab/kitchen_testing/include.yml
- - /.gitlab/maintenance_jobs/include.yml
- - /.gitlab/notify/notify.yml
- - /.gitlab/package_build/include.yml
- - /.gitlab/packaging/include.yml
- - /.gitlab/package_deps_build/package_deps_build.yml
- - /.gitlab/pkg_metrics/pkg_metrics.yml
- - /.gitlab/post_rc_build/post_rc_tasks.yml
- - /.gitlab/setup/setup.yml
- - /.gitlab/software_composition_analysis/software_composition_analysis.yml
- - /.gitlab/source_test/include.yml
- - /.gitlab/trigger_release/trigger_release.yml
+ - .gitlab/.pre/cancel-prev-pipelines.yml
+ - .gitlab/.pre/test_gitlab_configuration.yml
+ - .gitlab/benchmarks/include.yml
+ - .gitlab/binary_build/include.yml
+ - .gitlab/check_deploy/check_deploy.yml
+ - .gitlab/check_merge/do_not_merge.yml
+ - .gitlab/choco_build/choco_build.yml
+ - .gitlab/choco_deploy/choco_deploy.yml
+ - .gitlab/common/shared.yml
+ - .gitlab/common/pr_commenter.yml
+ - .gitlab/container_build/include.yml
+ - .gitlab/container_scan/container_scan.yml
+ - .gitlab/deploy_containers/deploy_containers.yml
+ - .gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml
+ - .gitlab/deploy_dca/deploy_dca.yml
+ - .gitlab/deploy_packages/include.yml
+ - .gitlab/deps_build/deps_build.yml
+ - .gitlab/deps_fetch/deps_fetch.yml
+ - .gitlab/dev_container_deploy/include.yml
+ - .gitlab/e2e/e2e.yml
+ - .gitlab/e2e_pre_test/e2e_pre_test.yml
+ - .gitlab/functional_test/include.yml
+ - .gitlab/functional_test_cleanup/functional_test_cleanup.yml
+ - .gitlab/install_script_testing/install_script_testing.yml
+ - .gitlab/integration_test/include.yml
+ - .gitlab/internal_image_deploy/internal_image_deploy.yml
+ - .gitlab/internal_kubernetes_deploy/include.yml
+ - .gitlab/junit_upload/junit_upload.yml
+ - .gitlab/kitchen_cleanup/include.yml
+ - .gitlab/kitchen_deploy/kitchen_deploy.yml
+ - .gitlab/kitchen_testing/include.yml
+ - .gitlab/maintenance_jobs/include.yml
+ - .gitlab/notify/notify.yml
+ - .gitlab/package_build/include.yml
+ - .gitlab/packaging/include.yml
+ - .gitlab/package_deps_build/package_deps_build.yml
+ - .gitlab/pkg_metrics/pkg_metrics.yml
+ - .gitlab/post_rc_build/post_rc_tasks.yml
+ - .gitlab/setup/setup.yml
+ - .gitlab/software_composition_analysis/software_composition_analysis.yml
+ - .gitlab/source_test/include.yml
+ - .gitlab/trigger_release/trigger_release.yml
default:
retry:
@@ -1440,3 +1441,12 @@ workflow:
FAST_TESTS: "false"
- variables:
FAST_TESTS: "true"
+
+.on_gitlab_changes:
+ - !reference [.except_mergequeue]
+ - changes:
+ paths:
+ - .gitlab-ci.yml
+ - .gitlab/**/*
+ compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916
+
\ No newline at end of file
diff --git a/.gitlab/.pre/test_gitlab_configuration.yml b/.gitlab/.pre/test_gitlab_configuration.yml
new file mode 100644
index 0000000000000..fd740ffc712d9
--- /dev/null
+++ b/.gitlab/.pre/test_gitlab_configuration.yml
@@ -0,0 +1,10 @@
+test_gitlab_configuration:
+ stage: .pre
+ image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
+ tags: ["arch:amd64"]
+ rules:
+ - !reference [.on_gitlab_changes]
+ script:
+ - source /root/.bashrc
+ - export GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $GITLAB_SCHEDULER_TOKEN_SSM_NAME)
+ - inv lint-gitlab
diff --git a/.gitlab/benchmarks/include.yml b/.gitlab/benchmarks/include.yml
index 1b1308ecbe90f..03e75501e413f 100644
--- a/.gitlab/benchmarks/include.yml
+++ b/.gitlab/benchmarks/include.yml
@@ -3,5 +3,5 @@
# Contains jobs to benchmark the Agent.
include:
- - /.gitlab/benchmarks/benchmarks.yml
- - /.gitlab/benchmarks/macrobenchmarks.yml
\ No newline at end of file
+ - .gitlab/benchmarks/benchmarks.yml
+ - .gitlab/benchmarks/macrobenchmarks.yml
\ No newline at end of file
diff --git a/.gitlab/binary_build/include.yml b/.gitlab/binary_build/include.yml
index b2aeddeef6286..d8574e19963d2 100644
--- a/.gitlab/binary_build/include.yml
+++ b/.gitlab/binary_build/include.yml
@@ -3,11 +3,11 @@
# Contains jobs which build various go binaries (dogstatsd, IoT agent, cluster-agent, cluster-agent-cloudfoundry).
include:
- - /.gitlab/binary_build/cluster_agent_cloudfoundry.yml
- - /.gitlab/binary_build/cluster_agent.yml
- - /.gitlab/binary_build/cws_instrumentation.yml
- - /.gitlab/binary_build/fakeintake.yml
- - /.gitlab/binary_build/linux.yml
- - /.gitlab/binary_build/system_probe.yml
- - /.gitlab/binary_build/windows.yml
- - /.gitlab/binary_build/serverless.yml
+ - .gitlab/binary_build/cluster_agent_cloudfoundry.yml
+ - .gitlab/binary_build/cluster_agent.yml
+ - .gitlab/binary_build/cws_instrumentation.yml
+ - .gitlab/binary_build/fakeintake.yml
+ - .gitlab/binary_build/linux.yml
+ - .gitlab/binary_build/system_probe.yml
+ - .gitlab/binary_build/windows.yml
+ - .gitlab/binary_build/serverless.yml
diff --git a/.gitlab/container_build/docker_windows.yml b/.gitlab/container_build/docker_windows.yml
index 0592b8cf464bb..fdd22d1cef265 100644
--- a/.gitlab/container_build/docker_windows.yml
+++ b/.gitlab/container_build/docker_windows.yml
@@ -99,5 +99,5 @@
SERVERCORE: "-servercore"
include:
- - /.gitlab/container_build/docker_windows_agent6.yml
- - /.gitlab/container_build/docker_windows_agent7.yml
+ - .gitlab/container_build/docker_windows_agent6.yml
+ - .gitlab/container_build/docker_windows_agent7.yml
diff --git a/.gitlab/container_build/include.yml b/.gitlab/container_build/include.yml
index cc3f9e653ffe1..5ea8352b8fc62 100644
--- a/.gitlab/container_build/include.yml
+++ b/.gitlab/container_build/include.yml
@@ -3,6 +3,6 @@
# Contains jobs to build container images of the Agent.
include:
- - /.gitlab/container_build/docker_linux.yml
- - /.gitlab/container_build/docker_windows.yml
- - /.gitlab/container_build/fakeintake.yml
+ - .gitlab/container_build/docker_linux.yml
+ - .gitlab/container_build/docker_windows.yml
+ - .gitlab/container_build/fakeintake.yml
diff --git a/.gitlab/deploy_containers/deploy_containers_a6.yml b/.gitlab/deploy_containers/deploy_containers_a6.yml
index d21734d14b596..b2a4d604faf4f 100644
--- a/.gitlab/deploy_containers/deploy_containers_a6.yml
+++ b/.gitlab/deploy_containers/deploy_containers_a6.yml
@@ -6,8 +6,8 @@ stages:
- deploy_containers
include:
- - /.gitlab/common/container_publish_job_templates.yml
- - /.gitlab/deploy_containers/conditions.yml
+ - .gitlab/common/container_publish_job_templates.yml
+ - .gitlab/deploy_containers/conditions.yml
#
# Image tagging & manifest publication
diff --git a/.gitlab/deploy_containers/deploy_containers_a7.yml b/.gitlab/deploy_containers/deploy_containers_a7.yml
index bd0baf146762e..afe3512d2b00d 100644
--- a/.gitlab/deploy_containers/deploy_containers_a7.yml
+++ b/.gitlab/deploy_containers/deploy_containers_a7.yml
@@ -6,8 +6,8 @@ stages:
- deploy_containers
include:
- - /.gitlab/common/container_publish_job_templates.yml
- - /.gitlab/deploy_containers/conditions.yml
+ - .gitlab/common/container_publish_job_templates.yml
+ - .gitlab/deploy_containers/conditions.yml
#
# Image tagging & manifest publication
diff --git a/.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml b/.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml
index 6bd710bc72e78..a39113245385c 100644
--- a/.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml
+++ b/.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml
@@ -1,6 +1,6 @@
---
include:
- - /.gitlab/common/container_publish_job_templates.yml
+ - .gitlab/common/container_publish_job_templates.yml
#
# CWS Instrumentation image tagging & manifest publication
diff --git a/.gitlab/deploy_dca/deploy_dca.yml b/.gitlab/deploy_dca/deploy_dca.yml
index c1617f8ffb84c..2a639d6f9689d 100644
--- a/.gitlab/deploy_dca/deploy_dca.yml
+++ b/.gitlab/deploy_dca/deploy_dca.yml
@@ -1,6 +1,6 @@
---
include:
- - /.gitlab/common/container_publish_job_templates.yml
+ - .gitlab/common/container_publish_job_templates.yml
#
# DCA image tagging & manifest publication
diff --git a/.gitlab/deploy_packages/include.yml b/.gitlab/deploy_packages/include.yml
index 1e0f87c545751..df7cfdde05cd6 100644
--- a/.gitlab/deploy_packages/include.yml
+++ b/.gitlab/deploy_packages/include.yml
@@ -5,8 +5,8 @@
# start as soon as possible.
include:
- - /.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml
- - /.gitlab/deploy_packages/deploy_common.yml
- - /.gitlab/deploy_packages/nix.yml
- - /.gitlab/deploy_packages/windows.yml
- - /.gitlab/deploy_packages/winget.yml
+ - .gitlab/deploy_packages/cluster_agent_cloudfoundry.yml
+ - .gitlab/deploy_packages/deploy_common.yml
+ - .gitlab/deploy_packages/nix.yml
+ - .gitlab/deploy_packages/windows.yml
+ - .gitlab/deploy_packages/winget.yml
diff --git a/.gitlab/dev_container_deploy/docker_linux.yml b/.gitlab/dev_container_deploy/docker_linux.yml
index 17c9a96f50677..efab1546bb522 100644
--- a/.gitlab/dev_container_deploy/docker_linux.yml
+++ b/.gitlab/dev_container_deploy/docker_linux.yml
@@ -1,6 +1,6 @@
---
include:
- - /.gitlab/common/container_publish_job_templates.yml
+ - .gitlab/common/container_publish_job_templates.yml
dev_branch-a6:
extends: .docker_publish_job_definition
diff --git a/.gitlab/dev_container_deploy/docker_windows.yml b/.gitlab/dev_container_deploy/docker_windows.yml
index 2c2f1ca1e27ce..f188ee773d6d6 100644
--- a/.gitlab/dev_container_deploy/docker_windows.yml
+++ b/.gitlab/dev_container_deploy/docker_windows.yml
@@ -1,6 +1,6 @@
---
include:
- - /.gitlab/common/container_publish_job_templates.yml
+ - .gitlab/common/container_publish_job_templates.yml
dev_branch-a7-windows:
extends: .docker_publish_job_definition
diff --git a/.gitlab/dev_container_deploy/include.yml b/.gitlab/dev_container_deploy/include.yml
index a1456b2b097d6..1ad939f24ae46 100644
--- a/.gitlab/dev_container_deploy/include.yml
+++ b/.gitlab/dev_container_deploy/include.yml
@@ -4,6 +4,6 @@
# (in the datadog/agent-dev | datadog/dogstatsd-dev Dockerhub repos).
include:
- - /.gitlab/dev_container_deploy/docker_linux.yml
- - /.gitlab/dev_container_deploy/docker_windows.yml
- - /.gitlab/dev_container_deploy/fakeintake.yml
+ - .gitlab/dev_container_deploy/docker_linux.yml
+ - .gitlab/dev_container_deploy/docker_windows.yml
+ - .gitlab/dev_container_deploy/fakeintake.yml
diff --git a/.gitlab/functional_test/common.yml b/.gitlab/functional_test/common.yml
index 13b9500c2ff03..4a64e7aafdb31 100644
--- a/.gitlab/functional_test/common.yml
+++ b/.gitlab/functional_test/common.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
+# - .gitlab/kitchen_testing/testing.yml
.kitchen_test_system_probe:
extends:
diff --git a/.gitlab/functional_test/include.yml b/.gitlab/functional_test/include.yml
index daa2eb3299e0f..3901f4d0cb53c 100644
--- a/.gitlab/functional_test/include.yml
+++ b/.gitlab/functional_test/include.yml
@@ -3,13 +3,13 @@
# Contains jobs which run kitchen tests on the security-agent and on system-probe
include:
- - /.gitlab/functional_test/common.yml
- - /.gitlab/functional_test/security_agent.yml
- - /.gitlab/functional_test/serverless.yml
- - /.gitlab/functional_test/regression_detector.yml
- - /.gitlab/functional_test/workload_checks.yml
- - /.gitlab/functional_test/system_probe_windows.yml
- - /.gitlab/kernel_matrix_testing/common.yml
- - /.gitlab/kernel_matrix_testing/system_probe.yml
- - /.gitlab/kernel_matrix_testing/security_agent.yml
- - /.gitlab/functional_test_sysprobe/system_probe.yml
+ - .gitlab/functional_test/common.yml
+ - .gitlab/functional_test/security_agent.yml
+ - .gitlab/functional_test/serverless.yml
+ - .gitlab/functional_test/regression_detector.yml
+ - .gitlab/functional_test/workload_checks.yml
+ - .gitlab/functional_test/system_probe_windows.yml
+ - .gitlab/kernel_matrix_testing/common.yml
+ - .gitlab/kernel_matrix_testing/system_probe.yml
+ - .gitlab/kernel_matrix_testing/security_agent.yml
+ - .gitlab/functional_test_sysprobe/system_probe.yml
diff --git a/.gitlab/functional_test/security_agent.yml b/.gitlab/functional_test/security_agent.yml
index 93d9d725e5777..93b463798a732 100644
--- a/.gitlab/functional_test/security_agent.yml
+++ b/.gitlab/functional_test/security_agent.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
+# - .gitlab/kitchen_testing/testing.yml
# Expect warning: github.com/DataDog/datadog-agent/pkg/config.LoadCustom:1501 Unknown environment variable: DD_SYSTEM_PROBE_BPF_DIR
.kitchen_test_security_agent_linux:
diff --git a/.gitlab/functional_test/system_probe_windows.yml b/.gitlab/functional_test/system_probe_windows.yml
index 9a8fd3ad5ae18..5035c1f08e5d9 100644
--- a/.gitlab/functional_test/system_probe_windows.yml
+++ b/.gitlab/functional_test/system_probe_windows.yml
@@ -3,8 +3,8 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
-# - /.gitlab/functional_test/common.yml
+# - .gitlab/kitchen_testing/testing.yml
+# - .gitlab/functional_test/common.yml
kitchen_test_system_probe_windows_x64:
extends:
diff --git a/.gitlab/functional_test_cleanup/functional_test_cleanup.yml b/.gitlab/functional_test_cleanup/functional_test_cleanup.yml
index 7d2d4bbd866c5..8e73c0b1bdca1 100644
--- a/.gitlab/functional_test_cleanup/functional_test_cleanup.yml
+++ b/.gitlab/functional_test_cleanup/functional_test_cleanup.yml
@@ -6,7 +6,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_common/cleanup.yml
+# - .gitlab/kitchen_common/cleanup.yml
cleanup_kitchen_functional_test:
extends: .kitchen_cleanup_azure_common
diff --git a/.gitlab/functional_test_sysprobe/system_probe.yml b/.gitlab/functional_test_sysprobe/system_probe.yml
index 5276288d6a336..7050cf5e874b0 100644
--- a/.gitlab/functional_test_sysprobe/system_probe.yml
+++ b/.gitlab/functional_test_sysprobe/system_probe.yml
@@ -3,8 +3,8 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
-# - /.gitlab/functional_test/common.yml
+# - .gitlab/kitchen_testing/testing.yml
+# - .gitlab/functional_test/common.yml
.kitchen_test_system_probe_linux:
extends:
diff --git a/.gitlab/integration_test/include.yml b/.gitlab/integration_test/include.yml
index 3d195fbf448d7..0ebb78aea700f 100644
--- a/.gitlab/integration_test/include.yml
+++ b/.gitlab/integration_test/include.yml
@@ -3,5 +3,5 @@
# Contains jobs to run integration tests in go binaries
include:
- - /.gitlab/integration_test/dogstatsd.yml
- - /.gitlab/integration_test/windows.yml
+ - .gitlab/integration_test/dogstatsd.yml
+ - .gitlab/integration_test/windows.yml
diff --git a/.gitlab/internal_kubernetes_deploy/include.yml b/.gitlab/internal_kubernetes_deploy/include.yml
index 68f5048e62ea1..4161ee65e6f04 100644
--- a/.gitlab/internal_kubernetes_deploy/include.yml
+++ b/.gitlab/internal_kubernetes_deploy/include.yml
@@ -3,5 +3,5 @@
# Contains jobs to trigger a pipeline in our k8s-datadog-agent-ops repo
include:
- - /.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml
- - /.gitlab/internal_kubernetes_deploy/rc_kubernetes_deploy.yml
\ No newline at end of file
+ - .gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml
+ - .gitlab/internal_kubernetes_deploy/rc_kubernetes_deploy.yml
\ No newline at end of file
diff --git a/.gitlab/kitchen_cleanup/include.yml b/.gitlab/kitchen_cleanup/include.yml
index 1c2ed673e6d3f..f0a86b5fcf296 100644
--- a/.gitlab/kitchen_cleanup/include.yml
+++ b/.gitlab/kitchen_cleanup/include.yml
@@ -2,5 +2,5 @@
# kitchen_cleanup stage
# Include file for jobs which clean up kitchen resources created for Agent kitchen tests.
include:
- - /.gitlab/kitchen_cleanup/cleanup.yml
- - /.gitlab/kitchen_cleanup/kitchen_cleanup.yml
\ No newline at end of file
+ - .gitlab/kitchen_cleanup/cleanup.yml
+ - .gitlab/kitchen_cleanup/kitchen_cleanup.yml
\ No newline at end of file
diff --git a/.gitlab/kitchen_cleanup/kitchen_cleanup.yml b/.gitlab/kitchen_cleanup/kitchen_cleanup.yml
index e83a4729492aa..0cb00813aaf31 100644
--- a/.gitlab/kitchen_cleanup/kitchen_cleanup.yml
+++ b/.gitlab/kitchen_cleanup/kitchen_cleanup.yml
@@ -6,7 +6,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_common/cleanup.yml
+# - .gitlab/kitchen_common/cleanup.yml
kitchen_cleanup_azure-a6:
extends: .kitchen_cleanup_azure_common
diff --git a/.gitlab/kitchen_testing/centos.yml b/.gitlab/kitchen_testing/centos.yml
index 87c64517e31e8..7d798485eda50 100644
--- a/.gitlab/kitchen_testing/centos.yml
+++ b/.gitlab/kitchen_testing/centos.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
+# - .gitlab/kitchen_testing/testing.yml
# Kitchen: OSes
# -------------
diff --git a/.gitlab/kitchen_testing/debian.yml b/.gitlab/kitchen_testing/debian.yml
index fc1922957969d..5ac089cf50363 100644
--- a/.gitlab/kitchen_testing/debian.yml
+++ b/.gitlab/kitchen_testing/debian.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
+# - .gitlab/kitchen_testing/testing.yml
# Kitchen: OSes
# -------------
diff --git a/.gitlab/kitchen_testing/include.yml b/.gitlab/kitchen_testing/include.yml
index 21b93409b4ae3..62b7e577a6c9c 100644
--- a/.gitlab/kitchen_testing/include.yml
+++ b/.gitlab/kitchen_testing/include.yml
@@ -3,11 +3,11 @@
# Contains jobs which run kitchen tests on the Agent packages.
include:
- - /.gitlab/kitchen_testing/centos.yml
- - /.gitlab/kitchen_testing/debian.yml
- - /.gitlab/kitchen_testing/new-e2e_testing.yml
- - /.gitlab/kitchen_testing/new-e2e_testing/include.yml
- - /.gitlab/kitchen_testing/suse.yml
- - /.gitlab/kitchen_testing/testing.yml
- - /.gitlab/kitchen_testing/ubuntu.yml
- - /.gitlab/kitchen_testing/windows.yml
+ - .gitlab/kitchen_testing/centos.yml
+ - .gitlab/kitchen_testing/debian.yml
+ - .gitlab/kitchen_testing/new-e2e_testing.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/include.yml
+ - .gitlab/kitchen_testing/suse.yml
+ - .gitlab/kitchen_testing/testing.yml
+ - .gitlab/kitchen_testing/ubuntu.yml
+ - .gitlab/kitchen_testing/windows.yml
diff --git a/.gitlab/kitchen_testing/new-e2e_testing/include.yml b/.gitlab/kitchen_testing/new-e2e_testing/include.yml
index 78f6d77e5074e..30ab8be78521c 100644
--- a/.gitlab/kitchen_testing/new-e2e_testing/include.yml
+++ b/.gitlab/kitchen_testing/new-e2e_testing/include.yml
@@ -3,9 +3,9 @@
# Contains jobs which run new-e2e tests on the Agent packages.
include:
- - /.gitlab/kitchen_testing/new-e2e_testing/debian.yml
- - /.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml
- - /.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml
- - /.gitlab/kitchen_testing/new-e2e_testing/centos.yml
- - /.gitlab/kitchen_testing/new-e2e_testing/suse.yml
- - /.gitlab/kitchen_testing/new-e2e_testing/windows.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/debian.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/centos.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/suse.yml
+ - .gitlab/kitchen_testing/new-e2e_testing/windows.yml
diff --git a/.gitlab/kitchen_testing/suse.yml b/.gitlab/kitchen_testing/suse.yml
index 7a1fa74f503f2..14f1c0a52aa8e 100644
--- a/.gitlab/kitchen_testing/suse.yml
+++ b/.gitlab/kitchen_testing/suse.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
+# - .gitlab/kitchen_testing/testing.yml
# Kitchen: OSes
diff --git a/.gitlab/kitchen_testing/ubuntu.yml b/.gitlab/kitchen_testing/ubuntu.yml
index 24c91e794a4e8..3f33ebef38421 100644
--- a/.gitlab/kitchen_testing/ubuntu.yml
+++ b/.gitlab/kitchen_testing/ubuntu.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_common/testing.yml
+# - .gitlab/kitchen_common/testing.yml
# Kitchen: OSes
# -------------
diff --git a/.gitlab/kitchen_testing/windows.yml b/.gitlab/kitchen_testing/windows.yml
index 4e3ce60f9871f..587a42cea5973 100644
--- a/.gitlab/kitchen_testing/windows.yml
+++ b/.gitlab/kitchen_testing/windows.yml
@@ -3,7 +3,7 @@
# For now, the workaround is to include "common" files once in the top-level .gitlab-ci.yml file
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/28987
# include:
-# - /.gitlab/kitchen_testing/testing.yml
+# - .gitlab/kitchen_testing/testing.yml
# Kitchen: OSes
# -------------
diff --git a/.gitlab/maintenance_jobs/docker.yml b/.gitlab/maintenance_jobs/docker.yml
index af292b2e0506e..e1e5d993a1e24 100644
--- a/.gitlab/maintenance_jobs/docker.yml
+++ b/.gitlab/maintenance_jobs/docker.yml
@@ -1,6 +1,6 @@
---
include:
- - /.gitlab/common/container_publish_job_templates.yml
+ - .gitlab/common/container_publish_job_templates.yml
#
# Use these steps to revert the latest tags to a previous release
diff --git a/.gitlab/maintenance_jobs/include.yml b/.gitlab/maintenance_jobs/include.yml
index dfc155470c9bd..c8c7ddf8d2634 100644
--- a/.gitlab/maintenance_jobs/include.yml
+++ b/.gitlab/maintenance_jobs/include.yml
@@ -4,5 +4,5 @@
# as well as jobs which periodically clean up kitchen resources.
include:
- - /.gitlab/maintenance_jobs/docker.yml
- - /.gitlab/maintenance_jobs/kitchen.yml
+ - .gitlab/maintenance_jobs/docker.yml
+ - .gitlab/maintenance_jobs/kitchen.yml
diff --git a/.gitlab/package_build/include.yml b/.gitlab/package_build/include.yml
index fb9bb422bca5b..06324108c1100 100644
--- a/.gitlab/package_build/include.yml
+++ b/.gitlab/package_build/include.yml
@@ -10,9 +10,9 @@
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
include:
- - /.gitlab/package_build/deb.yml
- - /.gitlab/package_build/dmg.yml
- - /.gitlab/package_build/remote_updater.yml
- - /.gitlab/package_build/rpm.yml
- - /.gitlab/package_build/suse_rpm.yml
- - /.gitlab/package_build/windows.yml
+ - .gitlab/package_build/deb.yml
+ - .gitlab/package_build/dmg.yml
+ - .gitlab/package_build/remote_updater.yml
+ - .gitlab/package_build/rpm.yml
+ - .gitlab/package_build/suse_rpm.yml
+ - .gitlab/package_build/windows.yml
diff --git a/.gitlab/packaging/include.yml b/.gitlab/packaging/include.yml
index 30d6f150c982c..c3417ade7a1ad 100644
--- a/.gitlab/packaging/include.yml
+++ b/.gitlab/packaging/include.yml
@@ -1,2 +1,2 @@
include:
- - /.gitlab/packaging/oci.yml
+ - .gitlab/packaging/oci.yml
diff --git a/.gitlab/source_test/include.yml b/.gitlab/source_test/include.yml
index e31cc06505487..7dce6c67c9a5d 100644
--- a/.gitlab/source_test/include.yml
+++ b/.gitlab/source_test/include.yml
@@ -4,11 +4,11 @@
# security scans & go.mod checks.
include:
- - /.gitlab/source_test/ebpf.yml
- - /.gitlab/source_test/linux.yml
- - /.gitlab/source_test/macos.yml
- - /.gitlab/source_test/windows.yml
- - /.gitlab/source_test/go_generate_check.yml
- - /.gitlab/source_test/slack.yml
- - /.gitlab/source_test/golang_deps_diff.yml
- - /.gitlab/source_test/notify.yml
+ - .gitlab/source_test/ebpf.yml
+ - .gitlab/source_test/linux.yml
+ - .gitlab/source_test/macos.yml
+ - .gitlab/source_test/windows.yml
+ - .gitlab/source_test/go_generate_check.yml
+ - .gitlab/source_test/slack.yml
+ - .gitlab/source_test/golang_deps_diff.yml
+ - .gitlab/source_test/notify.yml
diff --git a/tasks/__init__.py b/tasks/__init__.py
index 0f5e9643ced4f..fb237e71e636f 100644
--- a/tasks/__init__.py
+++ b/tasks/__init__.py
@@ -69,7 +69,7 @@
from tasks.install_tasks import download_tools, install_shellcheck, install_tools
from tasks.junit_tasks import junit_upload
from tasks.libs.go_workspaces import handle_go_work
-from tasks.linter_tasks import lint_copyrights, lint_filenames, lint_go, lint_python
+from tasks.linter_tasks import gitlab_ci, lint_copyrights, lint_filenames, lint_go, lint_python
from tasks.pr_checks import lint_releasenote
from tasks.show_linters_issues import show_linters_issues
from tasks.unit_tests import invoke_unit_tests
@@ -97,6 +97,7 @@
ns.add_task(lint_filenames)
ns.add_task(lint_python)
ns.add_task(lint_go)
+ns.add_task(gitlab_ci, "lint-gitlab")
ns.add_task(show_linters_issues)
ns.add_task(go_version)
ns.add_task(update_go)
diff --git a/tasks/libs/common/gitlab.py b/tasks/libs/common/gitlab.py
index ba6b8c81ab6c4..533ab9b31c2ad 100644
--- a/tasks/libs/common/gitlab.py
+++ b/tasks/libs/common/gitlab.py
@@ -2,8 +2,10 @@
import os
import platform
import subprocess
+from collections import UserList
from urllib.parse import quote
+import yaml
from invoke.exceptions import Exit
from tasks.libs.common.remote_api import APIError, RemoteAPI
@@ -288,6 +290,15 @@ def find_tag(self, tag_name):
else:
raise e
+ def lint(self, configuration):
+ """
+ Lint a gitlab-ci configuration.
+ """
+ path = f"/projects/{quote(self.project_name, safe='')}/ci/lint?dry_run=true&include_jobs=true"
+ headers = {"Content-Type": "application/json"}
+ data = {"content": configuration}
+ return self.make_request(path, headers=headers, data=data, json_input=True, json_output=True)
+
def make_request(
self, path, headers=None, data=None, json_input=False, json_output=False, stream_output=False, method=None
):
@@ -353,3 +364,175 @@ def get_gitlab_bot_token():
)
raise Exit(code=1)
return os.environ["GITLAB_BOT_TOKEN"]
+
+
+class ReferenceTag(yaml.YAMLObject):
+ """
+ Custom yaml tag to handle references in gitlab-ci configuration
+ """
+
+ yaml_tag = u'!reference'
+
+ def __init__(self, references):
+ self.references = references
+
+ @classmethod
+ def from_yaml(cls, loader, node):
+ return UserList(loader.construct_sequence(node))
+
+ @classmethod
+ def to_yaml(cls, dumper, data):
+ return dumper.represent_sequence(cls.yaml_tag, data.data, flow_style=True)
+
+
+def generate_gitlab_full_configuration(input_file, context=None, compare_to=None):
+ """
+ Generate a full gitlab-ci configuration by resolving all includes
+ """
+ # Update loader/dumper to handle !reference tag
+ yaml.SafeLoader.add_constructor(ReferenceTag.yaml_tag, ReferenceTag.from_yaml)
+ yaml.SafeDumper.add_representer(UserList, ReferenceTag.to_yaml)
+
+ yaml_contents = []
+ read_includes(input_file, yaml_contents)
+ full_configuration = {}
+ for yaml_file in yaml_contents:
+ full_configuration.update(yaml_file)
+ # Override some variables with a dedicated context
+ if context:
+ full_configuration["variables"].update(context)
+ if compare_to:
+ for value in full_configuration.values():
+ if (
+ isinstance(value, dict)
+ and "changes" in value
+ and isinstance(value["changes"], dict)
+ and "compare_to" in value["changes"]
+ ):
+ value["changes"]["compare_to"] = compare_to
+ elif isinstance(value, list):
+ for v in value:
+ if (
+ isinstance(v, dict)
+ and "changes" in v
+ and isinstance(v["changes"], dict)
+ and "compare_to" in v["changes"]
+ ):
+ v["changes"]["compare_to"] = compare_to
+ return yaml.safe_dump(full_configuration)
+
+
+def read_includes(yaml_file, includes):
+ """
+ Recursive method to read all includes from yaml files and store them in a list
+ """
+ current_file = read_content(yaml_file)
+ if 'include' not in current_file:
+ includes.append(current_file)
+ else:
+ for include in current_file['include']:
+ read_includes(include, includes)
+ del current_file['include']
+ includes.append(current_file)
+
+
+def read_content(file_path):
+ """
+ Read the content of a file, either from a local file or from an http endpoint
+ """
+ content = None
+ if file_path.startswith('http'):
+ import requests
+
+ response = requests.get(file_path)
+ response.raise_for_status()
+ content = response.text
+ else:
+ with open(file_path) as f:
+ content = f.read()
+ return yaml.safe_load(content)
+
+
+def get_preset_contexts(required_tests):
+ possible_tests = ["all", "main", "release", "mq"]
+ required_tests = required_tests.casefold().split(",")
+ if set(required_tests) | set(possible_tests) != set(possible_tests):
+ raise Exit(f"Invalid test required: {required_tests} must contain only values from {possible_tests}", 1)
+ main_contexts = [
+ ("BUCKET_BRANCH", ["nightly"]), # ["dev", "nightly", "beta", "stable", "oldnightly"]
+ ("CI_COMMIT_BRANCH", ["main"]), # ["main", "mq-working-branch-main", "7.42.x", "any/name"]
+ ("CI_COMMIT_TAG", [""]), # ["", "1.2.3-rc.4", "6.6.6"]
+ ("CI_PIPELINE_SOURCE", ["pipeline"]), # ["trigger", "pipeline", "schedule"]
+ ("DEPLOY_AGENT", ["true"]),
+ ("RUN_ALL_BUILDS", ["true"]),
+ ("RUN_E2E_TESTS", ["auto"]),
+ ("RUN_KMT_TESTS", ["on"]),
+ ("RUN_UNIT_TESTS", ["on"]),
+ ("TESTING_CLEANUP", ["true"]),
+ ]
+ release_contexts = [
+ ("BUCKET_BRANCH", ["stable"]),
+ ("CI_COMMIT_BRANCH", ["7.42.x"]),
+ ("CI_COMMIT_TAG", ["3.2.1", "1.2.3-rc.4"]),
+ ("CI_PIPELINE_SOURCE", ["schedule"]),
+ ("DEPLOY_AGENT", ["true"]),
+ ("RUN_ALL_BUILDS", ["true"]),
+ ("RUN_E2E_TESTS", ["auto"]),
+ ("RUN_KMT_TESTS", ["on"]),
+ ("RUN_UNIT_TESTS", ["on"]),
+ ("TESTING_CLEANUP", ["true"]),
+ ]
+ mq_contexts = [
+ ("BUCKET_BRANCH", ["dev"]),
+ ("CI_COMMIT_BRANCH", ["mq-working-branch-main"]),
+ ("CI_PIPELINE_SOURCE", ["pipeline"]),
+ ("DEPLOY_AGENT", ["false"]),
+ ("RUN_ALL_BUILDS", ["false"]),
+ ("RUN_E2E_TESTS", ["auto"]),
+ ("RUN_KMT_TESTS", ["off"]),
+ ("RUN_UNIT_TESTS", ["off"]),
+ ("TESTING_CLEANUP", ["false"]),
+ ]
+ all_contexts = []
+ for test in required_tests:
+ if test in ["all", "main"]:
+ generate_contexts(main_contexts, [], all_contexts)
+ if test in ["all", "release"]:
+ generate_contexts(release_contexts, [], all_contexts)
+ if test in ["all", "mq"]:
+ generate_contexts(mq_contexts, [], all_contexts)
+ return all_contexts
+
+
+def generate_contexts(contexts, context, all_contexts):
+ """
+ Recursive method to generate all possible contexts from a list of tuples
+ """
+ if len(contexts) == 0:
+ all_contexts.append(context[:])
+ return
+ for value in contexts[0][1]:
+ context.append((contexts[0][0], value))
+ generate_contexts(contexts[1:], context, all_contexts)
+ context.pop()
+
+
+def load_context(context):
+ """
+ Load a context either from a yaml file or from a json string
+ """
+ if os.path.exists(context):
+ with open(context) as f:
+ y = yaml.safe_load(f)
+ if "variables" not in y:
+ raise Exit(
+ f"Invalid context file: {context}, missing 'variables' key. Input file must be similar to tasks/unit-tests/testdata/gitlab_main_context_template.yml",
+ 1,
+ )
+ return [[(k, v) for k, v in y["variables"].items()]]
+ else:
+ try:
+ j = json.loads(context)
+ return [[(k, v) for k, v in j.items()]]
+ except json.JSONDecodeError:
+ raise Exit(f"Invalid context: {context}, must be a valid json, or a path to a yaml file", 1)
diff --git a/tasks/linter_tasks.py b/tasks/linter_tasks.py
index bee3afda4c2d6..7873b593a02c4 100644
--- a/tasks/linter_tasks.py
+++ b/tasks/linter_tasks.py
@@ -1,3 +1,4 @@
+import re
import sys
from collections import defaultdict
from typing import List
@@ -8,6 +9,13 @@
from tasks.flavor import AgentFlavor
from tasks.go import run_golangci_lint
from tasks.libs.common.check_tools_version import check_tools_version
+from tasks.libs.common.gitlab import (
+ Gitlab,
+ generate_gitlab_full_configuration,
+ get_gitlab_token,
+ get_preset_contexts,
+ load_context,
+)
from tasks.libs.common.utils import DEFAULT_BRANCH, color_message
from tasks.libs.copyright import CopyrightLinter
from tasks.modules import GoModule
@@ -237,3 +245,107 @@ def command(module_results, module: GoModule, module_result):
module_results.append(module_result)
return test_core(modules, flavor, ModuleLintResult, "golangci_lint", command, headless_mode=headless_mode)
+
+
+@task
+def list_ssm_parameters(_):
+ """
+ List all SSM parameters used in the datadog-agent repository.
+ """
+
+ ssm_owner = re.compile(r"^[A-Z].*_SSM_(NAME|KEY): (?P[^ ]+) +# +(?P.+)$")
+ ssm_params = defaultdict(list)
+ with open(".gitlab-ci.yml") as f:
+ for line in f:
+ m = ssm_owner.match(line.strip())
+ if m:
+ ssm_params[m.group("owner")].append(m.group("param"))
+ for owner in ssm_params.keys():
+ print(f"Owner:{owner}")
+ for param in ssm_params[owner]:
+ print(f" - {param}")
+
+
+@task
+def ssm_parameters(ctx):
+ """
+ Lint SSM parameters in the datadog-agent repository.
+ """
+ lint_folders = [".circleci", ".github", ".gitlab", "tasks", "test"]
+ repo_files = ctx.run("git ls-files", hide="both")
+ error_files = []
+ for file in repo_files.stdout.split("\n"):
+ if any(file.startswith(f) for f in lint_folders):
+ matched = is_get_parameter_call(file)
+ if matched:
+ error_files.append(matched)
+ if error_files:
+ print("The following files contain unexpected syntax for aws ssm get-parameter:")
+ for file in error_files:
+ print(f" - {file}")
+ raise Exit(code=1)
+
+
+class SSMParameterCall:
+ def __init__(self, file, line_nb, with_wrapper=False, with_env_var=False):
+ self.file = file
+ self.line_nb = line_nb
+ self.with_wrapper = with_wrapper
+ self.with_env_var = with_env_var
+
+ def __str__(self):
+ message = ""
+ if not self.with_wrapper:
+ message += "Please use the dedicated `aws_ssm_get_wrapper.(sh|ps1)`."
+ if not self.with_env_var:
+ message += " Save your parameter name as environment variable in .gitlab-ci.yml file."
+ return f"{self.file}:{self.line_nb+1}. {message}"
+
+ def __repr__(self):
+ return str(self)
+
+
+def is_get_parameter_call(file):
+ ssm_get = re.compile(r"^.+ssm.get.+$")
+ aws_ssm_call = re.compile(r"^.+ssm get-parameter.+--name +(?P[^ ]+).*$")
+ ssm_wrapper_call = re.compile(r"^.+aws_ssm_get_wrapper.(sh|ps1) +(?P[^ )]+).*$")
+ with open(file) as f:
+ try:
+ for nb, line in enumerate(f):
+ is_ssm_get = ssm_get.match(line.strip())
+ if is_ssm_get:
+ m = aws_ssm_call.match(line.strip())
+ if m:
+ return SSMParameterCall(
+ file, nb, with_wrapper=False, with_env_var=m.group("param").startswith("$")
+ )
+ m = ssm_wrapper_call.match(line.strip())
+ if m and not m.group("param").startswith("$"):
+ return SSMParameterCall(file, nb, with_wrapper=True, with_env_var=False)
+ except UnicodeDecodeError:
+ pass
+
+
+@task
+def gitlab_ci(_, test="all", custom_context=None):
+ """
+ Lint Gitlab CI files in the datadog-agent repository.
+ """
+ all_contexts = []
+ if custom_context:
+ all_contexts = load_context(custom_context)
+ else:
+ all_contexts = get_preset_contexts(test)
+ print(f"We will tests {len(all_contexts)} contexts.")
+ for context in all_contexts:
+ print("Test gitlab configuration with context: ", context)
+ config = generate_gitlab_full_configuration(".gitlab-ci.yml", dict(context))
+ gitlab = Gitlab(api_token=get_gitlab_token())
+ res = gitlab.lint(config)
+ status = color_message("valid", "green") if res["valid"] else color_message("invalid", "red")
+ print(f"Config is {status}")
+ if len(res["warnings"]) > 0:
+ print(color_message(f"Warnings: {res['warnings']}", "orange"), file=sys.stderr)
+ if not res["valid"]:
+ print(color_message(f"Errors: {res['errors']}", "red"), file=sys.stderr)
+ raise Exit(code=1)
diff --git a/tasks/unit-tests/testdata/codeowners.txt b/tasks/unit-tests/testdata/codeowners.txt
index ff398c0a09003..27879add4ff60 100644
--- a/tasks/unit-tests/testdata/codeowners.txt
+++ b/tasks/unit-tests/testdata/codeowners.txt
@@ -1,4 +1,4 @@
/.* @DataDog/agent-platform
/*.md @DataDog/agent-platform @DataDog/documentation
-/.gitlab/ @DataDog/agent-platform
-/.gitlab/security.yml @DataDog/agent-security
+.gitlab/ @DataDog/agent-platform
+.gitlab/security.yml @DataDog/agent-security
diff --git a/tasks/unit-tests/testdata/fake_gitlab-ci.yml b/tasks/unit-tests/testdata/fake_gitlab-ci.yml
index 27967ef7c523e..7d233a71e0a10 100644
--- a/tasks/unit-tests/testdata/fake_gitlab-ci.yml
+++ b/tasks/unit-tests/testdata/fake_gitlab-ci.yml
@@ -1,50 +1,50 @@
---
include:
- - /.gitlab/setup.yml
- - /.gitlab/shared.yml
- - /.gitlab/maintenance_jobs.yml
- - /.gitlab/deps_build.yml
- - /.gitlab/package_deps_build.yml
- - /.gitlab/deps_fetch.yml
- - /.gitlab/source_test.yml
- - /.gitlab/source_test_junit_upload.yml
- - /.gitlab/binary_build.yml
- - /.gitlab/cancel-prev-pipelines.yml
- - /.gitlab/do_not_merge.yml
- - /.gitlab/integration_test.yml
- - /.gitlab/package_build.yml
- - /.gitlab/kitchen_deploy.yml
- - /.gitlab/kitchen_testing.yml
- - /.gitlab/kitchen_tests_upload.yml
- - /.gitlab/new-e2e_testing.yml
- - /.gitlab/new-e2e_common/testing.yml
- - /.gitlab/install_script_testing.yml
- - /.gitlab/pkg_metrics.yml
- - /.gitlab/container_build.yml
- - /.gitlab/container_scan.yml
- - /.gitlab/check_deploy.yml
- - /.gitlab/dev_container_deploy.yml
- - /.gitlab/deploy_common.yml
- - /.gitlab/deploy_containers.yml
- - /.gitlab/deploy_packages.yml
- - /.gitlab/deploy_dca.yml
- - /.gitlab/choco_build.yml
- - /.gitlab/choco_deploy.yml
- - /.gitlab/internal_image_deploy.yml
- - /.gitlab/trigger_release.yml
- - /.gitlab/e2e.yml
- - /.gitlab/e2e_test_junit_upload.yml
- - /.gitlab/fakeintake.yml
- - /.gitlab/kitchen_cleanup.yml
- - /.gitlab/functional_test.yml
- - /.gitlab/functional_test_cleanup.yml
- - /.gitlab/functional_test_junit_upload.yml
- - /.gitlab/internal_kubernetes_deploy.yml
- - /.gitlab/notify.yml
- - /.gitlab/kitchen_common/cleanup.yml
- - /.gitlab/kitchen_common/testing.yml
- - /.gitlab/benchmarks/benchmarks.yml
- - /.gitlab/benchmarks/macrobenchmarks.yml
+ - .gitlab/setup.yml
+ - .gitlab/shared.yml
+ - .gitlab/maintenance_jobs.yml
+ - .gitlab/deps_build.yml
+ - .gitlab/package_deps_build.yml
+ - .gitlab/deps_fetch.yml
+ - .gitlab/source_test.yml
+ - .gitlab/source_test_junit_upload.yml
+ - .gitlab/binary_build.yml
+ - .gitlab/cancel-prev-pipelines.yml
+ - .gitlab/do_not_merge.yml
+ - .gitlab/integration_test.yml
+ - .gitlab/package_build.yml
+ - .gitlab/kitchen_deploy.yml
+ - .gitlab/kitchen_testing.yml
+ - .gitlab/kitchen_tests_upload.yml
+ - .gitlab/new-e2e_testing.yml
+ - .gitlab/new-e2e_common/testing.yml
+ - .gitlab/install_script_testing.yml
+ - .gitlab/pkg_metrics.yml
+ - .gitlab/container_build.yml
+ - .gitlab/container_scan.yml
+ - .gitlab/check_deploy.yml
+ - .gitlab/dev_container_deploy.yml
+ - .gitlab/deploy_common.yml
+ - .gitlab/deploy_containers.yml
+ - .gitlab/deploy_packages.yml
+ - .gitlab/deploy_dca.yml
+ - .gitlab/choco_build.yml
+ - .gitlab/choco_deploy.yml
+ - .gitlab/internal_image_deploy.yml
+ - .gitlab/trigger_release.yml
+ - .gitlab/e2e.yml
+ - .gitlab/e2e_test_junit_upload.yml
+ - .gitlab/fakeintake.yml
+ - .gitlab/kitchen_cleanup.yml
+ - .gitlab/functional_test.yml
+ - .gitlab/functional_test_cleanup.yml
+ - .gitlab/functional_test_junit_upload.yml
+ - .gitlab/internal_kubernetes_deploy.yml
+ - .gitlab/notify.yml
+ - .gitlab/kitchen_common/cleanup.yml
+ - .gitlab/kitchen_common/testing.yml
+ - .gitlab/benchmarks/benchmarks.yml
+ - .gitlab/benchmarks/macrobenchmarks.yml
default:
retry:
diff --git a/tasks/unit-tests/testdata/gitlab_main_context_template.yml b/tasks/unit-tests/testdata/gitlab_main_context_template.yml
new file mode 100644
index 0000000000000..eeac1dbd391bd
--- /dev/null
+++ b/tasks/unit-tests/testdata/gitlab_main_context_template.yml
@@ -0,0 +1,11 @@
+---
+variables:
+ BUCKET_BRANCH: 'dev'
+ CI_COMMIT_BRANCH: 'main'
+ CI_COMMIT_TAG: ''
+ CI_PIPELINE_SOURCE: 'pipeline'
+ DEPLOY_AGENT: 'true'
+ RUN_ALL_BUILDS: 'true'
+ RUN_E2E_TESTS: 'on'
+ RUN_KMT_TESTS: 'on'
+ RUN_UNIT_TESTS: 'true'
diff --git a/tasks/unit-tests/testdata/gitlab_mq_context_template.yml b/tasks/unit-tests/testdata/gitlab_mq_context_template.yml
new file mode 100644
index 0000000000000..29c05d73fcfb9
--- /dev/null
+++ b/tasks/unit-tests/testdata/gitlab_mq_context_template.yml
@@ -0,0 +1,10 @@
+---
+variables:
+ BUCKET_BRANCH: 'dev'
+ CI_COMMIT_BRANCH: 'mq-working-branch-main'
+ CI_PIPELINE_SOURCE: 'pipeline'
+ DEPLOY_AGENT: 'false'
+ RUN_ALL_BUILDS: 'false'
+ RUN_E2E_TESTS: 'auto'
+ RUN_KMT_TESTS: 'off'
+ RUN_UNIT_TESTS: 'off'