Corrected insecure usage of environment variables
This commit is contained in:
parent
bbfc9c407c
commit
5fe5a305a5
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
|
@ -1,17 +1,18 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
environment {
|
||||||
|
NEXUS_CREDS = credentials('alttd-snapshot-user')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Gradle') {
|
stage('Gradle') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'alttd-snapshot-user', usernameVariable: 'NEXUS_USERNAME', passwordVariable: 'NEXUS_PASSWORD')]) {
|
|
||||||
sh """
|
sh """
|
||||||
./gradlew build \
|
./gradlew build \
|
||||||
-PalttdSnapshotUsername=$NEXUS_USERNAME \
|
-PalttdSnapshotUsername=$NEXUS_CREDS_USR \
|
||||||
-PalttdSnapshotPassword=$NEXUS_PASSWORD
|
-PalttdSnapshotPassword=$NEXUS_CREDS_PSW
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
stage('Archive') {
|
stage('Archive') {
|
||||||
steps {
|
steps {
|
||||||
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
|
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user