-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
54 lines (51 loc) · 1.36 KB
/
Jenkinsfile
File metadata and controls
54 lines (51 loc) · 1.36 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
node {
stage 'SCM'
bat 'echo SCM built successfully'
stage 'Build'
bat 'echo Build built successfully'
stage 'Analysis'
bat 'echo Build Analysis successfully'
stage 'CF push'
bat 'echo CF push Analysis successfully'
stage 'Test'
try {
bat "echooooooooo test suite is completed"
}catch(err) {
try {
timeout(time: 15, unit: 'SECONDS') {
public def userInput = input(id: 'UserInput', message: 'Approval ', parameters: [[$class: 'TextParameterDefinition', defaultValue: 'Yes', description: 'Approval', name: 'Approval']])
env.ENV = userInput
}
} catch (err1) {
CF_app()
return
}
if ( env.ENV == "Yes") {
CF_app()
return
} else {
currentBuild.result = 'FAILURE'
return
}
}
CF_app()
}
def CF_app() {
stage 'Map route'
bat "echo Mapped the route"
stage 'Unmap route'
bat "echo Unmapped the route"
stage 'Delete app'
bat "echo Deleted the app"
stage 'Promote'
parallel (CloudFoundry_push_to_QA: {
bat "echo Successfully pushed to QA env"
build job: 'Deploy to QA'
}, Cloud_Foundry_push_to_UAT: {
bat "echo Successfully pushed to UAT env"
build job: 'Deploy to UAT'
}, Cloud_Foundry_push_to_INT: {
bat "echo Successfully pushed to INT env"
build job: 'Deploy to INT'
})
}