Skip to content

Commit

Permalink
fixing audit module releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
coutoPL committed Nov 27, 2023
1 parent b06a5d3 commit 10e9b62
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 33 deletions.
33 changes: 1 addition & 32 deletions audit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ tasks.register('javadocJar', Jar) {
}

group = 'tech.beshu.ror'
archivesBaseName = 'audit'
version = pluginVersion

publishing {
Expand All @@ -151,45 +150,15 @@ publishing {
pom ror_pom
}
}
repositories {
maven {
name 'deploy'
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('MAVEN_REPO_USER')
password = System.getenv('MAVEN_REPO_PASSWORD')
}
}
}
}

signing {
sign(publishing.publications)
}

//region Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies
// Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies
// https://github.com/gradle/gradle/issues/26091
tasks.withType(AbstractPublishToMaven.class).configureEach {
def signingTasks = tasks.withType(Sign.class)
mustRunAfter(signingTasks)
}

nexusPublishing {
packageGroup = "tech.beshu"

repositories {
sonatype {
stagingProfileId = System.getenv('MAVEN_STAGING_PROFILE_ID')
username = System.getenv('MAVEN_REPO_USER')
password = System.getenv('MAVEN_REPO_PASSWORD')
}
}

clientTimeout = Duration.ofSeconds(120)
connectTimeout = Duration.ofSeconds(60)

transitionCheckOptions {
maxRetries.set(50)
delayBetween.set(java.time.Duration.ofMillis(10000))
}
}
2 changes: 1 addition & 1 deletion bin/run-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ if [[ $ROR_TASK == "publish_artifacts" ]] && [[ $TRAVIS_BRANCH == "master" ]] ;

if [[ $CURRENT_PLUGIN_VER == $PUBLISHED_PLUGIN_VER ]]; then
echo ">>> Publishing audit module artifacts to sonatype repo"
./gradlew publish closeAndReleaseSonatypeStagingRepository
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
else
echo ">>> Skipping publishing audit module artifacts"
fi
Expand Down
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,24 @@ plugins {
tasks.register("buildRorPlugin", RorTaskFinder) {
dependsOn it.findRorTaskForEsVersion()
}

group = 'tech.beshu.ror'
version = pluginVersion

nexusPublishing {
repositories {
sonatype {
stagingProfileId = System.getenv('MAVEN_STAGING_PROFILE_ID')
username = System.getenv('MAVEN_REPO_USER')
password = System.getenv('MAVEN_REPO_PASSWORD')
}
}

clientTimeout = Duration.ofSeconds(120)
connectTimeout = Duration.ofSeconds(60)

transitionCheckOptions {
maxRetries.set(50)
delayBetween.set(java.time.Duration.ofMillis(10000))
}
}

0 comments on commit 10e9b62

Please sign in to comment.