Call make-prepare also on Desktop CI builds

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
Pedro Pombeiro 2019-03-22 14:24:58 +01:00
parent c53553e137
commit 738521092b
No known key found for this signature in database
GPG Key ID: C4A24185B2AA48A1
8 changed files with 38 additions and 39 deletions

View File

@ -59,7 +59,7 @@ pipeline {
print "Running ${btype} build!"
cmn.ci.abortPreviousRunningBuilds()
/* Cleanup and Prep */
mobile.prep(btype)
cmn.prep(btype)
}
}
}

View File

@ -40,12 +40,11 @@ pipeline {
/* Necessary to load methods */
mobile = load 'ci/mobile.groovy'
cmn = load 'ci/common.groovy'
btype = cmn.utils.getBuildType()
btype = cmn.utils.getBuildType()
print "Running ${btype} build!"
cmn.ci.abortPreviousRunningBuilds()
/* Cleanup and Prep */
cmn.prepNixEnvironment()
mobile.prep(btype)
cmn.prep(btype)
}
}
}

View File

@ -58,8 +58,7 @@ pipeline {
print "Running ${btype} build!"
cmn.ci.abortPreviousRunningBuilds()
/* Cleanup and Prep */
cmn.prepNixEnvironment()
desktop.prepDeps()
cmn.prep(btype)
}
}
}

View File

@ -42,8 +42,7 @@ pipeline {
print "Running ${btype} build!"
cmn.ci.abortPreviousRunningBuilds()
/* Cleanup and Prep */
cmn.prepNixEnvironment()
desktop.prepDeps()
cmn.prep(btype)
}
}
}

View File

@ -61,8 +61,7 @@ pipeline {
print "Running ${btype} build!"
cmn.ci.abortPreviousRunningBuilds()
/* Cleanup and Prep */
cmn.prepNixEnvironment()
desktop.prepDeps()
cmn.prep(btype)
}
}
}

View File

@ -52,4 +52,36 @@ def prepNixEnvironment() {
}
}
def prep(type = 'nightly') {
prepNixEnvironment()
utils.doGitRebase()
/* ensure that we start from a known state */
sh 'make clean'
/* select type of build */
switch (type) {
case 'nightly':
sh 'cp .env.nightly .env'; break
case 'release':
sh 'cp .env.prod .env'; break
case 'e2e':
sh 'cp .env.e2e .env'; break
default:
sh 'cp .env.jenkins .env'; break
}
if (env.TARGET_PLATFORM == 'android' || env.TARGET_PLATFORM == 'ios') {
/* Run at start to void mismatched numbers */
utils.genBuildNumber()
/* install ruby dependencies */
utils.nix_sh 'bundle install --quiet'
}
def prepareTarget=env.TARGET_PLATFORM
if (env.TARGET_PLATFORM == 'macos' || env.TARGET_PLATFORM == 'linux' || env.TARGET_PLATFORM == 'windows') {
prepareTarget='desktop'
}
/* node deps, pods, and status-go download */
utils.nix_sh "make prepare-${prepareTarget}"
}
return this

View File

@ -42,11 +42,6 @@ def uploadArtifact(filename) {
/* MAIN --------------------------------------------------*/
def prepDeps() {
utils.doGitRebase()
cleanupAndDeps()
}
def compile() {
/* disable logs for desktop builds when releasing */
if (params.BUILD_TYPE == 'release') {

View File

@ -1,28 +1,4 @@
ios = load 'ci/ios.groovy'
utils = load 'ci/utils.groovy'
android = load 'ci/android.groovy'
def prep(type = 'nightly') {
utils.doGitRebase()
/* ensure that we start from a known state */
sh 'make clean'
/* Run at start to void mismatched numbers */
utils.genBuildNumber()
/* select type of build */
switch (type) {
case 'nightly':
sh 'cp .env.nightly .env'; break
case 'release':
sh 'cp .env.prod .env'; break
case 'e2e':
sh 'cp .env.e2e .env'; break
default:
sh 'cp .env.jenkins .env'; break
}
/* install ruby dependencies */
utils.nix_sh 'bundle install --quiet'
/* node deps, pods, and status-go download */
utils.nix_sh "make prepare-${env.TARGET_PLATFORM}"
}
return this