Onboard off public-images GitLab job-token trigger - #299
Draft
AliDatadog wants to merge 1 commit into
Draft
Conversation
…h-image Replaces the direct `trigger: project: DataDog/public-images` CI jobs with `dd-pkg publish-image` calls against the artifact-gateway service. This routes public image publishing through a policy/audit layer while still driving the same public-images pipeline; no per-repo registration is required since authorization is implicit via CI job identity. See https://datadoghq.atlassian.net/wiki/x/ooQkngE Ref: BARX-1951
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #299 +/- ##
=======================================
Coverage 38.01% 38.01%
=======================================
Files 65 65
Lines 3856 3856
=======================================
Hits 1466 1466
Misses 2275 2275
Partials 115 115
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DataDog/extendeddaemonsetcurrently publishes public container images by directly triggering theDataDog/public-imagesGitLab CI pipeline viatrigger: project: DataDog/public-images. We're migrating repos off that legacy job-token trigger mechanism ontodd-pkg publish-image, a CLI call against theartifact-gatewayservice.dd-pkg publish-imagestill drives the samepublic-imagespipeline under the hood, but routes through a policy/audit layer instead of an unauthenticated cross-project trigger. No per-repo registration or allowlist step is needed — authorization is implicit via CI job identity — so this change is purely a.gitlab-ci.ymledit.Changes:
.docker_publish_job_definitiontemplate that runsdd-pkg publish-image, translating the existingIMG_*job variables into CLI flags.trigger: project: DataDog/public-imagesblock inpublish_public_main,publish_public_tag, andpublish_public_latestwithextends: .docker_publish_job_definition.stage:,rules:,needs:, andvariables:on each job untouched; only the trigger mechanism changed.trigger: project: DataDog/imagesjobs (internal image promotion) as-is — out of scope for this migration.Background: https://datadoghq.atlassian.net/wiki/x/ooQkngE
Ref: https://datadoghq.atlassian.net/browse/BARX-1951
Test plan
ruby -ryaml -e "YAML.load_file('.gitlab-ci.yml'); puts 'OK'"confirms the file is valid YAML.mainand confirmpublish_public_main(and-fipsvariant) successfully publish images viadd-pkg publish-image.publish_public_tag/publish_public_latest(and-fipsvariants) still publish correctly when run manually.