-
Notifications
You must be signed in to change notification settings - Fork 5
/
Jenkinsfile
71 lines (58 loc) · 1.68 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
String packageProfiles= 'javax-dependencies,ldap,tomcat-distribution';
pipeline {
agent {
kubernetes {
yamlFile 'kubernetesPod.yaml'
defaultContainer 'rpooli-build'
}
}
options {
authorizationMatrix(['hudson.model.Item.Build:rsb', 'hudson.model.Item.Read:rsb'])
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('build + deploy artifacts') {
steps {
configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) {
sh "mvn package deploy\
-P ${packageProfiles}\
--batch-mode -s $MAVEN_SETTINGS_RSB\
-Dmaven.test.failure.ignore=true"
}
}
}
stage('generate + deploy site') {
steps {
configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) {
sh "mvn -f rsb/ site-deploy\
-P ${packageProfiles}\
--batch-mode -s $MAVEN_SETTINGS_RSB"
}
}
}
stage('run integration tests') {
steps {
sh "export JENKINS_NODE_COOKIE=dontKillMe R_HOME=/usr/lib/R &&\
mvn -f it-rpooli/ jetty:run-war\
--batch-mode > it-rpooli/jetty-rpooli.out 2>&1 &"
sh "sleep 2 && curl --retry 60 --retry-delay 1 --retry-connrefused --output /dev/null\
http://127.0.0.1:8889/rpooli/"
sh "mvn verify -P it,javax-dependencies\
--batch-mode\
-Dmaven.test.failure.ignore=true"
sh "mvn -f it-rpooli/ jetty:stop\
--batch-mode"
}
}
}
post {
always {
archiveArtifacts(
artifacts: '**/target/dependency-*.txt',
fingerprint: true )
junit '**/target/surefire-reports/*.xml'
junit '**/target/failsafe-reports/*.xml'
archiveArtifacts artifacts: 'it-rpooli/*.out'
}
}
}