diff --git a/Jenkinsfile b/Jenkinsfile index 54966ac..cf2b20b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,13 @@ pipeline { stages { stage('Gradle') { steps { - sh './gradlew build' + withCredentials([usernamePassword(credentialsId: 'my-credentials-id', usernameVariable: 'NEXUS_USERNAME', passwordVariable: 'NEXUS_PASSWORD')]) { + sh """ + ./gradlew build \ + -PalttdSnapshotUsername=$NEXUS_USERNAME \ + -PalttdSnapshotPassword=$NEXUS_PASSWORD + """ + } } } stage('Archive') { @@ -13,8 +19,13 @@ pipeline { } stage('discord') { steps { - discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook + discordSend + description: "Build: ${BUILD_NUMBER}", + showChangeset: true, + result: currentBuild.currentResult, + title: currentBuild.fullProjectName, + webhookURL: env.discordwebhook } } } -} \ No newline at end of file +}