Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Add skippable discord notifications to the build
Dieser Commit ist enthalten in:
Ursprung
a5e0cab48a
Commit
5fcf48e1c6
10
bootstrap/fabric/Jenkinsfile
vendored
10
bootstrap/fabric/Jenkinsfile
vendored
@ -4,9 +4,15 @@ pipeline {
|
|||||||
gradle 'Gradle 6'
|
gradle 'Gradle 6'
|
||||||
jdk 'Java 8'
|
jdk 'Java 8'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parameters{
|
||||||
|
booleanParam(defaultValue: false, description: 'Skip Discord notification', name: 'SKIP_DISCORD')
|
||||||
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
buildDiscarder(logRotator(artifactNumToKeepStr: '20'))
|
buildDiscarder(logRotator(artifactNumToKeepStr: '20'))
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage ('Build') {
|
stage ('Build') {
|
||||||
steps {
|
steps {
|
||||||
@ -85,9 +91,13 @@ pipeline {
|
|||||||
env.changes = message
|
env.changes = message
|
||||||
}
|
}
|
||||||
deleteDir()
|
deleteDir()
|
||||||
|
script {
|
||||||
|
if(!params.SKIP_DISCORD) {
|
||||||
withCredentials([string(credentialsId: 'geyser-discord-webhook', variable: 'DISCORD_WEBHOOK')]) {
|
withCredentials([string(credentialsId: 'geyser-discord-webhook', variable: 'DISCORD_WEBHOOK')]) {
|
||||||
discordSend description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n${changes}\n\n[**Artifacts on Jenkins**](https://ci.nukkitx.com/job/Geyser)", footer: 'Cloudburst Jenkins', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), title: "${env.JOB_NAME} #${currentBuild.id}", webhookURL: DISCORD_WEBHOOK
|
discordSend description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n${changes}\n\n[**Artifacts on Jenkins**](https://ci.nukkitx.com/job/Geyser)", footer: 'Cloudburst Jenkins', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), title: "${env.JOB_NAME} #${currentBuild.id}", webhookURL: DISCORD_WEBHOOK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren