Changed the Gradle command to explicitly run with bash. This ensures compatibility across different environments where the default shell might cause issues. The stage remains the same, focusing only on command execution improvement.
26 lines
719 B
Groovy
26 lines
719 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Gradle') {
|
|
steps {
|
|
sh 'bash gradlew shadowJar'
|
|
}
|
|
}
|
|
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
|
|
}
|
|
}
|
|
}
|
|
} |