-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
45 lines (45 loc) · 840 Bytes
/
Jenkinsfile
File metadata and controls
45 lines (45 loc) · 840 Bytes
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.8'
jdk 'openjdk11'
}
parameters {
string(defaultValue: "main", description: 'Set git branch', name: 'BRANCH')
}
stages {
stage('Preparation') {
steps{
sh 'mvn --version'
}
}
stage('Build') {
steps{
sh 'mvn -B -C -q clean install'
}
post {
always {
junit '**/target/surefire-reports/*.xml'
}
success {
archiveArtifacts artifacts: 'target/sep3-parser-*-jar-with-dependencies.jar'
}
}
}
stage('Deploy') {
when {
expression {
return params.BRANCH == 'main'
}
}
steps{
sh 'mvn -B -C -q deploy -Dskip.unit.tests=true'
}
}
}
post {
always {
cleanWs notFailBuild: true
}
}
}