1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-22 05:01:50 +03:00
vimr/ci/create_build_job.groovy

57 lines
1.3 KiB
Groovy
Raw Normal View History

// Install the following plugins in addition to recommended plugins when installing Jenkins
// - Job DSL
// - AnsiColor
2016-08-19 08:38:08 +03:00
//
// And set the "Markup Formatter" in "Manage Jenkins -> Configure Global Security" to "Safe HTML".
2016-10-14 23:10:15 +03:00
def buildSnapshotJob = freeStyleJob('vimr_build')
buildSnapshotJob.with {
2016-08-19 08:38:08 +03:00
description '''\
Builds a new snapshot of VimR and pushes the tag:<br>
<ul>
<li>
2017-11-30 00:59:49 +03:00
<a href="lastSuccessfulBuild/artifact/build/Build/Products/Release/">Last successful Release</a>
2016-08-19 08:38:08 +03:00
</li>
</ul>
'''
logRotator {
2017-05-17 23:31:38 +03:00
numToKeep(10)
}
parameters {
2017-05-07 18:25:03 +03:00
booleanParam('PUBLISH', true, 'Publish this release to Github?')
stringParam('BRANCH', 'develop', 'Branch to build; defaults to develop')
2017-05-07 18:25:03 +03:00
stringParam('MARKETING_VERSION', null, 'If IS_SNAPSHOT is unchecked, you have to enter this.')
textParam('RELEASE_NOTES', null, 'Release notes')
2016-10-14 23:10:15 +03:00
booleanParam('IS_SNAPSHOT', true)
2016-11-03 22:23:41 +03:00
booleanParam('UPDATE_APPCAST', true)
booleanParam('UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE', true)
}
scm {
git {
remote {
url('git@github.com:qvacua/vimr.git')
}
branch('*/${BRANCH}')
}
}
wrappers {
colorizeOutput()
}
steps {
2016-10-14 23:10:15 +03:00
shell('./bin/build.sh')
}
publishers {
archiveArtifacts {
2017-11-30 00:59:49 +03:00
pattern('build/Build/Products/Release/**')
onlyIfSuccessful()
}
}
}