-
Notifications
You must be signed in to change notification settings - Fork 0
/
Declarative-Jenkinsfile
44 lines (40 loc) · 1.1 KB
/
Declarative-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
43
44
pipeline {
agent any
options {
timestamps()
}
tools {
maven "maven3.8.6"
}
stages {
stage(‘1SCM’){
steps{
sh 'echo "apps latest version committed"'
git "https://github.com/suhaad79/multi-pipeline-project.git"
}
}
stage(‘2Build’){
steps {
sh "mvn clean install"
}
}
stage(‘3QualityTest’){
steps {
sh "echo 'quality test'"
sh "mvn sonar:sonar"
}
}
stage(‘4UploadArtifacts’){
steps {
sh "echo 'Artifactory'"
sh "mvn deploy"
}
}
stage(‘UATDeploy’){
steps {
sh "echo 'deploy to tomcat'"
deploy adapters: [tomcat8(credentialsId: 'tomcat-credentials', path: '', url: 'http://34.202.231.227:8080')], contextPath: null, war: 'target/*war'
}
}
}
}