forked from phaniprasad009/Ant-JavaProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile-newfile
More file actions
46 lines (38 loc) · 1.11 KB
/
Jenkinsfile-newfile
File metadata and controls
46 lines (38 loc) · 1.11 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
node{
stage('Source'){
git 'https://github.com/devopstrainingblr/Ant-JavaProject.git'
if (env.BRANCH_NAME == 'master') {
stage 'Only on master'
println 'This happens only on master branch'
} else {
stage 'Other branches'
println "Current branch ${env.BRANCH_NAME}"
}
}
stage('Build'){
/* bat "ant -f build-mt.xml" */ /*For windows machines*/
sh "ant -f build-mt.xml"
}
stage('Send Email'){
mail bcc: '[email protected]', body: 'Buils is done', cc: '', from: '', replyTo: '', subject: 'Build Status', to: '[email protected]'
}
/*stage('Archive'){
archiveArtifacts '/Users/bhaskarreddyl/.jenkins/workspace/Pipeline-Project-Ant-Web/dist/SampleAntProject.war'
}*/
}
/*
#!groovy
node (label: 'flipkart-node') {
currentBuild.result = "SUCCESS"
try {
stage('Checkout'){
//checkout scm
git credentialsId: '4e0f2682-d66f-4ffa-bf99-8b1a9dbeb3e0', url: 'https://github.com/devopstrainingblr/Maven-Web-Project.git'
}
}
catch (err) {
currentBuild.result = "FAILURE"
throw err
}
*/
}