-
Notifications
You must be signed in to change notification settings - Fork 2
/
pipeline.dsl
45 lines (40 loc) · 1.24 KB
/
pipeline.dsl
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
pipeline {
agent any
tools {
maven "maven-3.5"
jdk 'java8'
}
stages {
stage('Initialize') {
steps {
sh '''
echo "PATH = ${PATH}"
echo "M2_HOME = ${M2_HOME}"
'''
}
}
stage ('Build') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/Sathyvs/deliver-it.git']]])
sh 'mvn clean -Dmaven.test.failure.ignore=true install'
}
}
stage ('Check Unit Test Reports') {
steps {
script {
if (fileExists('target/surefire-reports/TEST-*.xml')) {
echo 'YES. report found. Recording scripts'
junit 'target/surefire-reports/**/*.xml'
} else {
echo 'There are no test reports to record'
}
}
}
}
stage ('Release') {
steps {
sh 'mvn deploy scm:tag -Drevision=2.0'
}
}
}
}