From d85fe92cbb505cb767a6c4308ae9b6626ee2a457 Mon Sep 17 00:00:00 2001 From: Nicolas Schweitzer Date: Wed, 10 Apr 2024 15:58:09 +0200 Subject: [PATCH 1/4] feat(ci): Add the linter gitlab (#24450) * feat(ci): Add the linter gitlab * Add the linter to pre-commit * Add the linter to the CI * codereview: update logging, comment and file format --- .gitlab-ci.yml | 10 + .gitlab/.pre/test_gitlab_configuration.yml | 10 + tasks/libs/common/gitlab.py | 183 ++++++++++++++++++ tasks/linter_tasks.py | 112 +++++++++++ .../testdata/gitlab_main_context_template.yml | 11 ++ .../testdata/gitlab_mq_context_template.yml | 10 + 6 files changed, 336 insertions(+) create mode 100644 .gitlab/.pre/test_gitlab_configuration.yml create mode 100644 tasks/unit-tests/testdata/gitlab_main_context_template.yml create mode 100644 tasks/unit-tests/testdata/gitlab_mq_context_template.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 644af9e70c55f..ac27df88d75c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ --- include: - /.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 @@ -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/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/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' From 9bf11cedc014cf1ead6820be3d2f6a15046c3475 Mon Sep 17 00:00:00 2001 From: Nicolas Schweitzer Date: Mon, 14 Oct 2024 14:35:02 +0200 Subject: [PATCH 2/4] Add the configuration check and validate configuration --- .gitlab-ci.yml | 230 +++++------------- .gitlab/benchmarks/include.yml | 4 +- .gitlab/binary_build/cluster_agent.yml | 4 +- .gitlab/binary_build/cws_instrumentation.yml | 4 +- .gitlab/binary_build/include.yml | 16 +- .gitlab/container_build/docker_windows.yml | 3 +- .gitlab/container_build/include.yml | 6 +- .gitlab/container_scan/container_scan.yml | 8 +- .../deploy_containers_a6.yml | 4 +- .../deploy_cws_instrumentation.yml | 12 +- .gitlab/deploy_dca/deploy_dca.yml | 16 +- .../cluster_agent_cloudfoundry.yml | 2 +- .gitlab/deploy_packages/deploy_common.yml | 28 +-- .gitlab/deploy_packages/include.yml | 10 +- .gitlab/dev_container_deploy/docker_linux.yml | 10 +- .../dev_container_deploy/docker_windows.yml | 2 +- .gitlab/dev_container_deploy/include.yml | 6 +- .gitlab/e2e/e2e.yml | 2 +- .gitlab/functional_test/common.yml | 2 +- .gitlab/functional_test/include.yml | 20 +- .gitlab/functional_test/security_agent.yml | 2 +- .gitlab/integration_test/include.yml | 4 +- .../internal_image_deploy.yml | 10 +- .../internal_kubernetes_deploy/include.yml | 4 +- .../internal_kubernetes_deploy.yml | 4 +- .gitlab/kitchen_cleanup/include.yml | 4 +- .gitlab/kitchen_deploy/kitchen_deploy.yml | 55 ++--- .gitlab/kitchen_testing/include.yml | 16 +- .gitlab/kitchen_testing/new-e2e_testing.yml | 2 +- .../new-e2e_testing/amazonlinux.yml | 8 +- .../new-e2e_testing/centos.yml | 32 +-- .../new-e2e_testing/debian.yml | 4 +- .../new-e2e_testing/include.yml | 12 +- .../kitchen_testing/new-e2e_testing/suse.yml | 6 +- .../new-e2e_testing/ubuntu.yml | 4 +- .../new-e2e_testing/windows.yml | 6 +- .gitlab/kitchen_testing/windows.yml | 7 +- .gitlab/maintenance_jobs/docker.yml | 2 +- .gitlab/maintenance_jobs/include.yml | 4 +- .gitlab/package_build/include.yml | 11 +- .gitlab/packaging/include.yml | 2 +- .gitlab/source_test/include.yml | 16 +- tasks/__init__.py | 3 +- 43 files changed, 209 insertions(+), 398 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac27df88d75c5..00c3b7b46e4a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,47 +1,45 @@ --- include: - - /.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 + - .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/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: @@ -470,22 +468,11 @@ workflow: when: never - <<: *if_main_branch -.on_main_a7: - - <<: *if_not_version_7 - when: never - - <<: *if_main_branch - -.on_tag_or_a7: +.on_tag_or_a6: - <<: *if_mergequeue when: never - <<: *if_tagged_commit - - <<: *if_version_7 - -.on_tag_or_a7_all_builds: - - <<: *if_not_run_all_builds - when: never - - <<: *if_tagged_commit - - <<: *if_version_7 + - <<: *if_version_6 .on_deploy: - <<: *if_deploy @@ -534,103 +521,10 @@ workflow: AGENT_REPOSITORY: agent IMG_REGISTRIES: public -# Same as on_deploy_a6_manual, except the job would not run on pipelines -# using beta branch, it would only run for the final release. -.on_deploy_a6_manual_final: - - <<: *if_not_version_6 - when: never - - <<: *if_not_deploy - when: never - - <<: *if_deploy_on_beta_repo_branch - when: never - - <<: *if_not_stable_or_beta_repo_branch - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: agent-dev - IMG_REGISTRIES: dev - - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: agent - IMG_REGISTRIES: public - -# This rule is a variation of on_deploy_a6_manual where -# the job is usually run manually, except when the pipeline -# builds an RC: in this case, the job is run automatically. -# This is done to reduce the number of manual steps that have -# to be done when creating RCs. -.on_deploy_a6_manual_auto_on_rc: - - <<: *if_not_version_6 - when: never - - <<: *if_not_deploy - when: never - - <<: *if_not_stable_or_beta_repo_branch - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: agent-dev - IMG_REGISTRIES: dev - - <<: *if_rc_tag_on_beta_repo_branch - when: on_success - variables: - AGENT_REPOSITORY: agent - DSD_REPOSITORY: dogstatsd - IMG_REGISTRIES: public - - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: agent - IMG_REGISTRIES: public - -.on_deploy_a7: - - <<: *if_not_version_7 - when: never - - <<: *if_deploy - -.on_deploy_a7_failure: - - <<: *if_not_version_7 - when: never - - <<: *if_deploy - when: on_failure - -.on_deploy_a7_rc: - - <<: *if_not_version_7 - when: never - - <<: *if_not_deploy - when: never - - <<: *if_rc_tag_on_beta_repo_branch - when: on_success - variables: - AGENT_REPOSITORY: agent - DSD_REPOSITORY: dogstatsd - IMG_REGISTRIES: public - -.on_deploy_a7_manual: - - <<: *if_not_version_7 - when: never - - <<: *if_not_deploy - when: never - - <<: *if_not_stable_or_beta_repo_branch - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: agent-dev - DSD_REPOSITORY: dogstatsd-dev - IMG_REGISTRIES: dev - - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: agent - DSD_REPOSITORY: dogstatsd - IMG_REGISTRIES: public - # rule to trigger job for internal image deployment if deploy is set or # manually if not -.on_deploy_a7_internal_or_manual: - - <<: *if_mergequeue - when: never - - <<: *if_not_version_7 +.on_deploy_a6_internal_or_manual: + - <<: *if_not_version_6 when: never - <<: *if_deploy variables: @@ -640,10 +534,10 @@ workflow: variables: RELEASE_PROD: "false" -# Same as on_deploy_a7_manual, except the job would not run on pipelines +# Same as on_deploy_a6_manual, except the job would not run on pipelines # using beta branch, it would only run for the final release. -.on_deploy_a7_manual_final: - - <<: *if_not_version_7 +.on_deploy_a6_manual_final: + - <<: *if_not_version_6 when: never - <<: *if_not_deploy when: never @@ -654,22 +548,20 @@ workflow: allow_failure: true variables: AGENT_REPOSITORY: agent-dev - DSD_REPOSITORY: dogstatsd-dev IMG_REGISTRIES: dev - when: manual allow_failure: true variables: AGENT_REPOSITORY: agent - DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public -# This rule is a variation of on_deploy_a7_manual where +# This rule is a variation of on_deploy_a6_manual where # the job is usually run manually, except when the pipeline # builds an RC: in this case, the job is run automatically. # This is done to reduce the number of manual steps that have # to be done when creating RCs. -.on_deploy_a7_manual_auto_on_rc: - - <<: *if_not_version_7 +.on_deploy_a6_manual_auto_on_rc: + - <<: *if_not_version_6 when: never - <<: *if_not_deploy when: never @@ -678,7 +570,6 @@ workflow: allow_failure: true variables: AGENT_REPOSITORY: agent-dev - DSD_REPOSITORY: dogstatsd-dev IMG_REGISTRIES: dev - <<: *if_rc_tag_on_beta_repo_branch when: on_success @@ -690,16 +581,15 @@ workflow: allow_failure: true variables: AGENT_REPOSITORY: agent - DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public # This is used for image vulnerability scanning. Because agent 6 # uses python 2, which has many vulnerabilities that will not get # patched, we do not wish to scan this image. For this reason, only # agent 7 versions should be published internally using these -# configurations. -.on_deploy_a7_internal_rc: - - <<: *if_not_version_7 +# configurations. -> then we should remove this +.on_deploy_a6_internal_rc: + - <<: *if_not_version_6 when: never - <<: *if_not_deploy when: never @@ -711,10 +601,10 @@ workflow: DSD_REPOSITORY: ci/datadog-agent/dogstatsd-release IMG_REGISTRIES: internal-aws-ddbuild -# Same as on_deploy_a7_manual_final, except the job is used to publish images +# Same as on_deploy_a6_manual_final, except the job is used to publish images # to our internal registries. -.on_deploy_a7_internal_manual_final: - - <<: *if_not_version_7 +.on_deploy_a6_internal_manual_final: + - <<: *if_not_version_6 when: never - <<: *if_not_deploy when: never @@ -958,20 +848,20 @@ workflow: # Default kitchen tests are also run on dev branches # In that case, the target OS versions is a subset of the # available versions, stored in DEFAULT_KITCHEN_OSVERS -.on_default_kitchen_tests_a7: +.on_default_kitchen_tests_a6: - <<: *if_mergequeue when: never - - <<: *if_not_version_7 + - <<: *if_not_version_6 when: never - <<: *if_installer_tests - <<: *if_auto_e2e_tests variables: KITCHEN_OSVERS: $DEFAULT_KITCHEN_OSVERS -.on_default_new-e2e_tests_a7: +.on_default_new-e2e_tests_a6: - <<: *if_mergequeue when: never - - <<: *if_not_version_7 + - <<: *if_not_version_6 when: never - <<: *if_disable_e2e_tests when: never 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/cluster_agent.yml b/.gitlab/binary_build/cluster_agent.yml index 7cc098f2da64a..a330cdcd2e336 100644 --- a/.gitlab/binary_build/cluster_agent.yml +++ b/.gitlab/binary_build/cluster_agent.yml @@ -15,7 +15,7 @@ cluster_agent-build_amd64: extends: .cluster_agent-build_common rules: - !reference [.on_tag_or_a7] + !reference [.on_tag_or_a6] 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"] needs: ["go_mod_tidy_check", "go_deps"] @@ -28,7 +28,7 @@ cluster_agent-build_amd64: cluster_agent-build_arm64: extends: .cluster_agent-build_common rules: - !reference [.on_tag_or_a7] + !reference [.on_tag_or_a6] image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES tags: ["arch:arm64"] needs: ["go_mod_tidy_check", "go_deps"] diff --git a/.gitlab/binary_build/cws_instrumentation.yml b/.gitlab/binary_build/cws_instrumentation.yml index fb5d9993f54cc..a2429c4802d49 100644 --- a/.gitlab/binary_build/cws_instrumentation.yml +++ b/.gitlab/binary_build/cws_instrumentation.yml @@ -10,7 +10,7 @@ cws_instrumentation-build_amd64: extends: .cws_instrumentation-build_common rules: - !reference [.on_tag_or_a7] + !reference [.on_tag_or_a6] 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"] needs: ["go_mod_tidy_check", "go_deps"] @@ -23,7 +23,7 @@ cws_instrumentation-build_amd64: cws_instrumentation-build_arm64: extends: .cws_instrumentation-build_common rules: - !reference [.on_tag_or_a7] + !reference [.on_tag_or_a6] image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES tags: ["arch:arm64"] needs: ["go_mod_tidy_check", "go_deps"] 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..228c24bc5c378 100644 --- a/.gitlab/container_build/docker_windows.yml +++ b/.gitlab/container_build/docker_windows.yml @@ -99,5 +99,4 @@ SERVERCORE: "-servercore" include: - - /.gitlab/container_build/docker_windows_agent6.yml - - /.gitlab/container_build/docker_windows_agent7.yml + - .gitlab/container_build/docker_windows_agent6.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/container_scan/container_scan.yml b/.gitlab/container_scan/container_scan.yml index 464aa047dfe5e..ff787dd33834e 100644 --- a/.gitlab/container_scan/container_scan.yml +++ b/.gitlab/container_scan/container_scan.yml @@ -8,7 +8,7 @@ scan_nightly-dogstatsd: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_deploy_nightly_repo_branch_a7] + !reference [.on_deploy_nightly_repo_branch_a6] needs: - docker_build_dogstatsd_amd64 variables: @@ -54,7 +54,7 @@ dca_scan_nightly: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_deploy_nightly_repo_branch_a7] + !reference [.on_deploy_nightly_repo_branch_a6] needs: ["docker_build_cluster_agent_amd64"] variables: IMG_REGISTRIES: dev @@ -66,7 +66,7 @@ scan_master-dogstatsd: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_main_a7] + !reference [.on_main_a6] needs: - docker_build_dogstatsd_amd64 variables: @@ -112,7 +112,7 @@ dca_scan_master: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_main_a7] + !reference [.on_main_a6] needs: ["docker_build_cluster_agent_amd64"] variables: IMG_REGISTRIES: dev 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_cws_instrumentation/deploy_cws_instrumentation.yml b/.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml index 6bd710bc72e78..4d6440ec2c4c5 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 @@ -12,7 +12,7 @@ include: dependencies: [] before_script: - source /root/.bashrc - - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 7 --url-safe)"; fi + - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 6 --url-safe)"; fi - if [[ "$CWS_INSTRUMENTATION_REPOSITORY" == "" ]]; then export CWS_INSTRUMENTATION_REPOSITORY="cws-instrumentation"; fi - export IMG_BASE_SRC="${SRC_CWS_INSTRUMENTATION}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}" - export IMG_SOURCES="${IMG_BASE_SRC}-amd64,${IMG_BASE_SRC}-arm64" @@ -21,23 +21,23 @@ include: # will push the `7.xx.y-rc.z` tags deploy_containers-cws-instrumentation-rc-versioned: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a7_rc] + rules: !reference [.on_deploy_a6_rc] # will update the `rc` tag deploy_containers-cws-instrumentation-rc-mutable: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a7_rc] + rules: !reference [.on_deploy_a6_rc] variables: VERSION: rc # will push the `7.xx.y` tags deploy_containers-cws-instrumentation-final-versioned: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a7_manual_final] + rules: !reference [.on_deploy_a6_manual_final] # will update the `latest` tag deploy_containers-cws-instrumentation-latest: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a7_manual_final] + rules: !reference [.on_deploy_a6_manual_final] variables: VERSION: latest diff --git a/.gitlab/deploy_dca/deploy_dca.yml b/.gitlab/deploy_dca/deploy_dca.yml index c1617f8ffb84c..151a081bf8716 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 @@ -16,7 +16,7 @@ include: artifacts: false before_script: - source /root/.bashrc - - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 7 --url-safe)"; fi + - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 6 --url-safe)"; fi - if [[ "$CLUSTER_AGENT_REPOSITORY" == "" ]]; then export CLUSTER_AGENT_REPOSITORY="cluster-agent"; fi - export IMG_BASE_SRC="${SRC_DCA}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}" - export IMG_SOURCES="${IMG_BASE_SRC}-amd64,${IMG_BASE_SRC}-arm64" @@ -24,32 +24,32 @@ include: deploy_containers-dca: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a7_manual_auto_on_rc] + rules: !reference [.on_deploy_a6_manual_auto_on_rc] deploy_containers-dca-rc: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a7_rc] + rules: !reference [.on_deploy_a6_rc] variables: VERSION: rc deploy_containers-dca-latest: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a7_manual_final] + rules: !reference [.on_deploy_a6_manual_final] variables: VERSION: latest deploy_containers-dca_internal: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a7_internal_manual_final] + rules: !reference [.on_deploy_a6_internal_manual_final] deploy_containers-dca_internal-rc: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a7_internal_rc] + rules: !reference [.on_deploy_a6_internal_rc] variables: VERSION: rc deploy_containers-dca_internal-latest: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a7_internal_manual_final] + rules: !reference [.on_deploy_a6_internal_manual_final] variables: VERSION: latest diff --git a/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml b/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml index 1c965a021d7de..748446c1102cc 100644 --- a/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml +++ b/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml @@ -1,7 +1,7 @@ --- deploy_cluster_agent_cloudfoundry: rules: - !reference [.on_deploy_a7] + !reference [.on_deploy_a6] stage: deploy_packages image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS tags: ["arch:amd64"] diff --git a/.gitlab/deploy_packages/deploy_common.yml b/.gitlab/deploy_packages/deploy_common.yml index 09ee6b9210a09..ae0d1682b1a60 100644 --- a/.gitlab/deploy_packages/deploy_common.yml +++ b/.gitlab/deploy_packages/deploy_common.yml @@ -16,14 +16,6 @@ variables: MAJOR_VERSION: 6 -.deploy_packages_deb-7: - extends: .deploy_packages_deb - stage: deploy_packages - rules: - !reference [.on_deploy_a7] - variables: - MAJOR_VERSION: 7 - .deploy_packages_rpm: resource_group: rpm_bucket image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS @@ -43,14 +35,6 @@ variables: MAJOR_VERSION: 6 -.deploy_packages_rpm-7: - extends: .deploy_packages_rpm - stage: deploy_packages - rules: - !reference [.on_deploy_a7] - variables: - MAJOR_VERSION: 7 - .deploy_packages_suse_rpm: extends: .deploy_packages_rpm variables: @@ -65,14 +49,6 @@ variables: MAJOR_VERSION: 6 -.deploy_packages_suse_rpm-7: - extends: .deploy_packages_suse_rpm - stage: deploy_packages - rules: - !reference [.on_deploy_a7] - variables: - MAJOR_VERSION: 7 - deploy_packages_oci: resource_group: oci_bucket image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS @@ -82,7 +58,7 @@ deploy_packages_oci: before_script: - ls $OMNIBUS_PACKAGE_DIR rules: - !reference [.on_deploy_a7] + !reference [.on_deploy_a6] script: - python3 -m pip install -r tasks/libs/requirements-github.txt - set +x @@ -96,5 +72,5 @@ deploy_packages_oci: - go build . - ./datadog-package push registry.ddbuild.io/ci/remote-updates/datadog-agent:${VERSION} ${OMNIBUS_PACKAGE_DIR}/datadog-agent-${MAJOR_VERSION}.*.oci.tar variables: - MAJOR_VERSION: 7 + MAJOR_VERSION: 6 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..e138564b9f970 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 @@ -251,10 +251,10 @@ qa_agent: - !reference [.on_container_or_e2e_changes_or_manual] - !reference [.on_apm_or_e2e_changes_or_manual] needs: - - docker_build_agent7 - - docker_build_agent7_arm64 - - docker_build_agent7_windows1809 - - docker_build_agent7_windows2022 + - docker_build_agent6 + - docker_build_agent6_arm64 + - docker_build_agent6_windows1809_core + - docker_build_agent6_windows2022_core variables: IMG_REGISTRIES: agent-qa IMG_SOURCES: ${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-amd64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-arm64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-win1809-amd64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-winltsc2022-amd64 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/e2e/e2e.yml b/.gitlab/e2e/e2e.yml index 555a6614c6857..4383089e35242 100644 --- a/.gitlab/e2e/e2e.yml +++ b/.gitlab/e2e/e2e.yml @@ -289,7 +289,7 @@ new-e2e-updater: rules: !reference [.on_updater_or_e2e_changes_or_manual] needs: - - deploy_deb_testing-u7_arm64 + - deploy_deb_testing-u6_arm64 variables: TARGETS: ./tests/updater TEAM: fleet 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/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_image_deploy/internal_image_deploy.yml b/.gitlab/internal_image_deploy/internal_image_deploy.yml index ce135eb19ee5d..00a71f06115f3 100644 --- a/.gitlab/internal_image_deploy/internal_image_deploy.yml +++ b/.gitlab/internal_image_deploy/internal_image_deploy.yml @@ -4,11 +4,11 @@ docker_trigger_internal: stage: internal_image_deploy - rules: !reference [.on_deploy_a7_internal_or_manual] + rules: !reference [.on_deploy_a6_internal_or_manual] needs: - - job: docker_build_agent7_jmx + - job: docker_build_agent6_jmx artifacts: false - - job: docker_build_agent7_jmx_arm64 + - job: docker_build_agent6_jmx_arm64 artifacts: false 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"] @@ -50,7 +50,7 @@ docker_trigger_internal: docker_trigger_cluster_agent_internal: stage: internal_image_deploy - rules: !reference [.on_deploy_a7] + rules: !reference [.on_deploy_a6] needs: - job: docker_build_cluster_agent_amd64 artifacts: false @@ -97,7 +97,7 @@ docker_trigger_cluster_agent_internal: docker_trigger_cws_instrumentation_internal: stage: internal_image_deploy - rules: !reference [.on_deploy_a7] + rules: !reference [.on_deploy_a6] needs: - job: docker_build_cws_instrumentation_amd64 artifacts: false 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/internal_kubernetes_deploy/internal_kubernetes_deploy.yml b/.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml index 014baf6689429..d0aaa12280637 100644 --- a/.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml +++ b/.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml @@ -14,7 +14,7 @@ internal_kubernetes_deploy_experimental: when: never - if: $DDR != "true" when: never - - !reference [.on_deploy_a7] + - !reference [.on_deploy_a6] needs: - job: docker_trigger_internal artifacts: false @@ -56,7 +56,7 @@ notify-slack: when: never - if: $DDR != "true" when: never - - !reference [.on_deploy_a7] + - !reference [.on_deploy_a6] tags: ["arch:amd64"] needs: ["internal_kubernetes_deploy_experimental"] script: 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_deploy/kitchen_deploy.yml b/.gitlab/kitchen_deploy/kitchen_deploy.yml index 40cc8f00fa107..3ba733c0debe7 100644 --- a/.gitlab/kitchen_deploy/kitchen_deploy.yml +++ b/.gitlab/kitchen_deploy/kitchen_deploy.yml @@ -37,11 +37,8 @@ .deploy_deb_resource_group-a6: &deploy_deb_resource_group-a6 resource_group: deploy_deb_a6 -.deploy_deb_resource_group-a7: &deploy_deb_resource_group-a7 - resource_group: deploy_deb_a7 - -.deploy_deb_resource_group-u7: &deploy_deb_resource_group-u7 - resource_group: deploy_deb_u7 +.deploy_deb_resource_group-u6: &deploy_deb_resource_group-u6 + resource_group: deploy_deb_u6 .deploy_deb_testing-a6: stage: kitchen_deploy @@ -54,13 +51,13 @@ - source /root/.bashrc - ls $OMNIBUS_PACKAGE_DIR -.deploy_deb_testing-u7: +.deploy_deb_testing-u6: stage: kitchen_deploy image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS tags: ["arch:amd64"] - <<: *deploy_deb_resource_group-u7 + <<: *deploy_deb_resource_group-u6 variables: - DD_PIPELINE_ID: $CI_PIPELINE_ID-u7 + DD_PIPELINE_ID: $CI_PIPELINE_ID-u6 before_script: - source /root/.bashrc - ls $OMNIBUS_PACKAGE_DIR @@ -204,43 +201,21 @@ deploy_rpm_testing-a6_arm64: - set +x - echo "$RPM_SIGNING_PASSPHRASE" | rpm-s3 --verbose --visibility public-read -c "https://s3.amazonaws.com" -b $RPM_TESTING_S3_BUCKET -p "testing/pipeline-$DD_PIPELINE_ID/6/aarch64/" -a "aarch64" --sign --metadata-signing-key $RPM_GPG_KEY_ID $OMNIBUS_PACKAGE_DIR/datadog-*-6.*aarch64.rpm -.deploy_rpm_testing-a7: - stage: kitchen_deploy - image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS - tags: ["arch:amd64"] - variables: - DD_PIPELINE_ID: $CI_PIPELINE_ID-a7 - before_script: - - source /root/.bashrc - - ls $OMNIBUS_PACKAGE_DIR - -deploy_rpm_testing-a7_x64: +deploy_deb_testing-u6_arm64: rules: - !reference [.except_no_tests_no_deploy] - - !reference [.on_a7] + - !reference [.on_a6] extends: - - .deploy_rpm_testing-a7 - needs: - [ - "agent_rpm-x64-a7", - "iot_agent_rpm-x64", - "dogstatsd_rpm-x64", - "lint_linux-x64", - ] + - .deploy_deb_testing-u6 + needs: ["updater_deb-arm64", "lint_linux-arm64"] script: - - *setup_rpm_signing_key - - set +x - - echo "$RPM_SIGNING_PASSPHRASE" | rpm-s3 --verbose --visibility public-read -c "https://s3.amazonaws.com" -b $RPM_TESTING_S3_BUCKET -p "testing/pipeline-$DD_PIPELINE_ID/7/x86_64/" -a "x86_64" --sign --metadata-signing-key $RPM_GPG_KEY_ID $OMNIBUS_PACKAGE_DIR/datadog-*-7.*x86_64.rpm + - *setup_apt_signing_key + - set +x # make sure we don't output the creds to the build log -deploy_rpm_testing-a7_arm64: - rules: !reference [.on_all_kitchen_builds_a7] - extends: - - .deploy_rpm_testing-a7 - needs: ["agent_rpm-arm64-a7", "lint_linux-arm64"] - script: - - *setup_rpm_signing_key - - set +x - - echo "$RPM_SIGNING_PASSPHRASE" | rpm-s3 --verbose --visibility public-read -c "https://s3.amazonaws.com" -b $RPM_TESTING_S3_BUCKET -p "testing/pipeline-$DD_PIPELINE_ID/7/aarch64/" -a "aarch64" --sign --metadata-signing-key $RPM_GPG_KEY_ID $OMNIBUS_PACKAGE_DIR/datadog-*-7.*aarch64.rpm + - *setup_signing_keys_package + + - echo "$APT_SIGNING_KEY_PASSPHRASE" | deb-s3 upload -c "pipeline-$DD_PIPELINE_ID-arm64" -m 6 -b $DEB_TESTING_S3_BUCKET -a arm64 --sign=$DEB_GPG_KEY_ID --gpg_options="--passphrase-fd 0 --batch --digest-algo SHA512" --preserve_versions --visibility public $OMNIBUS_PACKAGE_DIR/datadog-updater*arm64.deb + - echo "$APT_SIGNING_KEY_PASSPHRASE" | deb-s3 upload -c "pipeline-$DD_PIPELINE_ID-arm64" -m 6 -b $DEB_TESTING_S3_BUCKET -a arm64 --sign=$DEB_GPG_KEY_ID --gpg_options="--passphrase-fd 0 --batch --digest-algo SHA512" --preserve_versions --visibility public $OMNIBUS_PACKAGE_DIR/datadog-signing-keys_${DD_PIPELINE_ID}.deb deploy_suse_rpm_testing_x64-a6: rules: !reference [.on_kitchen_tests_a6] 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.yml b/.gitlab/kitchen_testing/new-e2e_testing.yml index 363010f664fb4..a7a230783c157 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing.yml @@ -48,7 +48,7 @@ EXTRA_PARAMS: --osversion $E2E_OSVERS --platform $E2E_PLATFORM --arch $E2E_ARCH --flavor $FLAVOR parallel: matrix: - - START_MAJOR_VERSION: [5, 6, 7] + - START_MAJOR_VERSION: [6] END_MAJOR_VERSION: [7] script: - export DATADOG_AGENT_API_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $INSTALL_SCRIPT_API_KEY_SSM_NAME ) diff --git a/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml b/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml index 07e3b62c44445..1a52596247cce 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml @@ -84,9 +84,9 @@ 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_amazonlinux_a6_x86_64 - .new-e2e_package_signing - rules: !reference [.on_default_new-e2e_tests_a7] + rules: !reference [.on_default_new-e2e_tests_a6] new-e2e-agent-platform-step-by-step-amazonlinux-a6-x86_64: stage: kitchen_testing @@ -146,8 +146,8 @@ new-e2e-agent-platform-install-script-upgrade7-amazonlinux-x64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_amazonlinux - - .new-e2e_amazonlinux_a7_x86_64 - - .new-e2e_agent_a7 + - .new-e2e_amazonlinux_a6_x86_64 + - .new-e2e_agent_a6 variables: FLAVOR: datadog-agent diff --git a/.gitlab/kitchen_testing/new-e2e_testing/centos.yml b/.gitlab/kitchen_testing/new-e2e_testing/centos.yml index 60be5debdf8ca..3ae2f7b7ab462 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/centos.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/centos.yml @@ -10,22 +10,6 @@ E2E_BRANCH_OSVERS: "centos-79" needs: ["deploy_rpm_testing-a6_x64"] -.new-e2e_centos_a7_x86_64: - variables: - E2E_ARCH: x86_64 - E2E_OSVERS: "centos-79,rhel-86" - E2E_CWS_SUPPORTED_OSVERS: "centos-79,rhel-86" - E2E_BRANCH_OSVERS: "centos-79" - needs: ["deploy_rpm_testing-a7_x64"] - -.new-e2e_centos-fips_a7_x86_64: - variables: - E2E_ARCH: x86_64 - E2E_OSVERS: "rhel-86-fips" - E2E_CWS_SUPPORTED_OSVERS: "rhel-86-fips" - E2E_BRANCH_OSVERS: "rhel-86-fips" - needs: ["deploy_rpm_testing-a7_x64"] - .new-e2e_centos-fips_a6_x86_64: variables: E2E_ARCH: x86_64 @@ -34,14 +18,6 @@ E2E_BRANCH_OSVERS: "rhel-86-fips" needs: ["deploy_rpm_testing-a6_x64"] -.new-e2e_centos6_a7_x86_64: - variables: - E2E_ARCH: x86_64 - E2E_OSVERS: "centos-610" - E2E_BRANCH_OSVERS: "centos-610" - E2E_OVERRIDE_INSTANCE_TYPE: "t2.medium" # CentOS 6 does not support ENA, so we cannot use t3 instances - needs: ["deploy_rpm_testing-a7_x64"] - new-e2e-agent-platform-install-script-centos-a6-x86_64: stage: kitchen_testing extends: @@ -175,8 +151,8 @@ new-e2e-agent-platform-install-script-upgrade7-centos-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_centos - - .new-e2e_centos_a7_x86_64 - - .new-e2e_agent_a7 + - .new-e2e_centos_a6_x86_64 + - .new-e2e_agent_a6 variables: FLAVOR: datadog-agent @@ -231,8 +207,8 @@ new-e2e-agent-platform-install-script-upgrade7-centos-fips-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_centos - - .new-e2e_centos-fips_a7_x86_64 - - .new-e2e_agent_a7 + - .new-e2e_centos-fips_a6_x86_64 + - .new-e2e_agent_a6 variables: FLAVOR: datadog-agent parallel: diff --git a/.gitlab/kitchen_testing/new-e2e_testing/debian.yml b/.gitlab/kitchen_testing/new-e2e_testing/debian.yml index 7ab6e8dfed77c..afbd7c696ec58 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/debian.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/debian.yml @@ -202,8 +202,8 @@ new-e2e-agent-platform-install-script-upgrade7-debian-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_debian - - .new-e2e_debian_a7_x86_64 - - .new-e2e_agent_a7 + - .new-e2e_debian_a6_x86_64 + - .new-e2e_agent_a6 variables: FLAVOR: datadog-agent 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/new-e2e_testing/suse.yml b/.gitlab/kitchen_testing/new-e2e_testing/suse.yml index 2cef2035fa42e..3ee858ef236b0 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/suse.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/suse.yml @@ -143,13 +143,13 @@ new-e2e-agent-platform-install-script-upgrade7-suse-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_suse - - .new-e2e_suse_a7_x86_64 - - .new-e2e_agent_a7 + - .new-e2e_suse_a6_x86_64 + - .new-e2e_agent_a6 variables: FLAVOR: datadog-agent parallel: matrix: - - START_MAJOR_VERSION: [6,7] + - START_MAJOR_VERSION: [6] END_MAJOR_VERSION: [7] new-e2e-agent-platform-install-script-upgrade6-suse-x86_64: diff --git a/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml b/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml index a30f6908f1a29..2538ede0fea6b 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml @@ -197,8 +197,8 @@ new-e2e-agent-platform-install-script-upgrade7-ubuntu-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_ubuntu - - .new-e2e_ubuntu_a7_x86_64 - - .new-e2e_agent_a7 + - .new-e2e_ubuntu_a6_x86_64 + - .new-e2e_agent_a6 variables: FLAVOR: datadog-agent diff --git a/.gitlab/kitchen_testing/new-e2e_testing/windows.yml b/.gitlab/kitchen_testing/new-e2e_testing/windows.yml index 281e87d84990e..40805220f5ff3 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/windows.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/windows.yml @@ -93,15 +93,15 @@ new-e2e-windows-agent-domain-tests-a7-x86_64: ## single test for PRs ## skipped if the full tests are running -new-e2e-windows-agent-msi-upgrade-windows-server-a7-x86_64: +new-e2e-windows-agent-msi-upgrade-windows-server-a6-x86_64: stage: kitchen_testing extends: - .new-e2e_windows_msi - - .new-e2e_windows_a7_x86_64 + - .new-e2e_windows_a6_x86_64 rules: - !reference [.except_main_or_release_branch] - !reference [.except_windows_installer_changes] - - !reference [.on_default_new-e2e_tests_a7] + - !reference [.on_default_new-e2e_tests_a6] # must be last since it ends with when: on_success - !reference [.except_deploy] variables: diff --git a/.gitlab/kitchen_testing/windows.yml b/.gitlab/kitchen_testing/windows.yml index 4e3ce60f9871f..1bf4d0c622f16 100644 --- a/.gitlab/kitchen_testing/windows.yml +++ b/.gitlab/kitchen_testing/windows.yml @@ -138,7 +138,7 @@ extends: - .kitchen_agent_a7 - .kitchen_os_windows - needs: ["deploy_windows_testing-a7"] + needs: ["deploy_windows_testing-a6"] # Kitchen: final test matrix (test types * scenarios) # ---------------------------------------------- @@ -161,11 +161,6 @@ kitchen_windows_installer_agent-a6: - .kitchen_scenario_windows_a6 - .kitchen_test_windows_installer_agent -kitchen_windows_installer_agent-a7: - extends: - - .kitchen_scenario_windows_a7 - - .kitchen_test_windows_installer_agent - kitchen_windows_upgrade5_agent-a6: extends: - .kitchen_scenario_windows_a6 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..134422127dfc3 100644 --- a/.gitlab/package_build/include.yml +++ b/.gitlab/package_build/include.yml @@ -10,9 +10,8 @@ - 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/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) From dab12de5c1959f750f26a2f1436f02b021a6a611 Mon Sep 17 00:00:00 2001 From: Nicolas Schweitzer Date: Mon, 4 Nov 2024 15:26:23 +0100 Subject: [PATCH 3/4] Revert "Add the configuration check and validate configuration" This reverts commit 9bf11cedc014cf1ead6820be3d2f6a15046c3475. --- .gitlab-ci.yml | 230 +++++++++++++----- .gitlab/benchmarks/include.yml | 4 +- .gitlab/binary_build/cluster_agent.yml | 4 +- .gitlab/binary_build/cws_instrumentation.yml | 4 +- .gitlab/binary_build/include.yml | 16 +- .gitlab/container_build/docker_windows.yml | 3 +- .gitlab/container_build/include.yml | 6 +- .gitlab/container_scan/container_scan.yml | 8 +- .../deploy_containers_a6.yml | 4 +- .../deploy_cws_instrumentation.yml | 12 +- .gitlab/deploy_dca/deploy_dca.yml | 16 +- .../cluster_agent_cloudfoundry.yml | 2 +- .gitlab/deploy_packages/deploy_common.yml | 28 ++- .gitlab/deploy_packages/include.yml | 10 +- .gitlab/dev_container_deploy/docker_linux.yml | 10 +- .../dev_container_deploy/docker_windows.yml | 2 +- .gitlab/dev_container_deploy/include.yml | 6 +- .gitlab/e2e/e2e.yml | 2 +- .gitlab/functional_test/common.yml | 2 +- .gitlab/functional_test/include.yml | 20 +- .gitlab/functional_test/security_agent.yml | 2 +- .gitlab/integration_test/include.yml | 4 +- .../internal_image_deploy.yml | 10 +- .../internal_kubernetes_deploy/include.yml | 4 +- .../internal_kubernetes_deploy.yml | 4 +- .gitlab/kitchen_cleanup/include.yml | 4 +- .gitlab/kitchen_deploy/kitchen_deploy.yml | 55 +++-- .gitlab/kitchen_testing/include.yml | 16 +- .gitlab/kitchen_testing/new-e2e_testing.yml | 2 +- .../new-e2e_testing/amazonlinux.yml | 8 +- .../new-e2e_testing/centos.yml | 32 ++- .../new-e2e_testing/debian.yml | 4 +- .../new-e2e_testing/include.yml | 12 +- .../kitchen_testing/new-e2e_testing/suse.yml | 6 +- .../new-e2e_testing/ubuntu.yml | 4 +- .../new-e2e_testing/windows.yml | 6 +- .gitlab/kitchen_testing/windows.yml | 7 +- .gitlab/maintenance_jobs/docker.yml | 2 +- .gitlab/maintenance_jobs/include.yml | 4 +- .gitlab/package_build/include.yml | 11 +- .gitlab/packaging/include.yml | 2 +- .gitlab/source_test/include.yml | 16 +- tasks/__init__.py | 3 +- 43 files changed, 398 insertions(+), 209 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00c3b7b46e4a2..ac27df88d75c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,45 +1,47 @@ --- include: - - .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/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: @@ -468,11 +470,22 @@ workflow: when: never - <<: *if_main_branch -.on_tag_or_a6: +.on_main_a7: + - <<: *if_not_version_7 + when: never + - <<: *if_main_branch + +.on_tag_or_a7: - <<: *if_mergequeue when: never - <<: *if_tagged_commit - - <<: *if_version_6 + - <<: *if_version_7 + +.on_tag_or_a7_all_builds: + - <<: *if_not_run_all_builds + when: never + - <<: *if_tagged_commit + - <<: *if_version_7 .on_deploy: - <<: *if_deploy @@ -521,10 +534,103 @@ workflow: AGENT_REPOSITORY: agent IMG_REGISTRIES: public +# Same as on_deploy_a6_manual, except the job would not run on pipelines +# using beta branch, it would only run for the final release. +.on_deploy_a6_manual_final: + - <<: *if_not_version_6 + when: never + - <<: *if_not_deploy + when: never + - <<: *if_deploy_on_beta_repo_branch + when: never + - <<: *if_not_stable_or_beta_repo_branch + when: manual + allow_failure: true + variables: + AGENT_REPOSITORY: agent-dev + IMG_REGISTRIES: dev + - when: manual + allow_failure: true + variables: + AGENT_REPOSITORY: agent + IMG_REGISTRIES: public + +# This rule is a variation of on_deploy_a6_manual where +# the job is usually run manually, except when the pipeline +# builds an RC: in this case, the job is run automatically. +# This is done to reduce the number of manual steps that have +# to be done when creating RCs. +.on_deploy_a6_manual_auto_on_rc: + - <<: *if_not_version_6 + when: never + - <<: *if_not_deploy + when: never + - <<: *if_not_stable_or_beta_repo_branch + when: manual + allow_failure: true + variables: + AGENT_REPOSITORY: agent-dev + IMG_REGISTRIES: dev + - <<: *if_rc_tag_on_beta_repo_branch + when: on_success + variables: + AGENT_REPOSITORY: agent + DSD_REPOSITORY: dogstatsd + IMG_REGISTRIES: public + - when: manual + allow_failure: true + variables: + AGENT_REPOSITORY: agent + IMG_REGISTRIES: public + +.on_deploy_a7: + - <<: *if_not_version_7 + when: never + - <<: *if_deploy + +.on_deploy_a7_failure: + - <<: *if_not_version_7 + when: never + - <<: *if_deploy + when: on_failure + +.on_deploy_a7_rc: + - <<: *if_not_version_7 + when: never + - <<: *if_not_deploy + when: never + - <<: *if_rc_tag_on_beta_repo_branch + when: on_success + variables: + AGENT_REPOSITORY: agent + DSD_REPOSITORY: dogstatsd + IMG_REGISTRIES: public + +.on_deploy_a7_manual: + - <<: *if_not_version_7 + when: never + - <<: *if_not_deploy + when: never + - <<: *if_not_stable_or_beta_repo_branch + when: manual + allow_failure: true + variables: + AGENT_REPOSITORY: agent-dev + DSD_REPOSITORY: dogstatsd-dev + IMG_REGISTRIES: dev + - when: manual + allow_failure: true + variables: + AGENT_REPOSITORY: agent + DSD_REPOSITORY: dogstatsd + IMG_REGISTRIES: public + # rule to trigger job for internal image deployment if deploy is set or # manually if not -.on_deploy_a6_internal_or_manual: - - <<: *if_not_version_6 +.on_deploy_a7_internal_or_manual: + - <<: *if_mergequeue + when: never + - <<: *if_not_version_7 when: never - <<: *if_deploy variables: @@ -534,10 +640,10 @@ workflow: variables: RELEASE_PROD: "false" -# Same as on_deploy_a6_manual, except the job would not run on pipelines +# Same as on_deploy_a7_manual, except the job would not run on pipelines # using beta branch, it would only run for the final release. -.on_deploy_a6_manual_final: - - <<: *if_not_version_6 +.on_deploy_a7_manual_final: + - <<: *if_not_version_7 when: never - <<: *if_not_deploy when: never @@ -548,20 +654,22 @@ workflow: allow_failure: true variables: AGENT_REPOSITORY: agent-dev + DSD_REPOSITORY: dogstatsd-dev IMG_REGISTRIES: dev - when: manual allow_failure: true variables: AGENT_REPOSITORY: agent + DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public -# This rule is a variation of on_deploy_a6_manual where +# This rule is a variation of on_deploy_a7_manual where # the job is usually run manually, except when the pipeline # builds an RC: in this case, the job is run automatically. # This is done to reduce the number of manual steps that have # to be done when creating RCs. -.on_deploy_a6_manual_auto_on_rc: - - <<: *if_not_version_6 +.on_deploy_a7_manual_auto_on_rc: + - <<: *if_not_version_7 when: never - <<: *if_not_deploy when: never @@ -570,6 +678,7 @@ workflow: allow_failure: true variables: AGENT_REPOSITORY: agent-dev + DSD_REPOSITORY: dogstatsd-dev IMG_REGISTRIES: dev - <<: *if_rc_tag_on_beta_repo_branch when: on_success @@ -581,15 +690,16 @@ workflow: allow_failure: true variables: AGENT_REPOSITORY: agent + DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public # This is used for image vulnerability scanning. Because agent 6 # uses python 2, which has many vulnerabilities that will not get # patched, we do not wish to scan this image. For this reason, only # agent 7 versions should be published internally using these -# configurations. -> then we should remove this -.on_deploy_a6_internal_rc: - - <<: *if_not_version_6 +# configurations. +.on_deploy_a7_internal_rc: + - <<: *if_not_version_7 when: never - <<: *if_not_deploy when: never @@ -601,10 +711,10 @@ workflow: DSD_REPOSITORY: ci/datadog-agent/dogstatsd-release IMG_REGISTRIES: internal-aws-ddbuild -# Same as on_deploy_a6_manual_final, except the job is used to publish images +# Same as on_deploy_a7_manual_final, except the job is used to publish images # to our internal registries. -.on_deploy_a6_internal_manual_final: - - <<: *if_not_version_6 +.on_deploy_a7_internal_manual_final: + - <<: *if_not_version_7 when: never - <<: *if_not_deploy when: never @@ -848,20 +958,20 @@ workflow: # Default kitchen tests are also run on dev branches # In that case, the target OS versions is a subset of the # available versions, stored in DEFAULT_KITCHEN_OSVERS -.on_default_kitchen_tests_a6: +.on_default_kitchen_tests_a7: - <<: *if_mergequeue when: never - - <<: *if_not_version_6 + - <<: *if_not_version_7 when: never - <<: *if_installer_tests - <<: *if_auto_e2e_tests variables: KITCHEN_OSVERS: $DEFAULT_KITCHEN_OSVERS -.on_default_new-e2e_tests_a6: +.on_default_new-e2e_tests_a7: - <<: *if_mergequeue when: never - - <<: *if_not_version_6 + - <<: *if_not_version_7 when: never - <<: *if_disable_e2e_tests when: never diff --git a/.gitlab/benchmarks/include.yml b/.gitlab/benchmarks/include.yml index 03e75501e413f..1b1308ecbe90f 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/cluster_agent.yml b/.gitlab/binary_build/cluster_agent.yml index a330cdcd2e336..7cc098f2da64a 100644 --- a/.gitlab/binary_build/cluster_agent.yml +++ b/.gitlab/binary_build/cluster_agent.yml @@ -15,7 +15,7 @@ cluster_agent-build_amd64: extends: .cluster_agent-build_common rules: - !reference [.on_tag_or_a6] + !reference [.on_tag_or_a7] 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"] needs: ["go_mod_tidy_check", "go_deps"] @@ -28,7 +28,7 @@ cluster_agent-build_amd64: cluster_agent-build_arm64: extends: .cluster_agent-build_common rules: - !reference [.on_tag_or_a6] + !reference [.on_tag_or_a7] image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES tags: ["arch:arm64"] needs: ["go_mod_tidy_check", "go_deps"] diff --git a/.gitlab/binary_build/cws_instrumentation.yml b/.gitlab/binary_build/cws_instrumentation.yml index a2429c4802d49..fb5d9993f54cc 100644 --- a/.gitlab/binary_build/cws_instrumentation.yml +++ b/.gitlab/binary_build/cws_instrumentation.yml @@ -10,7 +10,7 @@ cws_instrumentation-build_amd64: extends: .cws_instrumentation-build_common rules: - !reference [.on_tag_or_a6] + !reference [.on_tag_or_a7] 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"] needs: ["go_mod_tidy_check", "go_deps"] @@ -23,7 +23,7 @@ cws_instrumentation-build_amd64: cws_instrumentation-build_arm64: extends: .cws_instrumentation-build_common rules: - !reference [.on_tag_or_a6] + !reference [.on_tag_or_a7] image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES tags: ["arch:arm64"] needs: ["go_mod_tidy_check", "go_deps"] diff --git a/.gitlab/binary_build/include.yml b/.gitlab/binary_build/include.yml index d8574e19963d2..b2aeddeef6286 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 228c24bc5c378..0592b8cf464bb 100644 --- a/.gitlab/container_build/docker_windows.yml +++ b/.gitlab/container_build/docker_windows.yml @@ -99,4 +99,5 @@ SERVERCORE: "-servercore" include: - - .gitlab/container_build/docker_windows_agent6.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 5ea8352b8fc62..cc3f9e653ffe1 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/container_scan/container_scan.yml b/.gitlab/container_scan/container_scan.yml index ff787dd33834e..464aa047dfe5e 100644 --- a/.gitlab/container_scan/container_scan.yml +++ b/.gitlab/container_scan/container_scan.yml @@ -8,7 +8,7 @@ scan_nightly-dogstatsd: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_deploy_nightly_repo_branch_a6] + !reference [.on_deploy_nightly_repo_branch_a7] needs: - docker_build_dogstatsd_amd64 variables: @@ -54,7 +54,7 @@ dca_scan_nightly: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_deploy_nightly_repo_branch_a6] + !reference [.on_deploy_nightly_repo_branch_a7] needs: ["docker_build_cluster_agent_amd64"] variables: IMG_REGISTRIES: dev @@ -66,7 +66,7 @@ scan_master-dogstatsd: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_main_a6] + !reference [.on_main_a7] needs: - docker_build_dogstatsd_amd64 variables: @@ -112,7 +112,7 @@ dca_scan_master: extends: .docker_publish_job_definition stage: container_scan rules: - !reference [.on_main_a6] + !reference [.on_main_a7] needs: ["docker_build_cluster_agent_amd64"] variables: IMG_REGISTRIES: dev diff --git a/.gitlab/deploy_containers/deploy_containers_a6.yml b/.gitlab/deploy_containers/deploy_containers_a6.yml index b2a4d604faf4f..d21734d14b596 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_cws_instrumentation/deploy_cws_instrumentation.yml b/.gitlab/deploy_cws_instrumentation/deploy_cws_instrumentation.yml index 4d6440ec2c4c5..6bd710bc72e78 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 @@ -12,7 +12,7 @@ include: dependencies: [] before_script: - source /root/.bashrc - - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 6 --url-safe)"; fi + - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 7 --url-safe)"; fi - if [[ "$CWS_INSTRUMENTATION_REPOSITORY" == "" ]]; then export CWS_INSTRUMENTATION_REPOSITORY="cws-instrumentation"; fi - export IMG_BASE_SRC="${SRC_CWS_INSTRUMENTATION}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}" - export IMG_SOURCES="${IMG_BASE_SRC}-amd64,${IMG_BASE_SRC}-arm64" @@ -21,23 +21,23 @@ include: # will push the `7.xx.y-rc.z` tags deploy_containers-cws-instrumentation-rc-versioned: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a6_rc] + rules: !reference [.on_deploy_a7_rc] # will update the `rc` tag deploy_containers-cws-instrumentation-rc-mutable: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a6_rc] + rules: !reference [.on_deploy_a7_rc] variables: VERSION: rc # will push the `7.xx.y` tags deploy_containers-cws-instrumentation-final-versioned: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a6_manual_final] + rules: !reference [.on_deploy_a7_manual_final] # will update the `latest` tag deploy_containers-cws-instrumentation-latest: extends: .deploy_containers-cws-instrumentation-base - rules: !reference [.on_deploy_a6_manual_final] + rules: !reference [.on_deploy_a7_manual_final] variables: VERSION: latest diff --git a/.gitlab/deploy_dca/deploy_dca.yml b/.gitlab/deploy_dca/deploy_dca.yml index 151a081bf8716..c1617f8ffb84c 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 @@ -16,7 +16,7 @@ include: artifacts: false before_script: - source /root/.bashrc - - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 6 --url-safe)"; fi + - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 7 --url-safe)"; fi - if [[ "$CLUSTER_AGENT_REPOSITORY" == "" ]]; then export CLUSTER_AGENT_REPOSITORY="cluster-agent"; fi - export IMG_BASE_SRC="${SRC_DCA}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}" - export IMG_SOURCES="${IMG_BASE_SRC}-amd64,${IMG_BASE_SRC}-arm64" @@ -24,32 +24,32 @@ include: deploy_containers-dca: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a6_manual_auto_on_rc] + rules: !reference [.on_deploy_a7_manual_auto_on_rc] deploy_containers-dca-rc: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a6_rc] + rules: !reference [.on_deploy_a7_rc] variables: VERSION: rc deploy_containers-dca-latest: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a6_manual_final] + rules: !reference [.on_deploy_a7_manual_final] variables: VERSION: latest deploy_containers-dca_internal: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a6_internal_manual_final] + rules: !reference [.on_deploy_a7_internal_manual_final] deploy_containers-dca_internal-rc: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a6_internal_rc] + rules: !reference [.on_deploy_a7_internal_rc] variables: VERSION: rc deploy_containers-dca_internal-latest: extends: .deploy_containers-dca-base - rules: !reference [.on_deploy_a6_internal_manual_final] + rules: !reference [.on_deploy_a7_internal_manual_final] variables: VERSION: latest diff --git a/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml b/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml index 748446c1102cc..1c965a021d7de 100644 --- a/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml +++ b/.gitlab/deploy_packages/cluster_agent_cloudfoundry.yml @@ -1,7 +1,7 @@ --- deploy_cluster_agent_cloudfoundry: rules: - !reference [.on_deploy_a6] + !reference [.on_deploy_a7] stage: deploy_packages image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS tags: ["arch:amd64"] diff --git a/.gitlab/deploy_packages/deploy_common.yml b/.gitlab/deploy_packages/deploy_common.yml index ae0d1682b1a60..09ee6b9210a09 100644 --- a/.gitlab/deploy_packages/deploy_common.yml +++ b/.gitlab/deploy_packages/deploy_common.yml @@ -16,6 +16,14 @@ variables: MAJOR_VERSION: 6 +.deploy_packages_deb-7: + extends: .deploy_packages_deb + stage: deploy_packages + rules: + !reference [.on_deploy_a7] + variables: + MAJOR_VERSION: 7 + .deploy_packages_rpm: resource_group: rpm_bucket image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS @@ -35,6 +43,14 @@ variables: MAJOR_VERSION: 6 +.deploy_packages_rpm-7: + extends: .deploy_packages_rpm + stage: deploy_packages + rules: + !reference [.on_deploy_a7] + variables: + MAJOR_VERSION: 7 + .deploy_packages_suse_rpm: extends: .deploy_packages_rpm variables: @@ -49,6 +65,14 @@ variables: MAJOR_VERSION: 6 +.deploy_packages_suse_rpm-7: + extends: .deploy_packages_suse_rpm + stage: deploy_packages + rules: + !reference [.on_deploy_a7] + variables: + MAJOR_VERSION: 7 + deploy_packages_oci: resource_group: oci_bucket image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS @@ -58,7 +82,7 @@ deploy_packages_oci: before_script: - ls $OMNIBUS_PACKAGE_DIR rules: - !reference [.on_deploy_a6] + !reference [.on_deploy_a7] script: - python3 -m pip install -r tasks/libs/requirements-github.txt - set +x @@ -72,5 +96,5 @@ deploy_packages_oci: - go build . - ./datadog-package push registry.ddbuild.io/ci/remote-updates/datadog-agent:${VERSION} ${OMNIBUS_PACKAGE_DIR}/datadog-agent-${MAJOR_VERSION}.*.oci.tar variables: - MAJOR_VERSION: 6 + MAJOR_VERSION: 7 diff --git a/.gitlab/deploy_packages/include.yml b/.gitlab/deploy_packages/include.yml index df7cfdde05cd6..1e0f87c545751 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 e138564b9f970..17c9a96f50677 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 @@ -251,10 +251,10 @@ qa_agent: - !reference [.on_container_or_e2e_changes_or_manual] - !reference [.on_apm_or_e2e_changes_or_manual] needs: - - docker_build_agent6 - - docker_build_agent6_arm64 - - docker_build_agent6_windows1809_core - - docker_build_agent6_windows2022_core + - docker_build_agent7 + - docker_build_agent7_arm64 + - docker_build_agent7_windows1809 + - docker_build_agent7_windows2022 variables: IMG_REGISTRIES: agent-qa IMG_SOURCES: ${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-amd64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-arm64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-win1809-amd64,${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-winltsc2022-amd64 diff --git a/.gitlab/dev_container_deploy/docker_windows.yml b/.gitlab/dev_container_deploy/docker_windows.yml index f188ee773d6d6..2c2f1ca1e27ce 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 1ad939f24ae46..a1456b2b097d6 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/e2e/e2e.yml b/.gitlab/e2e/e2e.yml index 4383089e35242..555a6614c6857 100644 --- a/.gitlab/e2e/e2e.yml +++ b/.gitlab/e2e/e2e.yml @@ -289,7 +289,7 @@ new-e2e-updater: rules: !reference [.on_updater_or_e2e_changes_or_manual] needs: - - deploy_deb_testing-u6_arm64 + - deploy_deb_testing-u7_arm64 variables: TARGETS: ./tests/updater TEAM: fleet diff --git a/.gitlab/functional_test/common.yml b/.gitlab/functional_test/common.yml index 4a64e7aafdb31..13b9500c2ff03 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 3901f4d0cb53c..daa2eb3299e0f 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 93b463798a732..93d9d725e5777 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/integration_test/include.yml b/.gitlab/integration_test/include.yml index 0ebb78aea700f..3d195fbf448d7 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_image_deploy/internal_image_deploy.yml b/.gitlab/internal_image_deploy/internal_image_deploy.yml index 00a71f06115f3..ce135eb19ee5d 100644 --- a/.gitlab/internal_image_deploy/internal_image_deploy.yml +++ b/.gitlab/internal_image_deploy/internal_image_deploy.yml @@ -4,11 +4,11 @@ docker_trigger_internal: stage: internal_image_deploy - rules: !reference [.on_deploy_a6_internal_or_manual] + rules: !reference [.on_deploy_a7_internal_or_manual] needs: - - job: docker_build_agent6_jmx + - job: docker_build_agent7_jmx artifacts: false - - job: docker_build_agent6_jmx_arm64 + - job: docker_build_agent7_jmx_arm64 artifacts: false 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"] @@ -50,7 +50,7 @@ docker_trigger_internal: docker_trigger_cluster_agent_internal: stage: internal_image_deploy - rules: !reference [.on_deploy_a6] + rules: !reference [.on_deploy_a7] needs: - job: docker_build_cluster_agent_amd64 artifacts: false @@ -97,7 +97,7 @@ docker_trigger_cluster_agent_internal: docker_trigger_cws_instrumentation_internal: stage: internal_image_deploy - rules: !reference [.on_deploy_a6] + rules: !reference [.on_deploy_a7] needs: - job: docker_build_cws_instrumentation_amd64 artifacts: false diff --git a/.gitlab/internal_kubernetes_deploy/include.yml b/.gitlab/internal_kubernetes_deploy/include.yml index 4161ee65e6f04..68f5048e62ea1 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/internal_kubernetes_deploy/internal_kubernetes_deploy.yml b/.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml index d0aaa12280637..014baf6689429 100644 --- a/.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml +++ b/.gitlab/internal_kubernetes_deploy/internal_kubernetes_deploy.yml @@ -14,7 +14,7 @@ internal_kubernetes_deploy_experimental: when: never - if: $DDR != "true" when: never - - !reference [.on_deploy_a6] + - !reference [.on_deploy_a7] needs: - job: docker_trigger_internal artifacts: false @@ -56,7 +56,7 @@ notify-slack: when: never - if: $DDR != "true" when: never - - !reference [.on_deploy_a6] + - !reference [.on_deploy_a7] tags: ["arch:amd64"] needs: ["internal_kubernetes_deploy_experimental"] script: diff --git a/.gitlab/kitchen_cleanup/include.yml b/.gitlab/kitchen_cleanup/include.yml index f0a86b5fcf296..1c2ed673e6d3f 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_deploy/kitchen_deploy.yml b/.gitlab/kitchen_deploy/kitchen_deploy.yml index 3ba733c0debe7..40cc8f00fa107 100644 --- a/.gitlab/kitchen_deploy/kitchen_deploy.yml +++ b/.gitlab/kitchen_deploy/kitchen_deploy.yml @@ -37,8 +37,11 @@ .deploy_deb_resource_group-a6: &deploy_deb_resource_group-a6 resource_group: deploy_deb_a6 -.deploy_deb_resource_group-u6: &deploy_deb_resource_group-u6 - resource_group: deploy_deb_u6 +.deploy_deb_resource_group-a7: &deploy_deb_resource_group-a7 + resource_group: deploy_deb_a7 + +.deploy_deb_resource_group-u7: &deploy_deb_resource_group-u7 + resource_group: deploy_deb_u7 .deploy_deb_testing-a6: stage: kitchen_deploy @@ -51,13 +54,13 @@ - source /root/.bashrc - ls $OMNIBUS_PACKAGE_DIR -.deploy_deb_testing-u6: +.deploy_deb_testing-u7: stage: kitchen_deploy image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS tags: ["arch:amd64"] - <<: *deploy_deb_resource_group-u6 + <<: *deploy_deb_resource_group-u7 variables: - DD_PIPELINE_ID: $CI_PIPELINE_ID-u6 + DD_PIPELINE_ID: $CI_PIPELINE_ID-u7 before_script: - source /root/.bashrc - ls $OMNIBUS_PACKAGE_DIR @@ -201,21 +204,43 @@ deploy_rpm_testing-a6_arm64: - set +x - echo "$RPM_SIGNING_PASSPHRASE" | rpm-s3 --verbose --visibility public-read -c "https://s3.amazonaws.com" -b $RPM_TESTING_S3_BUCKET -p "testing/pipeline-$DD_PIPELINE_ID/6/aarch64/" -a "aarch64" --sign --metadata-signing-key $RPM_GPG_KEY_ID $OMNIBUS_PACKAGE_DIR/datadog-*-6.*aarch64.rpm -deploy_deb_testing-u6_arm64: +.deploy_rpm_testing-a7: + stage: kitchen_deploy + image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-builders/gitlab_agent_deploy:$DATADOG_AGENT_BUILDERS + tags: ["arch:amd64"] + variables: + DD_PIPELINE_ID: $CI_PIPELINE_ID-a7 + before_script: + - source /root/.bashrc + - ls $OMNIBUS_PACKAGE_DIR + +deploy_rpm_testing-a7_x64: rules: - !reference [.except_no_tests_no_deploy] - - !reference [.on_a6] + - !reference [.on_a7] extends: - - .deploy_deb_testing-u6 - needs: ["updater_deb-arm64", "lint_linux-arm64"] + - .deploy_rpm_testing-a7 + needs: + [ + "agent_rpm-x64-a7", + "iot_agent_rpm-x64", + "dogstatsd_rpm-x64", + "lint_linux-x64", + ] script: - - *setup_apt_signing_key - - set +x # make sure we don't output the creds to the build log - - - *setup_signing_keys_package + - *setup_rpm_signing_key + - set +x + - echo "$RPM_SIGNING_PASSPHRASE" | rpm-s3 --verbose --visibility public-read -c "https://s3.amazonaws.com" -b $RPM_TESTING_S3_BUCKET -p "testing/pipeline-$DD_PIPELINE_ID/7/x86_64/" -a "x86_64" --sign --metadata-signing-key $RPM_GPG_KEY_ID $OMNIBUS_PACKAGE_DIR/datadog-*-7.*x86_64.rpm - - echo "$APT_SIGNING_KEY_PASSPHRASE" | deb-s3 upload -c "pipeline-$DD_PIPELINE_ID-arm64" -m 6 -b $DEB_TESTING_S3_BUCKET -a arm64 --sign=$DEB_GPG_KEY_ID --gpg_options="--passphrase-fd 0 --batch --digest-algo SHA512" --preserve_versions --visibility public $OMNIBUS_PACKAGE_DIR/datadog-updater*arm64.deb - - echo "$APT_SIGNING_KEY_PASSPHRASE" | deb-s3 upload -c "pipeline-$DD_PIPELINE_ID-arm64" -m 6 -b $DEB_TESTING_S3_BUCKET -a arm64 --sign=$DEB_GPG_KEY_ID --gpg_options="--passphrase-fd 0 --batch --digest-algo SHA512" --preserve_versions --visibility public $OMNIBUS_PACKAGE_DIR/datadog-signing-keys_${DD_PIPELINE_ID}.deb +deploy_rpm_testing-a7_arm64: + rules: !reference [.on_all_kitchen_builds_a7] + extends: + - .deploy_rpm_testing-a7 + needs: ["agent_rpm-arm64-a7", "lint_linux-arm64"] + script: + - *setup_rpm_signing_key + - set +x + - echo "$RPM_SIGNING_PASSPHRASE" | rpm-s3 --verbose --visibility public-read -c "https://s3.amazonaws.com" -b $RPM_TESTING_S3_BUCKET -p "testing/pipeline-$DD_PIPELINE_ID/7/aarch64/" -a "aarch64" --sign --metadata-signing-key $RPM_GPG_KEY_ID $OMNIBUS_PACKAGE_DIR/datadog-*-7.*aarch64.rpm deploy_suse_rpm_testing_x64-a6: rules: !reference [.on_kitchen_tests_a6] diff --git a/.gitlab/kitchen_testing/include.yml b/.gitlab/kitchen_testing/include.yml index 62b7e577a6c9c..21b93409b4ae3 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.yml b/.gitlab/kitchen_testing/new-e2e_testing.yml index a7a230783c157..363010f664fb4 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing.yml @@ -48,7 +48,7 @@ EXTRA_PARAMS: --osversion $E2E_OSVERS --platform $E2E_PLATFORM --arch $E2E_ARCH --flavor $FLAVOR parallel: matrix: - - START_MAJOR_VERSION: [6] + - START_MAJOR_VERSION: [5, 6, 7] END_MAJOR_VERSION: [7] script: - export DATADOG_AGENT_API_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $INSTALL_SCRIPT_API_KEY_SSM_NAME ) diff --git a/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml b/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml index 1a52596247cce..07e3b62c44445 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/amazonlinux.yml @@ -84,9 +84,9 @@ new-e2e-agent-platform-package-signing-amazonlinux-a6-x86_64: stage: kitchen_testing extends: - .new_e2e_template - - .new-e2e_amazonlinux_a6_x86_64 + - .new-e2e_amazonlinux_a7_x86_64 - .new-e2e_package_signing - rules: !reference [.on_default_new-e2e_tests_a6] + rules: !reference [.on_default_new-e2e_tests_a7] new-e2e-agent-platform-step-by-step-amazonlinux-a6-x86_64: stage: kitchen_testing @@ -146,8 +146,8 @@ new-e2e-agent-platform-install-script-upgrade7-amazonlinux-x64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_amazonlinux - - .new-e2e_amazonlinux_a6_x86_64 - - .new-e2e_agent_a6 + - .new-e2e_amazonlinux_a7_x86_64 + - .new-e2e_agent_a7 variables: FLAVOR: datadog-agent diff --git a/.gitlab/kitchen_testing/new-e2e_testing/centos.yml b/.gitlab/kitchen_testing/new-e2e_testing/centos.yml index 3ae2f7b7ab462..60be5debdf8ca 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/centos.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/centos.yml @@ -10,6 +10,22 @@ E2E_BRANCH_OSVERS: "centos-79" needs: ["deploy_rpm_testing-a6_x64"] +.new-e2e_centos_a7_x86_64: + variables: + E2E_ARCH: x86_64 + E2E_OSVERS: "centos-79,rhel-86" + E2E_CWS_SUPPORTED_OSVERS: "centos-79,rhel-86" + E2E_BRANCH_OSVERS: "centos-79" + needs: ["deploy_rpm_testing-a7_x64"] + +.new-e2e_centos-fips_a7_x86_64: + variables: + E2E_ARCH: x86_64 + E2E_OSVERS: "rhel-86-fips" + E2E_CWS_SUPPORTED_OSVERS: "rhel-86-fips" + E2E_BRANCH_OSVERS: "rhel-86-fips" + needs: ["deploy_rpm_testing-a7_x64"] + .new-e2e_centos-fips_a6_x86_64: variables: E2E_ARCH: x86_64 @@ -18,6 +34,14 @@ E2E_BRANCH_OSVERS: "rhel-86-fips" needs: ["deploy_rpm_testing-a6_x64"] +.new-e2e_centos6_a7_x86_64: + variables: + E2E_ARCH: x86_64 + E2E_OSVERS: "centos-610" + E2E_BRANCH_OSVERS: "centos-610" + E2E_OVERRIDE_INSTANCE_TYPE: "t2.medium" # CentOS 6 does not support ENA, so we cannot use t3 instances + needs: ["deploy_rpm_testing-a7_x64"] + new-e2e-agent-platform-install-script-centos-a6-x86_64: stage: kitchen_testing extends: @@ -151,8 +175,8 @@ new-e2e-agent-platform-install-script-upgrade7-centos-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_centos - - .new-e2e_centos_a6_x86_64 - - .new-e2e_agent_a6 + - .new-e2e_centos_a7_x86_64 + - .new-e2e_agent_a7 variables: FLAVOR: datadog-agent @@ -207,8 +231,8 @@ new-e2e-agent-platform-install-script-upgrade7-centos-fips-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_centos - - .new-e2e_centos-fips_a6_x86_64 - - .new-e2e_agent_a6 + - .new-e2e_centos-fips_a7_x86_64 + - .new-e2e_agent_a7 variables: FLAVOR: datadog-agent parallel: diff --git a/.gitlab/kitchen_testing/new-e2e_testing/debian.yml b/.gitlab/kitchen_testing/new-e2e_testing/debian.yml index afbd7c696ec58..7ab6e8dfed77c 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/debian.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/debian.yml @@ -202,8 +202,8 @@ new-e2e-agent-platform-install-script-upgrade7-debian-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_debian - - .new-e2e_debian_a6_x86_64 - - .new-e2e_agent_a6 + - .new-e2e_debian_a7_x86_64 + - .new-e2e_agent_a7 variables: FLAVOR: datadog-agent diff --git a/.gitlab/kitchen_testing/new-e2e_testing/include.yml b/.gitlab/kitchen_testing/new-e2e_testing/include.yml index 30ab8be78521c..78f6d77e5074e 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/new-e2e_testing/suse.yml b/.gitlab/kitchen_testing/new-e2e_testing/suse.yml index 3ee858ef236b0..2cef2035fa42e 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/suse.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/suse.yml @@ -143,13 +143,13 @@ new-e2e-agent-platform-install-script-upgrade7-suse-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_suse - - .new-e2e_suse_a6_x86_64 - - .new-e2e_agent_a6 + - .new-e2e_suse_a7_x86_64 + - .new-e2e_agent_a7 variables: FLAVOR: datadog-agent parallel: matrix: - - START_MAJOR_VERSION: [6] + - START_MAJOR_VERSION: [6,7] END_MAJOR_VERSION: [7] new-e2e-agent-platform-install-script-upgrade6-suse-x86_64: diff --git a/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml b/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml index 2538ede0fea6b..a30f6908f1a29 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/ubuntu.yml @@ -197,8 +197,8 @@ new-e2e-agent-platform-install-script-upgrade7-ubuntu-x86_64: - .new_e2e_template - .new-e2e_script_upgrade7 - .new-e2e_os_ubuntu - - .new-e2e_ubuntu_a6_x86_64 - - .new-e2e_agent_a6 + - .new-e2e_ubuntu_a7_x86_64 + - .new-e2e_agent_a7 variables: FLAVOR: datadog-agent diff --git a/.gitlab/kitchen_testing/new-e2e_testing/windows.yml b/.gitlab/kitchen_testing/new-e2e_testing/windows.yml index 40805220f5ff3..281e87d84990e 100644 --- a/.gitlab/kitchen_testing/new-e2e_testing/windows.yml +++ b/.gitlab/kitchen_testing/new-e2e_testing/windows.yml @@ -93,15 +93,15 @@ new-e2e-windows-agent-domain-tests-a7-x86_64: ## single test for PRs ## skipped if the full tests are running -new-e2e-windows-agent-msi-upgrade-windows-server-a6-x86_64: +new-e2e-windows-agent-msi-upgrade-windows-server-a7-x86_64: stage: kitchen_testing extends: - .new-e2e_windows_msi - - .new-e2e_windows_a6_x86_64 + - .new-e2e_windows_a7_x86_64 rules: - !reference [.except_main_or_release_branch] - !reference [.except_windows_installer_changes] - - !reference [.on_default_new-e2e_tests_a6] + - !reference [.on_default_new-e2e_tests_a7] # must be last since it ends with when: on_success - !reference [.except_deploy] variables: diff --git a/.gitlab/kitchen_testing/windows.yml b/.gitlab/kitchen_testing/windows.yml index 1bf4d0c622f16..4e3ce60f9871f 100644 --- a/.gitlab/kitchen_testing/windows.yml +++ b/.gitlab/kitchen_testing/windows.yml @@ -138,7 +138,7 @@ extends: - .kitchen_agent_a7 - .kitchen_os_windows - needs: ["deploy_windows_testing-a6"] + needs: ["deploy_windows_testing-a7"] # Kitchen: final test matrix (test types * scenarios) # ---------------------------------------------- @@ -161,6 +161,11 @@ kitchen_windows_installer_agent-a6: - .kitchen_scenario_windows_a6 - .kitchen_test_windows_installer_agent +kitchen_windows_installer_agent-a7: + extends: + - .kitchen_scenario_windows_a7 + - .kitchen_test_windows_installer_agent + kitchen_windows_upgrade5_agent-a6: extends: - .kitchen_scenario_windows_a6 diff --git a/.gitlab/maintenance_jobs/docker.yml b/.gitlab/maintenance_jobs/docker.yml index e1e5d993a1e24..af292b2e0506e 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 c8c7ddf8d2634..dfc155470c9bd 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 134422127dfc3..fb9bb422bca5b 100644 --- a/.gitlab/package_build/include.yml +++ b/.gitlab/package_build/include.yml @@ -10,8 +10,9 @@ - If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } include: - - .gitlab/package_build/deb.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 c3417ade7a1ad..30d6f150c982c 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 7dce6c67c9a5d..e31cc06505487 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 fb237e71e636f..0f5e9643ced4f 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 gitlab_ci, lint_copyrights, lint_filenames, lint_go, lint_python +from tasks.linter_tasks import 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,7 +97,6 @@ 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) From 1f8ad4260b6939429597617b96b28217fa00ded4 Mon Sep 17 00:00:00 2001 From: Nicolas Schweitzer Date: Mon, 4 Nov 2024 15:38:20 +0100 Subject: [PATCH 4/4] fix gitlab linter --- .gitlab-ci.yml | 84 ++++++++--------- .gitlab/benchmarks/include.yml | 4 +- .gitlab/binary_build/include.yml | 16 ++-- .gitlab/container_build/docker_windows.yml | 4 +- .gitlab/container_build/include.yml | 6 +- .../deploy_containers_a6.yml | 4 +- .../deploy_containers_a7.yml | 4 +- .../deploy_cws_instrumentation.yml | 2 +- .gitlab/deploy_dca/deploy_dca.yml | 2 +- .gitlab/deploy_packages/include.yml | 10 +-- .gitlab/dev_container_deploy/docker_linux.yml | 2 +- .../dev_container_deploy/docker_windows.yml | 2 +- .gitlab/dev_container_deploy/include.yml | 6 +- .gitlab/functional_test/common.yml | 2 +- .gitlab/functional_test/include.yml | 20 ++--- .gitlab/functional_test/security_agent.yml | 2 +- .../functional_test/system_probe_windows.yml | 4 +- .../functional_test_cleanup.yml | 2 +- .../functional_test_sysprobe/system_probe.yml | 4 +- .gitlab/integration_test/include.yml | 4 +- .../internal_kubernetes_deploy/include.yml | 4 +- .gitlab/kitchen_cleanup/include.yml | 4 +- .gitlab/kitchen_cleanup/kitchen_cleanup.yml | 2 +- .gitlab/kitchen_testing/centos.yml | 2 +- .gitlab/kitchen_testing/debian.yml | 2 +- .gitlab/kitchen_testing/include.yml | 16 ++-- .../new-e2e_testing/include.yml | 12 +-- .gitlab/kitchen_testing/suse.yml | 2 +- .gitlab/kitchen_testing/ubuntu.yml | 2 +- .gitlab/kitchen_testing/windows.yml | 2 +- .gitlab/maintenance_jobs/docker.yml | 2 +- .gitlab/maintenance_jobs/include.yml | 4 +- .gitlab/package_build/include.yml | 12 +-- .gitlab/packaging/include.yml | 2 +- .gitlab/source_test/include.yml | 16 ++-- tasks/__init__.py | 3 +- tasks/unit-tests/testdata/codeowners.txt | 4 +- tasks/unit-tests/testdata/fake_gitlab-ci.yml | 90 +++++++++---------- 38 files changed, 183 insertions(+), 182 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac27df88d75c5..46155afc84a4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,47 +1,47 @@ --- include: - - /.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 + - .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: 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/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: