Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,8 @@ deploy_to_sonatype:
- when: manual
allow_failure: true
script:
- export SONATYPE_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.sonatype_username --with-decryption --query "Parameter.Value" --out text)
- export SONATYPE_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.sonatype_password --with-decryption --query "Parameter.Value" --out text)
- 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)
- 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)
- 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)
- 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)
- ./gradlew -PbuildInfo.build.number=$CI_JOB_ID publishToSonatype closeSonatypeStagingRepository -PskipTests $GRADLE_ARGS
Expand Down
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
id 'de.thetaphi.forbiddenapis' version '3.8'

id 'pl.allegro.tech.build.axion-release' version '1.14.4'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'

id 'com.gradleup.shadow' version '8.3.6' apply false
id 'me.champeau.jmh' version '0.7.0' apply false
Expand Down Expand Up @@ -92,7 +92,7 @@ nexusPublishing {
def forceLocal = project.hasProperty('forceLocal') && forceLocal
if (forceLocal && !isCI) {
local {
// For testing use with https://hub.docker.com/r/sonatype/nexus
// For testing, use with https://hub.docker.com/r/sonatype/nexus
// docker run --rm -d -p 8081:8081 --name nexus sonatype/nexus:oss
// ./gradlew publishToLocal
// Doesn't work for testing releases though... (due to staging)
Expand All @@ -103,7 +103,13 @@ nexusPublishing {
allowInsecureProtocol = true
}
} else {
// see https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-central
// For official documentation:
// staging repo publishing https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
// snapshot publishing https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-via-other-methods
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
Expand Down
3 changes: 2 additions & 1 deletion gradle/repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ repositories {
mavenContent {
snapshotsOnly()
}
url 'https://oss.sonatype.org/content/repositories/snapshots/'
// see https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-via-gradle
url 'https://central.sonatype.com/repository/maven-snapshots/'
}
ivy {
artifactPattern 'https://sqreen-ci-java.s3.amazonaws.com/jars/[organisation]/[artifact]-[revision](-[classifier]).[ext]'
Expand Down