-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
33 lines (33 loc) · 1002 Bytes
/
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
pipeline {
agent {
docker {
image 'maven:3'
args '-v /root/.m2:/root/.m2'
}
}
stages {
stage('Build') {
steps {
configFileProvider([configFile(fileId: '9ea7bb72-cb40-47e4-8af0-e7cb98aeb62c', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -B -s $MAVEN_SETTINGS clean package -P travis'
}
}
}
stage('Test') {
steps {
sh 'mvn test -P travis'
}
}
stage('Publish') {
steps {
configFileProvider([configFile(fileId: 'DeployMicroservice', variable: 'deploy')])
{
sshagent(credentials: ['a65d8fb8-0920-4060-a29d-2c46c3c2f994']){
sh 'chmod 775 $deploy'
sh '$deploy'
}
}
}
}
}
}