Add credentials to Jenkinsfile
This commit is contained in:
parent
b65fcdb1c7
commit
38228ea585
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user