@@ -200,11 +200,11 @@ pre-release-checks:
200200 allow_failure : false
201201 script :
202202 - |
203- SONATYPE_USERNAME =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_username --with-decryption --query "Parameter.Value" --out text)
204- SONATYPE_PASSWORD =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_password --with-decryption --query "Parameter.Value" --out text)
203+ MAVEN_CENTRAL_USERNAME =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_username --with-decryption --query "Parameter.Value" --out text)
204+ MAVEN_CENTRAL_PASSWORD =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_password --with-decryption --query "Parameter.Value" --out text)
205205 # See https://central.sonatype.org/publish/publish-portal-api/
206206 # 15e0cbbb-deff-421e-9e02-296a24d0cada is deployment, any deployment id listed in central work, the idea is to check whether the token can authenticate
207- curl --request POST --include --fail https://central.sonatype.com/api/v1/publisher/status?id=15e0cbbb-deff-421e-9e02-296a24d0cada --header "Authorization: Bearer $(printf "$SONATYPE_USERNAME:$SONATYPE_PASSWORD " | base64)"
207+ curl --request POST --include --fail https://central.sonatype.com/api/v1/publisher/status?id=15e0cbbb-deff-421e-9e02-296a24d0cada --header "Authorization: Bearer $(printf "$MAVEN_CENTRAL_USERNAME:$MAVEN_CENTRAL_PASSWORD " | base64)"
208208 if [ $? -ne 0 ]; then
209209 echo "Failed to authenticate against central. Check credentials, see https://datadoghq.atlassian.net/wiki/x/Oog5OgE"
210210 exit 1
@@ -768,8 +768,8 @@ deploy_to_di_backend:manual:
768768 UPSTREAM_COMMIT_AUTHOR : $CI_COMMIT_AUTHOR
769769 UPSTREAM_COMMIT_SHORT_SHA : $CI_COMMIT_SHORT_SHA
770770
771- # If the deploy_to_sonatype job is re-run, re-trigger the deploy_artifacts_to_github job as well so that the artifacts match.
772- deploy_to_sonatype :
771+ # If the deploy_to_maven_central job is re-run, re-trigger the deploy_artifacts_to_github job as well so that the artifacts match.
772+ deploy_to_maven_central :
773773 extends : .gradle_build
774774 stage : publish
775775 needs : [ build ]
@@ -786,8 +786,8 @@ deploy_to_sonatype:
786786 - when : manual
787787 allow_failure : true
788788 script :
789- - export SONATYPE_USERNAME =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_username --with-decryption --query "Parameter.Value" --out text)
790- - export SONATYPE_PASSWORD =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_password --with-decryption --query "Parameter.Value" --out text)
789+ - export MAVEN_CENTRAL_USERNAME =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_username --with-decryption --query "Parameter.Value" --out text)
790+ - export MAVEN_CENTRAL_PASSWORD =$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.central_password --with-decryption --query "Parameter.Value" --out text)
791791 - export GPG_PRIVATE_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.signing.gpg_private_key --with-decryption --query "Parameter.Value" --out text)
792792 - export GPG_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.signing.gpg_passphrase --with-decryption --query "Parameter.Value" --out text)
793793 - ./gradlew -PbuildInfo.build.number=$CI_JOB_ID publishToSonatype closeSonatypeStagingRepository -PskipTests $GRADLE_ARGS
@@ -805,11 +805,11 @@ deploy_artifacts_to_github:
805805 when : never
806806 - if : ' $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
807807 when : on_success
808- # Requires the deploy_to_sonatype job to have run first (the UP-TO-DATE gradle check across jobs is broken)
808+ # Requires the deploy_to_maven_central job to have run first (the UP-TO-DATE gradle check across jobs is broken)
809809 # This will deploy the artifacts built from the publishToSonatype task to the GitHub release
810810 needs :
811- - job : deploy_to_sonatype
812- # The deploy_to_sonatype job is not run for release candidate versions
811+ - job : deploy_to_maven_central
812+ # The deploy_to_maven_central job is not run for release candidate versions
813813 optional : true
814814 script :
815815 - 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
0 commit comments