forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
63 lines (62 loc) · 1.82 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
@Library('jenkins-pipeline-shared-libraries')_
pipeline {
agent {
label 'kie-rhel7&&kie-mem8g'
}
tools {
nodejs "nodejs-11.0.0"
}
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')
timeout(time: 90, unit: 'MINUTES')
}
environment {
SONARCLOUD_TOKEN = credentials('SONARCLOUD_TOKEN')
}
stages {
stage('Initialize') {
steps {
sh 'printenv'
}
}
stage('Prepare') {
steps {
sh "npm install -g yarn"
sh "yarn install"
sh "export XAUTHORITY=$HOME/.Xauthority"
sh "chmod 600 $HOME/.vnc/passwd"
}
}
stage('Build kogito-tooling') {
steps {
dir("kogito-tooling") {
script {
githubscm.checkoutIfExists('kogito-tooling', "$CHANGE_AUTHOR", "$CHANGE_BRANCH", 'kiegroup', "$CHANGE_TARGET")
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh('yarn run init && yarn build:prod')
}
}
}
}
}
}
post {
unstable {
script {
mailer.sendEmailFailure()
}
}
failure {
script {
mailer.sendEmailFailure()
}
}
always {
junit '**/**/junit.xml'
// Temporary workaround to avoid failing builds due to missing reports
// TODO: Uncomment when https://issues.jboss.org/browse/KOGITO-158 is fixed
// junit '**/**/vscode-it-test-report.xml'
cleanWs()
}
}
}