forked from devopstechnologies/Ant-WebProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
43 lines (39 loc) · 947 Bytes
/
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
try{
node {
echo 'Build Started'
stage('Checkout'){
git branch: 'master', credentialsId: 'bitbucket', url: 'https://github.com/devopstrainingblr/Ant-WebProject.git'
}
stage('build'){
sh 'ant -f build-mt.xml'
}
stage('Test'){
/* sh 'mvn test' */
echo 'test done'
}
stage('Package'){
/* sh 'mvn package' */
echo 'Package done'
}
stage('Deploy-dev'){
echo 'Deployed to dev'
}
stage('Deploy-stg'){
echo 'Deployed to stg'
}
stage('Deploy-prod'){
echo 'Deployed to prod'
}
stage('Email'){
body_msg = ''' Jenkins Job success
'''+"$JOB_URL"+'''
Thanks
Jenkins
'''
mail bcc: '', body: body_msg, cc: '', from: '', replyTo: '', subject: 'Job Success', to: '[email protected]'
}
}
}catch(error){
echo 'Some error occured, Please verify'
throw error
}