-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile_default
More file actions
54 lines (49 loc) · 1.02 KB
/
Jenkinsfile_default
File metadata and controls
54 lines (49 loc) · 1.02 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
45
46
47
48
49
50
51
52
53
54
pipeline{
agent any
tools {
maven 'MVN-str'
}
stages{
stage('Build'){
steps {
echo 'Executing sh...'
sh 'mvn clean package'
}
post {
success {
echo 'Now Archiving.....'
archiveArtifacts artifacts: '**/target/*.war'
}
}
}
stage ('Deploy to Staging'){
steps {
build job: 'deploy-to-staging'
}
post {
success {
echo 'Deploy to Staging is success'
}
failure {
echo 'Deploy to STAGE failed...'
}
}
}
stage ('Deploy to Production'){
steps {
timeout(time:5, unit:'MINUTES') {
input message: 'Approve PRODUCTION Deployment?'
}
build job: 'deploy-to-prod'
}
post {
success {
echo 'Code deployed to Production'
}
failure {
echo 'Production Deployment failed...'
}
}
}
}
}