forked from devopstechlab/maven-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile1
41 lines (39 loc) · 1.12 KB
/
Jenkinsfile1
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
pipeline {
agent any
tools {
maven 'maven3'
jdk 'java8'
}
stages {
stage('init') {
steps {
echo "This is initializing stage"
}
}
stage('Build') {
steps {
echo "This is Build Stage"
sh label: '', script: 'mvn clean package checkstyle:checkstyle'
}
post {
success {
echo "Code Quality Check"
checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
echo "Publish Junit Report"
junit '**/surefire-reports/*.xml'
echo "Archive Artifact"
archiveArtifacts '**/webapp.war'
}
}
}
stage('Deploy') {
steps {
timeout(time: 90, unit: 'SECONDS') {
input 'Do you want to deploy in Dev Environment?'
}
echo "This is Deployment Stage"
build 'dev-deploy'
}
}
}
}