-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
39 lines (39 loc) · 993 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
pipeline {
agent none
options {
copyArtifactPermission('*');
skipDefaultCheckout true
}
environment { plugin = "Dergons" }
triggers {
upstream '/Runsafe/WorldGuardBridge/' + env.BRANCH_NAME
pollSCM '@monthly'
}
stages {
stage('Ant Build') {
agent { label 'ant' }
tools {
ant 'Default'
jdk 'Default'
}
steps { buildPluginWithAnt env.plugin, 'WorldGuardBridge', 'build/jar/*.jar' }
}
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' } }
}