diff --git a/.gitlab/deploy_containers/conditions.yml b/.gitlab/deploy_containers/conditions.yml index c2f4d08db3d52f..557fbd643c9402 100644 --- a/.gitlab/deploy_containers/conditions.yml +++ b/.gitlab/deploy_containers/conditions.yml @@ -11,20 +11,20 @@ - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ && $FORCE_MANUAL != "true" when: on_success variables: - AGENT_REPOSITORY: agent + AGENT_REPOSITORY: agent-dev DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ && $FORCE_MANUAL == "true" when: manual allow_failure: true variables: - AGENT_REPOSITORY: agent + AGENT_REPOSITORY: agent-dev DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public - when: manual allow_failure: true variables: - AGENT_REPOSITORY: agent + AGENT_REPOSITORY: agent-dev DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public @@ -33,13 +33,13 @@ - if: $FORCE_MANUAL == "true" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ when: manual variables: - AGENT_REPOSITORY: agent + AGENT_REPOSITORY: agent-dev DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ when: on_success variables: - AGENT_REPOSITORY: agent + AGENT_REPOSITORY: agent-dev DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public @@ -60,37 +60,3 @@ AGENT_REPOSITORY: agent DSD_REPOSITORY: dogstatsd IMG_REGISTRIES: public - -# Rule to deploy to our internal repository, on stable branch deploy -.on_internal_final: - - if: $BUCKET_BRANCH == "beta" - when: never - - if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable" - when: never - - when: manual - allow_failure: true - variables: - AGENT_REPOSITORY: ci/datadog-agent/agent-release - CLUSTER_AGENT_REPOSITORY: ci/datadog-agent/cluster-agent-release - DSD_REPOSITORY: ci/datadog-agent/dogstatsd-release - CWS_INSTRUMENTATION_REPOSITORY: ci/datadog-agent/cws-instrumentation-release - IMG_REGISTRIES: internal-aws-ddbuild - -# Rule to deploy to our internal repository on RC -.on_internal_rc: - - if: $FORCE_MANUAL == "true" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ - when: manual - variables: - AGENT_REPOSITORY: ci/datadog-agent/agent-release - CLUSTER_AGENT_REPOSITORY: ci/datadog-agent/cluster-agent-release - DSD_REPOSITORY: ci/datadog-agent/dogstatsd-release - CWS_INSTRUMENTATION_REPOSITORY: ci/datadog-agent/cws-instrumentation-release - IMG_REGISTRIES: internal-aws-ddbuild - - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ - when: on_success - variables: - AGENT_REPOSITORY: ci/datadog-agent/agent-release - CLUSTER_AGENT_REPOSITORY: ci/datadog-agent/cluster-agent-release - DSD_REPOSITORY: ci/datadog-agent/dogstatsd-release - CWS_INSTRUMENTATION_REPOSITORY: ci/datadog-agent/cws-instrumentation-release - IMG_REGISTRIES: internal-aws-ddbuild diff --git a/.gitlab/deploy_containers/deploy_containers_a6.yml b/.gitlab/deploy_containers/deploy_containers_a6.yml index 00054abf91255b..a6eb720db43dd6 100644 --- a/.gitlab/deploy_containers/deploy_containers_a6.yml +++ b/.gitlab/deploy_containers/deploy_containers_a6.yml @@ -23,31 +23,37 @@ include: before_script: - source /root/.bashrc - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 6 --url-safe --pipeline-id $PARENT_PIPELINE_ID)"; fi - - export IMG_SOURCES="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6${JMX}-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6${JMX}-arm64" - - export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}${JMX}" + - export IMG_BASE_SRC="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}" + - export IMG_LINUX_SOURCES="${IMG_BASE_SRC}-6${JMX}-amd64,${IMG_BASE_SRC}-6${JMX}-arm64" + - export IMG_WINDOWS_SOURCES="${IMG_BASE_SRC}-6${JMX}-win1809${FLAVOR}-amd64,${IMG_BASE_SRC}-6${JMX}-winltsc2022${FLAVOR}-amd64" + - if [[ "$FLAVOR" == "-linux" ]]; then export IMG_SOURCES="${IMG_LINUX_SOURCES}"; elif [[ "$FLAVOR" == "-servercore" ]]; then export IMG_SOURCES="${IMG_WINDOWS_SOURCES}"; else export IMG_SOURCES="${IMG_LINUX_SOURCES},${IMG_WINDOWS_SOURCES}"; fi + - export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}${FLAVOR}${JMX}" + + +.deploy_containers-a6_external: + extends: .deploy_containers-a6-base parallel: matrix: - JMX: - "" - "-jmx" + FLAVOR: + - "" + - "-servercore" + - "-linux" deploy_containers-a6: - extends: .deploy_containers-a6-base + extends: .deploy_containers-a6_external rules: !reference [.manual_on_deploy_auto_on_rc] - - deploy_containers-a6-rc: - extends: .deploy_containers-a6-base - variables: - AGENT_REPOSITORY: agent - DSD_REPOSITORY: dogstatsd - IMG_REGISTRIES: public - VERSION: 6-rc + extends: .deploy_containers-a6_external rules: !reference [.on_rc] + variables: + VERSION: 6-rc # @@ -62,8 +68,15 @@ deploy_containers_latest-a6: dependencies: [] parallel: matrix: - - IMG_SOURCES: ${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-arm64 + - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6" + IMG_SOURCES: "%BASE%-amd64,%BASE%-arm64,%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64" IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6,${AGENT_REPOSITORY}:latest-py2 - - IMG_SOURCES: ${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx-arm64 + - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx" + IMG_SOURCES: "%BASE%-amd64,%BASE%-arm64,%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64" IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-jmx,${AGENT_REPOSITORY}:latest-py2-jmx - + - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6" + IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64" + IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-servercore,${AGENT_REPOSITORY}:latest-py2-servercore + - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx" + IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64" + IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-servercore-jmx,${AGENT_REPOSITORY}:latest-py2-servercore-jmx diff --git a/.gitlab/deploy_containers/deploy_containers_a7.yml b/.gitlab/deploy_containers/deploy_containers_a7.yml deleted file mode 100644 index c7ef9ad0f4b11c..00000000000000 --- a/.gitlab/deploy_containers/deploy_containers_a7.yml +++ /dev/null @@ -1,109 +0,0 @@ ---- -# deploy containers stage -# Contains jobs which deploy Agent 6 to staging repositories and to Dockerhub / GCR. - -stages: - - deploy_containers - -include: - - .gitlab/common/container_publish_job_templates.yml - - .gitlab/deploy_containers/conditions.yml - -# -# Image tagging & manifest publication -# -# -# Agent v6 -# -.deploy_containers-a6-base: - extends: .docker_publish_job_definition - stage: deploy_containers - dependencies: [] - before_script: - - source /root/.bashrc - - if [[ "$VERSION" == "" ]]; then export VERSION="$(inv agent.version --major-version 6 --url-safe --pipeline-id $PARENT_PIPELINE_ID)"; fi - - export IMG_BASE_SRC="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}" - - export IMG_LINUX_SOURCES="${IMG_BASE_SRC}-6${JMX}-amd64,${IMG_BASE_SRC}-6${JMX}-arm64" - - export IMG_WINDOWS_SOURCES="${IMG_BASE_SRC}-6${JMX}-win1809${FLAVOR}-amd64,${IMG_BASE_SRC}-6${JMX}-winltsc2022${FLAVOR}-amd64" - - if [[ "$FLAVOR" == "-linux" ]]; then export IMG_SOURCES="${IMG_LINUX_SOURCES}"; elif [[ "$FLAVOR" == "-servercore" ]]; then export IMG_SOURCES="${IMG_WINDOWS_SOURCES}"; else export IMG_SOURCES="${IMG_LINUX_SOURCES},${IMG_WINDOWS_SOURCES}"; fi - - export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}${FLAVOR}${JMX}" - - -.deploy_containers-a6_external: - extends: .deploy_containers-a6-base - parallel: - matrix: - - JMX: - - "" - - "-jmx" - FLAVOR: - - "" - - "-servercore" - - "-linux" - - -deploy_containers-a6: - extends: .deploy_containers-a6_external - rules: - !reference [.manual_on_deploy_auto_on_rc] - -deploy_containers-a6-rc: - extends: .deploy_containers-a6_external - rules: - !reference [.on_rc] - variables: - VERSION: 6-rc - -deploy_containers-a7_internal: - extends: .deploy_containers-a7-base - rules: - !reference [.on_internal_final] - variables: - JMX: "-jmx" - - -deploy_containers-a6_internal-rc: - extends: .deploy_containers-a6-base - rules: - !reference [.on_internal_rc] - variables: - VERSION: 6-rc - - -# -# Latest publication -# - -deploy_containers_latest-a6: - extends: .docker_publish_job_definition - stage: deploy_containers - rules: - !reference [.on_final] - dependencies: [] - parallel: - matrix: - - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6" - IMG_SOURCES: "%BASE%-amd64,%BASE%-arm64,%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64" - IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6,${AGENT_REPOSITORY}:latest - - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx" - IMG_SOURCES: "%BASE%-amd64,%BASE%-arm64,%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64" - IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-jmx,${AGENT_REPOSITORY}:latest-jmx - - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6" - IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64" - IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-servercore,${AGENT_REPOSITORY}:latest-servercore - - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx" - IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64" - IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-servercore-jmx,${AGENT_REPOSITORY}:latest-servercore-jmx - - -deploy_containers_latest-a6_internal: - extends: .docker_publish_job_definition - stage: deploy_containers - rules: - !reference [.on_internal_final] - dependencies: [] - parallel: - matrix: - - IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-6-jmx" - IMG_SOURCES: "%BASE%-amd64,%BASE%-arm64,%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64" - IMG_DESTINATIONS: ${AGENT_REPOSITORY}:6-jmx