Update Jenkinsfile to include Nexus credentials for Gradle build
Integrated `NEXUS_CREDS` environment variable for secure handling of Nexus credentials during the Gradle shadowJar task.
This commit is contained in:
parent
34b8824d49
commit
e8e3293416
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
|
|
@ -1,9 +1,12 @@
|
|||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
NEXUS_CREDS = credentials('alttd-snapshot-user')
|
||||
}
|
||||
stages {
|
||||
stage('Gradle') {
|
||||
steps {
|
||||
sh 'bash gradlew shadowJar -x test'
|
||||
sh './gradlew shadowJar -x test -PalttdSnapshotUsername=$NEXUS_CREDS_USR -PalttdSnapshotPassword=$NEXUS_CREDS_PSW'
|
||||
}
|
||||
}
|
||||
stage('Archive') {
|
||||
|
|
@ -17,4 +20,4 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user