Use Jenkins credentials binding for Nexus snapshot authentication
This commit is contained in:
parent
d156ee954a
commit
ef211c8de3
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
|
@ -3,7 +3,13 @@ pipeline {
|
|||
stages {
|
||||
stage('Gradle') {
|
||||
steps {
|
||||
sh './gradlew build -PalttdSnapshotUsername=$NEXUS_CREDS_USR -PalttdSnapshotPassword=$NEXUS_CREDS_PSW'
|
||||
withCredentials([usernameColonPassword(credentialsId: 'alttd-snapshot-user', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
|
||||
sh '''
|
||||
set +x
|
||||
chmod +x gradlew
|
||||
./gradlew build -PalttdSnapshotUsername=$USERNAME -PalttdSnapshotPass=$PASSWORD
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archive') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user