Revised the Gradle stage to use 'gradlew build' instead of 'gradlew shadowJar' for better compatibility. This change ensures the build process aligns with the default Gradle task and simplifies the Jenkins pipeline configuration.
26 lines
710 B
Groovy
26 lines
710 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Gradle') {
|
|
steps {
|
|
sh 'gradlew build'
|
|
}
|
|
}
|
|
stage('Archive') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
|
|
}
|
|
}
|
|
stage('discord') {
|
|
when {
|
|
anyOf {
|
|
branch 'main'
|
|
branch 'master'
|
|
}
|
|
}
|
|
steps {
|
|
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
|
|
}
|
|
}
|
|
}
|
|
} |