-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
42 lines (36 loc) · 952 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
34
35
36
37
38
39
40
41
42
pipeline {
agent any
tools {
maven 'maven 3.5.0'
jdk 'Java8'
}
stages {
stage('Build Aplication') {
steps {
sh 'mvn -f otus-domain-root/pom.xml clean install'
}
post {
always {
junit '**/target/surefire-reports/*.xml'
archive '**/target/surefire-reports/*.xml'
}
}
}
stage('Publish artifact') {
steps {
sh 'mvn -f otus-domain-root/pom.xml deploy'
}
}
stage('Sonar Update') {
steps {
sh 'mvn -f otus-domain-root/pom.xml sonar:sonar -Dsonar.host.url=${URL_SONAR} -Dsonar.password=${PWD_SONAR} -Dsonar.login=${USER_SONAR}'
}
}
stage('Build - Development Server') {
steps {
echo "DEPLOY"
// sh 'mvn -f otus-domain-root/pom.xml clean install -Ddatabase.host=${DATABASE_DEV_HOST} -Ddatabase.username=${DATABASE_USER} -Ddatabase.password=${DATABASE_PWD}'
}
}
}
}