32 lines
1.0 KiB
Groovy
32 lines
1.0 KiB
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Gradle') {
|
|
steps {
|
|
withCredentials([usernamePassword(credentialsId: 'my-credentials-id', usernameVariable: 'NEXUS_USERNAME', passwordVariable: 'NEXUS_PASSWORD')]) {
|
|
sh """
|
|
./gradlew build \
|
|
-PalttdSnapshotUsername=$NEXUS_USERNAME \
|
|
-PalttdSnapshotPassword=$NEXUS_PASSWORD
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|