From b6d1273d143c8d9f7871619279c39442af7f0985 Mon Sep 17 00:00:00 2001 From: Tibor Zimanyi Date: Mon, 15 Apr 2019 13:50:06 +0200 Subject: [PATCH] DROOLS-3816 Add PR pipeline (#3) --- Jenkinsfile | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000000..76564aaeca8 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,73 @@ +@Library('jenkins-pipeline-shared-libraries')_ + +pipeline { + agent { + label 'submarine-static || kie-rhel7' + } + tools { + maven 'kie-maven-3.5.4' + jdk 'kie-jdk1.8' + } + options { + buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10') + } + stages { + stage('Initialize') { + steps { + sh 'printenv' + } + } + stage('Build submarine-bom') { + steps { + timeout(15) { + dir("submarine-bom") { + script { + githubscm.checkoutIfExists('submarine-bom', "$CHANGE_AUTHOR", "$CHANGE_BRANCH", 'kiegroup', "$CHANGE_TARGET") + } + sh 'mvn clean install -DskipTests' + } + } + } + } + stage('Build submarine-runtimes') { + steps { + timeout(30) { + dir("submarine-runtimes") { + script { + githubscm.checkoutIfExists('submarine-runtimes', "$CHANGE_AUTHOR", "$CHANGE_BRANCH", 'kiegroup', "$CHANGE_TARGET") + } + sh 'mvn clean install -DskipTests' + } + } + } + } + stage('Build submarine-cloud') { + steps { + timeout(30) { + sh 'mvn clean install' + } + } + } + // Currently there are no tests in submarine-cloud +// stage('Publish test results') { +// steps { +// junit '**/target/surefire-reports/**/*.xml' +// } +// } + } + post { + unstable { + script { + mailer.sendEmailFailure() + } + } + failure { + script { + mailer.sendEmailFailure() + } + } + always { + cleanWs() + } + } +} \ No newline at end of file