forked from apache/incubator-kie-kogito-runtimes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
86 lines (85 loc) · 2.6 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@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')
timeout(time: 90, unit: 'MINUTES')
}
environment {
SONARCLOUD_TOKEN = credentials('SONARCLOUD_TOKEN')
MAVEN_OPTS = '-Xms512m -Xmx3g'
}
stages {
stage('Initialize') {
steps {
sh 'printenv'
}
}
stage('Build kogito-bom') {
steps {
dir("kogito-bom") {
script {
githubscm.checkoutIfExists('kogito-bom', "$CHANGE_AUTHOR", "$CHANGE_BRANCH", 'kiegroup', "$CHANGE_TARGET")
maven.runMavenWithSubmarineSettings('clean install', true)
}
}
}
}
stage('Build kogito-runtimes') {
steps {
script {
maven.runMavenWithSubmarineSettings('clean install -Prun-code-coverage', false)
}
}
}
stage('Build kogito-cloud') {
steps {
dir("kogito-cloud") {
script {
githubscm.checkoutIfExists('kogito-cloud', "$CHANGE_AUTHOR", "$CHANGE_BRANCH", 'kiegroup', "$CHANGE_TARGET")
maven.runMavenWithSubmarineSettings('clean install', false)
}
}
}
}
stage('Build kogito-examples') {
steps {
dir("kogito-examples") {
script {
githubscm.checkoutIfExists('kogito-examples', "$CHANGE_AUTHOR", "$CHANGE_BRANCH", 'kiegroup', "$CHANGE_TARGET")
maven.runMavenWithSubmarineSettings('clean install', false)
}
}
}
}
stage('Analyze kogito-runtimes') {
steps {
script {
maven.runMavenWithSubmarineSettings('-e -nsu generate-resources -Psonarcloud-analysis', false)
}
}
}
}
post {
unstable {
script {
mailer.sendEmailFailure()
}
}
failure {
script {
mailer.sendEmailFailure()
}
}
always {
junit '**/target/surefire-reports/**/*.xml'
cleanWs()
}
}
}