2018-12-11 14:27:21 +00:00
|
|
|
cmn = load 'ci/common.groovy'
|
2018-08-21 15:17:25 +00:00
|
|
|
ios = load 'ci/ios.groovy'
|
|
|
|
android = load 'ci/android.groovy'
|
|
|
|
|
2018-08-23 12:56:19 +00:00
|
|
|
def prep(type = 'nightly') {
|
2018-12-11 14:27:21 +00:00
|
|
|
cmn.doGitRebase()
|
2018-08-30 12:56:45 +00:00
|
|
|
/* ensure that we start from a known state */
|
2018-12-13 09:49:16 +00:00
|
|
|
cmn.clean()
|
2019-01-17 17:24:44 +00:00
|
|
|
/* Run at start to void mismatched numbers */
|
|
|
|
cmn.genBuildNumber()
|
2018-08-21 15:17:25 +00:00
|
|
|
/* select type of build */
|
|
|
|
switch (type) {
|
2018-08-22 19:20:47 +00:00
|
|
|
case 'nightly':
|
2018-08-21 15:17:25 +00:00
|
|
|
sh 'cp .env.nightly .env'; break
|
|
|
|
case 'release':
|
|
|
|
sh 'cp .env.prod .env'; break
|
|
|
|
case 'e2e':
|
|
|
|
sh 'cp .env.e2e .env'; break
|
2018-08-29 18:39:35 +00:00
|
|
|
default:
|
|
|
|
sh 'cp .env.jenkins .env'; break
|
2018-08-21 15:17:25 +00:00
|
|
|
}
|
2018-09-01 02:36:51 +00:00
|
|
|
/* install ruby dependencies */
|
|
|
|
sh 'bundle install --quiet'
|
2019-02-27 21:48:37 +00:00
|
|
|
/* node deps, pods, and status-go download */
|
2018-09-18 12:22:30 +00:00
|
|
|
sh "make prepare-${env.BUILD_PLATFORM}"
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
|
2018-08-29 12:38:12 +00:00
|
|
|
def leinBuild(platform) {
|
|
|
|
sh "lein prod-build-${platform}"
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return this
|