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{
|
steps{
|
||||||
withGradle {
|
withGradle {
|
||||||
sh "chmod +x ./gradlew"
|
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/'
|
def releasesRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
url = project.hasProperty('release') && !version.endsWith('SNAPSHOT') ? releasesRepoUrl : snapshotsRepoUrl
|
url = project.hasProperty('release') && !version.endsWith('SNAPSHOT') ? releasesRepoUrl : snapshotsRepoUrl
|
||||||
|
|
||||||
credentials {
|
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
||||||
username System.getenv('mavenCentralUsername')
|
credentials {
|
||||||
password System.getenv('mavenCentralPassword')
|
username project.property("mavenCentralUsername") as String
|
||||||
|
password project.property("mavenCentralPassword") as String
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue