-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathJenkinsfile
More file actions
43 lines (43 loc) · 1.05 KB
/
Jenkinsfile
File metadata and controls
43 lines (43 loc) · 1.05 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
pipeline {
agent none
options {
copyArtifactPermission('*');
skipDefaultCheckout true
}
environment { plugin = "Framework" }
triggers {
pollSCM '@monthly'
}
stages {
stage('Ant Build') {
agent { label 'ant' }
tools {
ant 'Default'
jdk 'Default'
}
steps {
checkout scm
sh 'ant -f ant.xml'
recordIssues enabledForFailure: true, tool: java(), unhealthy: 10
archivePlugin 'runsafe', 'build/jar/*.jar,lib/*,lua', "${env.plugin}.tar"
}
}
stage('Deploy to test server') {
when { not { branch 'master' } }
agent { label 'server4' }
steps {
installPlugin "${env.plugin}.tar"
buildReport env.plugin, 'Deployed to test server'
}
}
stage('Deploy to production') {
when { branch 'master' }
agent { label 'server1' }
steps {
stagePlugin "${env.plugin}.tar"
buildReport env.plugin, 'Staged on production server'
}
}
}
post { failure { buildReport env.plugin, 'Build failed' } }
}