Skip to content

Commit

Permalink
fix(deploy): [agent6] Deploy RC on agent-dev and remove useless inter…
Browse files Browse the repository at this point in the history
…nal stuff
  • Loading branch information
chouetz committed Dec 19, 2024
1 parent 36a2a3a commit 16323e0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 162 deletions.
44 changes: 5 additions & 39 deletions .gitlab/deploy_containers/conditions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
41 changes: 27 additions & 14 deletions .gitlab/deploy_containers/deploy_containers_a6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


#
Expand All @@ -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
109 changes: 0 additions & 109 deletions .gitlab/deploy_containers/deploy_containers_a7.yml

This file was deleted.

0 comments on commit 16323e0

Please sign in to comment.