diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a57c0c5c6a..eb46fd6b6e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -156,6 +156,22 @@ deploy_to_reliability_env: needs: - save_versions +publish-to-ghcr: + extends: .base-packaging-job + needs: + - job: create-multiarch-lib-injection-image + rules: + - if: $SKIP_SHARED_PIPELINE == "true" + when: never + - when: on_success + script: + - export GHCR_TOKEN=$(aws ssm get-parameter --region us-east-1 --name ci.$CI_PROJECT_NAME.gh_ghcr_token --with-decryption --query "Parameter.Value" --out text) + - echo $GHCR_TOKEN | docker login ghcr.io/datadog --username uploader --password-stdin + - crane copy ${INTERNAL_K8S_REGISTRY_BASE}/dd-lib-ruby-init:glci${CI_PIPELINE_ID} ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:glci${CI_PIPELINE_ID} + - crane copy ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:glci${CI_PIPELINE_ID} ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:${CI_COMMIT_SHA} + - crane copy ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:glci${CI_PIPELINE_ID} ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:glci${CI_PIPELINE_ID}-g${CI_COMMIT_SHA} + - if [[ "$CI_COMMIT_BRANCH" == "master" ]]; then crane tag ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:glci${CI_PIPELINE_ID} ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:latest_snapshot; fi + # Currently, the job is implemented with polling mechanism. # # Due to the constraints of Github workflow dispatch endpoint, it does not return the workflow run id. @@ -166,7 +182,7 @@ vaccine: image: registry.ddbuild.io/images/dd-octo-sts-ci-base:v68058725-73f34e7-2025.06-1 tags: ["arch:amd64"] stage: vaccine - needs: [create-multiarch-lib-injection-image] + needs: [create-multiarch-lib-injection-image, publish-to-ghcr] id_tokens: DDOCTOSTS_ID_TOKEN: diff --git a/.gitlab/one-pipeline.locked.yml b/.gitlab/one-pipeline.locked.yml index d88d10f06bf..a2192e2aea6 100644 --- a/.gitlab/one-pipeline.locked.yml +++ b/.gitlab/one-pipeline.locked.yml @@ -1,4 +1,4 @@ # DO NOT EDIT THIS FILE MANUALLY # This file is auto-generated by automation. include: - - remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/f2050f53c1f5aed62a24e6b406c746e7d593230ce02b5d56d2a2296db763ebf4/one-pipeline.yml + - remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/d44e89797a5a47c43cf712193abefe2178a004176606f7e01b77d1ec49a3ef5e/one-pipeline.yml