forked from qvacua/vimr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_build_job.groovy
57 lines (49 loc) · 1.36 KB
/
create_build_job.groovy
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
55
56
57
// Install the following plugins in addition to recommended plugins when installing Jenkins
// - Job DSL
// - AnsiColor
//
// And set the "Markup Formatter" in "Manage Jenkins -> Configure Global Security" to "Safe HTML".
def buildSnapshotJob = freeStyleJob('vimr_build')
buildSnapshotJob.with {
description '''\
Builds a new snapshot of VimR and pushes the tag:<br>
<ul>
<li>
<a href="lastSuccessfulBuild/artifact/build/Build/Products/Release/">Last successful Release</a>
</li>
</ul>
'''
logRotator {
numToKeep(10)
}
parameters {
booleanParam('publish', true, 'Publish this release to Github?')
stringParam('branch', 'develop', 'Branch to build; defaults to develop')
stringParam('marketing_version', null, 'Eg "0.34.0". If "is_snapshot" is unchecked, you have to enter this.')
textParam('release_notes', null, 'Release notes')
booleanParam('is_snapshot', true)
booleanParam('update_appcast', true)
booleanParam('update_snapshot_appcast_for_release', true)
booleanParam('use_cache_carthage', false)
}
scm {
git {
remote {
url('[email protected]:qvacua/vimr.git')
}
branch('*/${BRANCH}')
}
}
wrappers {
colorizeOutput()
}
steps {
shell('./bin/build.sh')
}
publishers {
archiveArtifacts {
pattern('build/Build/Products/Release/**')
onlyIfSuccessful()
}
}
}