From f1e304f670d973f27dbc0ef9cb47d41524637d59 Mon Sep 17 00:00:00 2001 From: Maxopoly Date: Fri, 29 May 2020 04:51:53 +0200 Subject: [PATCH] Add jenkinsfile --- plugins/namelayer-paper/Jenkinsfile | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/namelayer-paper/Jenkinsfile diff --git a/plugins/namelayer-paper/Jenkinsfile b/plugins/namelayer-paper/Jenkinsfile new file mode 100644 index 000000000..9e61d14f4 --- /dev/null +++ b/plugins/namelayer-paper/Jenkinsfile @@ -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 + } + } + } +}