Skip to content
This repository was archived by the owner on Sep 18, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@ build_eds_check_image_arm64:
- if [ -n "$CI_COMMIT_TAG" ]; then docker buildx imagetools create $TARGET_IMAGE --tag $RELEASE_IMAGE; fi


.docker_publish_job_definition:
image: registry.ddbuild.io/agent-delivery/dd-pkg:v0.9.0
Comment on lines +133 to +134

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear the inherited before_script for publishing jobs

Because these are now ordinary jobs rather than bridge trigger jobs, every main/tag publication inherits the top-level before_script at lines 27-28 and runs make install-tools before this script. That target installs the repository's Go development toolchain, so the purpose-built dd-pkg image can fail before reaching dd-pkg publish-image when it lacks make or Go; even if those tools happen to exist, each publication unnecessarily installs all development tools. Override before_script with an empty list in this template.

Useful? React with 👍 / 👎.

tags: [ "arch:arm64" ]
before_script: []
variables:
IMG_SIGNING: "false"
IMG_REGISTRIES: "public"
PUBLIC_IMAGES_PUBLISH_TIMEOUT: "1800"
script:
- |
set -euo pipefail
dd-pkg version
args=(publish-image --timeout "${PUBLIC_IMAGES_PUBLISH_TIMEOUT}" --poll-interval 30 --signing="${IMG_SIGNING}")
if [[ -n "${IMG_REGISTRIES:-}" ]]; then args+=(--registries "${IMG_REGISTRIES}"); fi
if [[ -n "${IMG_SOURCES:-}" ]]; then args+=(--sources "${IMG_SOURCES}"); fi
if [[ -n "${IMG_DESTINATIONS:-}" ]]; then args+=(--destinations "${IMG_DESTINATIONS}"); fi
if [[ -n "${IMG_DESTINATIONS_REGEX:-}" ]]; then args+=(--regex-expression "${IMG_DESTINATIONS_REGEX}"); fi
if [[ -n "${IMG_DESTINATIONS_REGEX_REPL:-}" ]]; then args+=(--regex-replacement "${IMG_DESTINATIONS_REGEX_REPL}"); fi
if [[ -n "${IMG_TAG_REFERENCE:-}" ]]; then args+=(--tag-reference "${IMG_TAG_REFERENCE}"); fi
if [[ -n "${IMG_NEW_TAGS:-}" ]]; then args+=(--new-tags "${IMG_NEW_TAGS}"); fi
dd-pkg "${args[@]}"

publish_public_main:
stage: release
rules:
Expand All @@ -139,10 +161,7 @@ publish_public_main:
needs:
- build_eds_image_arm64
- build_eds_image_amd64
trigger:
project: DataDog/public-images
branch: main
strategy: depend
extends: .docker_publish_job_definition
variables:
IMG_SOURCES: $BUILD_DOCKER_REGISTRY/$PROJECTNAME:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-amd64,$BUILD_DOCKER_REGISTRY/$PROJECTNAME:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-arm64
IMG_DESTINATIONS: $PROJECTNAME:main
Expand All @@ -163,10 +182,7 @@ publish_public_tag:
needs:
- build_eds_image_arm64
- build_eds_image_amd64
trigger:
project: DataDog/public-images
branch: main
strategy: depend
extends: .docker_publish_job_definition
variables:
IMG_SOURCES: $BUILD_DOCKER_REGISTRY/$PROJECTNAME:$CI_COMMIT_TAG-amd64,$BUILD_DOCKER_REGISTRY/$PROJECTNAME:$CI_COMMIT_TAG-arm64
IMG_DESTINATIONS: $PROJECTNAME:$CI_COMMIT_TAG
Expand All @@ -187,10 +203,7 @@ publish_public_latest:
needs:
- build_eds_image_arm64
- build_eds_image_amd64
trigger:
project: DataDog/public-images
branch: main
strategy: depend
extends: .docker_publish_job_definition
variables:
IMG_SOURCES: $BUILD_DOCKER_REGISTRY/$PROJECTNAME:$CI_COMMIT_TAG-amd64,$BUILD_DOCKER_REGISTRY/$PROJECTNAME:$CI_COMMIT_TAG-arm64
IMG_DESTINATIONS: $PROJECTNAME:latest
Expand Down
Loading