fixed retrieval of nexus credentials
This commit is contained in:
parent
60b8bdd8ac
commit
4cbbabd0e1
2 changed files with 7 additions and 4 deletions
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
|
|
@ -17,7 +17,8 @@ pipeline {
|
|||
steps{
|
||||
withGradle {
|
||||
sh "chmod +x ./gradlew"
|
||||
sh "./gradlew ${gradleParams} -x test clean build"
|
||||
sh "./gradlew ${gradleParams} clean"
|
||||
sh "./gradlew ${gradleParams} -x test build"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,11 @@ publishing {
|
|||
def releasesRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
url = project.hasProperty('release') && !version.endsWith('SNAPSHOT') ? releasesRepoUrl : snapshotsRepoUrl
|
||||
|
||||
credentials {
|
||||
username System.getenv('mavenCentralUsername')
|
||||
password System.getenv('mavenCentralPassword')
|
||||
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
||||
credentials {
|
||||
username project.property("mavenCentralUsername") as String
|
||||
password project.property("mavenCentralPassword") as String
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue