Skip to content

Commit 7150057

Browse files
committed
Jenkinsfile
1 parent 465f924 commit 7150057

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Jenkinsfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env groovy
2+
3+
pipeline {
4+
agent any
5+
stages {
6+
stage('SCM Checkout') {
7+
steps {
8+
checkout scm
9+
}
10+
}
11+
12+
stage('Build') {
13+
steps {
14+
script {
15+
def mvnHome = tool 'Maven'
16+
sh "${mvnHome}/bin/mvn clean install -Dmaven.test.failure.ignore=true"
17+
junit '**/target/*-reports/*.xml'
18+
}
19+
}
20+
}
21+
22+
23+
stage('Deploy SNAPSHOT') {
24+
when {
25+
branch 'master'
26+
}
27+
steps {
28+
configFileProvider([configFile(fileId: 'maven-settings-with-deploy-snapshot', variable: 'MAVEN_SETTINGS')]) {
29+
script {
30+
def mvnHome = tool 'Maven'
31+
sh "${mvnHome}/bin/mvn deploy -s $MAVEN_SETTINGS -DskipTests"
32+
}
33+
}
34+
}
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)