Add jenkinsfile

This commit is contained in:
Maxopoly
2020-05-29 04:51:53 +02:00
parent d1c3091ee1
commit f1e304f670

31
plugins/namelayer-paper/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,31 @@
pipeline {
agent any
tools {
maven 'Maven 3.6.3'
jdk 'Java 8'
}
stages {
stage ('Build') {
steps {
sh 'mvn -U clean install deploy -P civ-jenkins'
}
}
stage ('Trigger cascading builds') {
when {
expression {
env.BRANCH_NAME == 'master'
}
}
steps {
build '../Citadel/master'
}
}
}
post {
always {
withCredentials([string(credentialsId: 'civclassic-discord-webhook', variable: 'DISCORD_WEBHOOK')]) {
discordSend description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n", footer: 'Civclassic Jenkins', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), title: "${env.JOB_NAME} #${currentBuild.id}", webhookURL: DISCORD_WEBHOOK
}
}
}
}