Jenkinsfile: add discord webhook

also specify jdk version where needed
This commit is contained in:
Simon Gardling 2021-04-28 12:38:58 -04:00
parent 61f261ee2a
commit 8d5cd6980d
1 changed files with 19 additions and 0 deletions

19
Jenkinsfile vendored
View File

@ -1,8 +1,16 @@
pipeline {
agent { label 'slave' }
options { timestamps() }
environment {
discord_webhook1 = credentials('yatopia_discord_webhook')
}
stages {
stage('Cleanup') {
tools {
jdk "OpenJDK 8"
}
steps {
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
sh 'git config --global gc.auto 0'
@ -14,6 +22,9 @@ pipeline {
}
}
stage('Init project & submodules') {
tools {
jdk "OpenJDK 8"
}
steps {
withMaven(
maven: '3',
@ -83,5 +94,13 @@ pipeline {
}
}
}
stage('Discord Webhook') {
steps {
script {
discordSend description: "Yatopia Jenkins Build", footer: "Yatopia", link: env.BUILD_URL, result: currentBuild.currentResult, title: JOB_NAME, webhookURL: discord_webhook1
}
}
}
}
}