-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathJenkinsfileSCM
More file actions
62 lines (54 loc) · 1.77 KB
/
JenkinsfileSCM
File metadata and controls
62 lines (54 loc) · 1.77 KB
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
pipeline {
agent {
kubernetes {
inheritFrom "default"
yamlFile 'kubernetesPod.yaml'
yamlMergeStrategy merge()
}
}
parameters {
booleanParam(name: 'SkipTests', defaultValue: false)
}
options {
buildDiscarder(logRotator(numToKeepStr: '3'))
}
stages {
stage('prepare') {
steps {
container('docker') {
sh 'docker pull openanalytics/shinyproxy-integration-test-app'
}
}
}
stage('build'){
steps {
container('shinyproxy-build') {
configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) {
sh 'mvn -Dmaven.repo.local=/tmp/m2 -B -s $MAVEN_SETTINGS_RSB -U clean package -DskipTests'
}
}
}
}
stage('test'){
when {
equals expected: false, actual: params.SkipTests
}
steps {
container('shinyproxy-build') {
configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) {
sh 'mvn -Dmaven.repo.local=/tmp/m2 -B -s $MAVEN_SETTINGS_RSB test'
}
}
}
}
stage('deploy to Nexus'){
steps {
container('shinyproxy-build') {
configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) {
sh 'mvn -Dmaven.repo.local=/tmp/m2 -B -s $MAVEN_SETTINGS_RSB deploy -DskipTests'
}
}
}
}
}
}