-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathJenkinsfile
56 lines (54 loc) · 1.39 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
pipeline {
options {
disableConcurrentBuilds()
}
agent any
tools {
maven 'maven-3.6.0'
jdk 'jdk11'
}
environment {
STAGING_DIR = "/scratch/artifacts/imagetool"
}
stages {
stage ('Environment') {
steps {
sh '''
echo "PATH = ${PATH}"
echo "M2_HOME = ${M2_HOME}"
mvn --version
'''
}
}
stage ('Build') {
steps {
sh 'mvn -B -DskipTests -DskipITs clean install'
}
}
stage ('Test') {
steps {
sh 'mvn test'
}
post {
always {
junit 'imagetool/target/surefire-reports/*.xml'
}
}
}
stage ('SystemTest') {
when {
changeRequest()
}
steps {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'otn-cred', passwordVariable: 'ORACLE_SUPPORT_PASSWORD', usernameVariable: 'ORACLE_SUPPORT_USERNAME']]) {
sh 'mvn verify -Dtest.staging.dir=${STAGING_DIR}'
}
}
post {
always {
junit 'tests/target/failsafe-reports/*.xml'
}
}
}
}
}