-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
44 lines (43 loc) · 1.43 KB
/
Jenkinsfile
File metadata and controls
44 lines (43 loc) · 1.43 KB
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
tools{
maven 'Maven3'
}
stages{
stage('checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/keyspaceits/javawebapp']]])
}
}
stage('build'){
steps {
sh 'mvn clean install -f pom.xml'
}
}
stage('Code Quality') {
steps {
withSonarQubeEnv('SonarQubeServer') {
sh 'mvn sonar:sonar -f pom.xml'
}
}
}
stage('Dev Deploy'){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-user', path: '', url: 'http://3.219.228.196:8080/')], contextPath: 'CounterWebApp', war: '**/*.war'
}
}
stage('Dev apprl for QA') {
steps {
echo "taking approval from Dev Manager"
timeout(time: 7, unit: 'DAYS') {
input message: 'Do you want to proceed to QA?', submitter:'admin'
}
}
}
stage('QA Deploy'){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-user', path: '', url: 'http://3.219.228.196:8080/')], contextPath: 'CounterWebApp', war: '**/*.war'
}
}
}
}