Skip to content

Commit

Permalink
Merge pull request #7148 from DataDog/bbujon/ci-gitlab
Browse files Browse the repository at this point in the history
Avoid publishing RC to Sonatype and upload the right assets to GitHub release
  • Loading branch information
PerfectSlayer committed Jun 11, 2024
2 parents a6f130d + 03c60a9 commit 617453e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ deploy_to_sonatype:
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- if: '$CI_COMMIT_TAG =~ /^v.*/'
# Do not deploy release candidate versions
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
when: on_success
- when: manual
allow_failure: true
Expand All @@ -205,6 +206,12 @@ deploy_artifacts_to_github:
when: on_success
- when: manual
allow_failure: true
# Requires the deploy_to_sonatype job to have run first as build cache is broken
# This will deploy the artifacts built from the publishToSonatype task to the GitHub release
needs:
- job: deploy_to_sonatype
# The deploy_to_sonatype job is not run for release candidate versions
optional: true
script:
- aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.gh_release_token --with-decryption --query "Parameter.Value" --out text > github-token.txt
- gh auth login --with-token < github-token.txt
Expand All @@ -221,7 +228,7 @@ generate-lib-init-tag-values:
rules:
- if: '$POPULATE_CACHE'
when: never
# We don't tag prerelease versions
# Do not tag release candidate versions
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
when: on_success
- when: manual
Expand Down

0 comments on commit 617453e

Please sign in to comment.