status-mobile/ci/mobile.groovy
Jakub Sokołowski 75f23a19ad
drop use of artifactory maven repo
Signed-off-by: Jakub Sokołowski <jakub@status.im>

- rename jar file to match flatDir search method
- try using ivy repo to pull status-go from github
- drop use of artifactory in pom.xml
- move status-go version to a STATUS_GO_VERSION file
- upgrade status-go to 0.16.0
- unzip with overwriting
- prepare-ios: doewnload archive only if it doesn't exist
- fix prepare-android and prepare-ios
- use Makefile targets to make sure status-go archives exist
- remove unnecessary call to make prepare-android

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2018-10-05 18:18:58 -04:00

66 lines
1.5 KiB
Groovy

common = load 'ci/common.groovy'
ios = load 'ci/ios.groovy'
android = load 'ci/android.groovy'
def wait(lockFile) {
/* Crude wait for a lock file to disappear */
def maxAttempts = 20
def success = false
for (i = 0; i <= maxAttempts; i++) {
rval = fileExists(lockFile)
if (!rval) {
return
}
sleep 10
}
error("Failed to acquire lock: ${lockFile}")
}
def podUpdate() {
/**
* This is awful BUT multiple jobs running on the same host can
* clash when trying to update the CocoaPods maste repo.
* We could set CP_REPOS_DIR, but the would result in
* multiple ~3GB directories all over the place and would be slow.
**/
def lockFile = "${env.HOME}/.cocoapods.lock"
try {
wait(lockFile)
sh "touch ${lockFile}"
sh 'pod update --silent'
} finally {
sh "rm ${lockFile}"
}
}
def prep(type = 'nightly') {
/* 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
}
/* install ruby dependencies */
sh 'bundle install --quiet'
/* npm deps and status-go download */
sh "make prepare-${env.BUILD_PLATFORM}"
/* generate ios/StatusIm.xcworkspace */
dir('ios') {
podUpdate()
sh 'pod install --silent'
}
}
def leinBuild(platform) {
sh "lein prod-build-${platform}"
}
return this