Skip to content

Commit

Permalink
[gitlab] Give more explicit names to container jobs and stages (#10593)
Browse files Browse the repository at this point in the history
Renames jobs which deploy container images in the deploy-6 and deploy-7 stages to better reflect what they do.

Renames the image_deploy stage into dev_container_deploy to more accurately reflect what the jobs in that stage do (deploy to our dev container registries).

Renames the image_build and image_scan stages to match.
  • Loading branch information
KSerrania authored Feb 7, 2022
1 parent 3f42cd6 commit 7949bb3
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
/.gitlab/functional_test/system_probe.yml @DataDog/agent-network @DataDog/agent-platform
/.gitlab/functional_test_cleanup.yml @DataDog/agent-security @DataDog/agent-network @DataDog/agent-platform

/.gitlab/image_build/ @DataDog/container-integrations @DataDog/agent-platform
/.gitlab/container_build/ @DataDog/container-integrations @DataDog/agent-platform

/.gitlab/image_deploy/ @DataDog/container-integrations @DataDog/agent-platform
/.gitlab/dev_container_deploy/ @DataDog/container-integrations @DataDog/agent-platform

/.gitlab/image_scan.yml @DataDog/container-integrations @DataDog/agent-platform
/.gitlab/container_scan.yml @DataDog/container-integrations @DataDog/agent-platform

/.gitlab/internal_deploy.yml @DataDog/agent-network @DataDog/agent-platform

Expand Down
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ include:
- /.gitlab/kitchen_deploy.yml
- /.gitlab/kitchen_testing.yml
- /.gitlab/pkg_metrics.yml
- /.gitlab/image_build.yml
- /.gitlab/image_scan.yml
- /.gitlab/container_build.yml
- /.gitlab/container_scan.yml
- /.gitlab/check_deploy.yml
- /.gitlab/image_deploy.yml
- /.gitlab/dev_container_deploy.yml
- /.gitlab/deploy_6.yml
- /.gitlab/deploy_7.yml
- /.gitlab/choco_build.yml
Expand Down Expand Up @@ -61,10 +61,10 @@ stages:
- kitchen_deploy
- kitchen_testing
- pkg_metrics
- image_build
- image_scan
- container_build
- container_scan
- check_deploy
- image_deploy
- dev_container_deploy
- deploy6
- deploy7
- choco_build
Expand Down
7 changes: 7 additions & 0 deletions .gitlab/container_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# container_build stage
# Contains jobs to build container images of the Agent.

include:
- /.gitlab/container_build/docker_linux.yml
- /.gitlab/container_build/docker_windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
.docker_build_job_definition:
stage: image_build
stage: container_build
script:
- aws s3 sync --only-show-errors $S3_ARTIFACTS_URI $BUILD_CONTEXT
- TAG_SUFFIX=${TAG_SUFFIX:-}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
.docker_build_windows_job_definition:
stage: image_build
stage: container_build
before_script:
- $ErrorActionPreference = "Stop"
- mkdir ci-scripts
Expand Down Expand Up @@ -53,7 +53,6 @@
- .docker_build_agent_windows_common
rules:
!reference [.on_a7]
stage: image_build
needs: ["windows_msi_and_bosh_zip_x64-a7", "build_windows_container_entrypoint"]
variables:
AGENT_ZIP: "datadog-agent-7*-x86_64.zip"
Expand All @@ -64,7 +63,6 @@
- .docker_build_agent_windows_common
rules:
!reference [.on_a6]
stage: image_build
needs: ["windows_msi_x64-a6", "build_windows_container_entrypoint"]
variables:
AGENT_ZIP: "datadog-agent-6*-x86_64.zip"
Expand All @@ -85,5 +83,5 @@
SERVERCORE: "-servercore"

include:
- /.gitlab/image_build/docker_windows_agent6.yml
- /.gitlab/image_build/docker_windows_agent7.yml
- /.gitlab/container_build/docker_windows_agent6.yml
- /.gitlab/container_build/docker_windows_agent7.yml
20 changes: 10 additions & 10 deletions .gitlab/image_scan.yml → .gitlab/container_scan.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# image_scan stage
# Contains jobs to deploy Docker images of the Agent to specific Dockerhub repos
# container_scan stage
# Contains jobs to deploy container images of the Agent to specific Dockerhub repos
# (datadog/agent-scan and datadog/dogstatsd-scan) to be scanned.

# push every night to docker hub agent-scan repo
scan_nightly-dogstatsd:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_deploy_nightly_repo_branch_a7]
needs:
Expand All @@ -18,7 +18,7 @@ scan_nightly-dogstatsd:

scan_nightly-a6:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_deploy_nightly_repo_branch_a6]
needs:
Expand All @@ -35,7 +35,7 @@ scan_nightly-a6:

scan_nightly-a7:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_deploy_nightly_repo_branch_a7]
needs:
Expand All @@ -52,7 +52,7 @@ scan_nightly-a7:

dca_scan_nightly:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_deploy_nightly_repo_branch_a7]
needs: ["docker_build_cluster_agent_amd64"]
Expand All @@ -64,7 +64,7 @@ dca_scan_nightly:
# push on master to docker hub agent-scan repo
scan_master-dogstatsd:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_main_a7]
needs:
Expand All @@ -76,7 +76,7 @@ scan_master-dogstatsd:

scan_master-a6:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_main_a6]
needs:
Expand All @@ -93,7 +93,7 @@ scan_master-a6:

scan_master-a7:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_main_a7]
needs:
Expand All @@ -110,7 +110,7 @@ scan_master-a7:

dca_scan_master:
extends: .docker_publish_job_definition
stage: image_scan
stage: container_scan
rules:
!reference [.on_main_a7]
needs: ["docker_build_cluster_agent_amd64"]
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/deploy_6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Contains jobs which deploy Agent 6 to staging repositories and to Dockerhub / GCR.

include:
- /.gitlab/deploy_6/docker.yml
- /.gitlab/deploy_6/container.yml
- /.gitlab/deploy_6/nix.yml
- /.gitlab/deploy_6/windows.yml
13 changes: 6 additions & 7 deletions .gitlab/deploy_6/docker.yml → .gitlab/deploy_6/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Image tagging & manifest publication
#

.deploy-a6-base:
.deploy_containers-a6-base:
extends: .docker_publish_job_definition
stage: deploy6
dependencies: []
Expand All @@ -24,15 +24,14 @@
- "-jmx"


deploy-a6:
extends: .deploy-a6-base
deploy_containers-a6:
extends: .deploy_containers-a6-base
rules:
!reference [.on_deploy_a6_manual_auto_on_rc]



deploy-a6-rc:
extends: .deploy-a6-base
deploy_containers-a6-rc:
extends: .deploy_containers-a6-base
rules:
!reference [.on_deploy_a6_rc]
variables:
Expand All @@ -43,7 +42,7 @@ deploy-a6-rc:
# Latest publication
#

deploy_latest-a6:
deploy_containers_latest-a6:
extends: .docker_publish_job_definition
stage: deploy6
rules:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/deploy_7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

include:
- /.gitlab/deploy_7/cluster_agent_cloudfoundry.yml
- /.gitlab/deploy_7/docker.yml
- /.gitlab/deploy_7/container.yml
- /.gitlab/deploy_7/install_script.yml
- /.gitlab/deploy_7/nix.yml
- /.gitlab/deploy_7/windows.yml
Expand Down
17 changes: 8 additions & 9 deletions .gitlab/deploy_7/docker.yml → .gitlab/deploy_7/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Image tagging & manifest publication
#

.deploy-a7-base:
.deploy_containers-a7-base:
extends: .docker_publish_job_definition
stage: deploy7
dependencies: []
Expand All @@ -30,22 +30,21 @@
- "-servercore"


deploy-a7:
extends: .deploy-a7-base
deploy_containers-a7:
extends: .deploy_containers-a7-base
rules:
!reference [.on_deploy_a7_manual_auto_on_rc]



deploy-a7-rc:
extends: .deploy-a7-base
deploy_containers-a7-rc:
extends: .deploy_containers-a7-base
rules:
!reference [.on_deploy_a7_rc]
variables:
VERSION: 7-rc


deploy-dogstatsd:
deploy_containers-dogstatsd:
extends: .docker_publish_job_definition
stage: deploy7
rules:
Expand All @@ -61,7 +60,7 @@ deploy-dogstatsd:
# Latest publication
#

deploy_latest-a7:
deploy_containers_latest-a7:
extends: .docker_publish_job_definition
stage: deploy7
rules:
Expand All @@ -82,7 +81,7 @@ deploy_latest-a7:
IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-win1909-servercore-amd64,%BASE%-win2004-servercore-amd64,%BASE%-win20h2-servercore-amd64,%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7-servercore-jmx,${AGENT_REPOSITORY}:latest-servercore-jmx

deploy_latest-dogstatsd:
deploy_containers_latest-dogstatsd:
extends: .docker_publish_job_definition
stage: deploy7
rules:
Expand Down
8 changes: 8 additions & 0 deletions .gitlab/dev_container_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# dev_container_deploy stage
# Contains jobs to container Docker images of the Agent
# (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
Loading

0 comments on commit 7949bb3

Please sign in to comment.