Integrated `NEXUS_CREDS` environment variable for secure handling of Nexus credentials during the Gradle shadowJar task.
24 lines
743 B
Groovy
24 lines
743 B
Groovy
pipeline {
|
|
agent any
|
|
environment {
|
|
NEXUS_CREDS = credentials('alttd-snapshot-user')
|
|
}
|
|
stages {
|
|
stage('Gradle') {
|
|
steps {
|
|
sh './gradlew shadowJar -x test -PalttdSnapshotUsername=$NEXUS_CREDS_USR -PalttdSnapshotPassword=$NEXUS_CREDS_PSW'
|
|
}
|
|
}
|
|
stage('Archive') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
|
|
}
|
|
}
|
|
stage('discord') {
|
|
steps {
|
|
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
|
|
}
|
|
}
|
|
}
|
|
}
|