Skip to content

Commit

Permalink
Build SSI artifacts with downloaded gem
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Jan 23, 2025
1 parent 7d6b305 commit 68a23bc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,22 @@ build-gem:
image: $DOCKER_REGISTRY/images/mirror/ruby:3.2.2
stage: package
script:
- mkdir -p pkg tmp
- |
if [ -z "$CI_COMMIT_TAG" ]; then
if [ -n "$CI_COMMIT_TAG" ]; then
.gitlab/check_gem_presence.sh
VERSION=${CI_COMMIT_TAG#v}
gem fetch datadog --version $VERSION
mv datadog-*.gem pkg/
echo $VERSION > tmp/version
else
echo CI_JOB_ID=$CI_JOB_ID
echo CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME
echo CI_COMMIT_SHA=$CI_COMMIT_SHA
.gitlab/patch_gem_version.sh glci $CI_JOB_ID $CI_COMMIT_REF_NAME $CI_COMMIT_SHA
bundle install && chmod go-w -R . && bundle exec rake build
ruby -Ilib -rdatadog/version -e 'puts Gem::Version.new(Datadog::VERSION::STRING).to_s' >> tmp/version
fi
- bundle install && chmod go-w -R . && bundle exec rake build
- mkdir -p tmp && ruby -Ilib -rdatadog/version -e 'puts Gem::Version.new(Datadog::VERSION::STRING).to_s' >> tmp/version
artifacts:
paths:
- pkg
Expand Down

0 comments on commit 68a23bc

Please sign in to comment.