Skip to content

Commit

Permalink
Merge pull request #3713 from DataDog/tonycthsu/relenv-consistent-sha
Browse files Browse the repository at this point in the history
Provide commit sha for RelEnv
  • Loading branch information
TonyCTHsu authored Jul 16, 2024
2 parents f867bd9 + 9cf93d3 commit 2fef64b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,27 @@ onboarding_tests:
variables:
PRODUCT_NAME: auto_inject-ruby

save_versions:
image: $DOCKER_REGISTRY/images/mirror/ruby:3.2.2
stage: deploy
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: on_success
- when: manual
allow_failure: true
script:
- git fetch --all
- echo COMMIT_SHA_1X=$(git rev-parse origin/1.x-stable) >> upstream.env
- echo COMMIT_SHA_2X=$(git rev-parse origin/master) >> upstream.env
artifacts:
paths:
- upstream.env

deploy_to_reliability_env:
stage: deploy
needs: [] # This allows the job to run without prerequisites
needs:
- save_versions
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: on_success
Expand All @@ -248,6 +266,9 @@ deploy_to_reliability_env:
UPSTREAM_PROJECT_ID: $CI_PROJECT_ID
UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
UPSTREAM_PACKAGE_JOB: save_versions
UPSTREAM_PIPELINE_ID: $CI_PIPELINE_ID
CI_SERVER_URL: $CI_SERVER_URL

prepare_image_destinations:
stage: deploy
Expand Down

0 comments on commit 2fef64b

Please sign in to comment.