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 {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
environment {
|
||||||
|
NEXUS_CREDS = credentials('alttd-snapshot-user')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Gradle') {
|
stage('Gradle') {
|
||||||
steps {
|
steps {
|
||||||
sh 'bash gradlew shadowJar -x test'
|
sh './gradlew shadowJar -x test -PalttdSnapshotUsername=$NEXUS_CREDS_USR -PalttdSnapshotPassword=$NEXUS_CREDS_PSW'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Archive') {
|
stage('Archive') {
|
||||||
|
|
@ -17,4 +20,4 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user