fix build failure
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
76ace61d17
commit
95d0a782c3
|
@ -29,7 +29,10 @@ def buildBranch(name = null, buildType) {
|
||||||
[name: 'BUILD_TYPE', value: buildType, $class: 'StringParameterValue'],
|
[name: 'BUILD_TYPE', value: buildType, $class: 'StringParameterValue'],
|
||||||
])
|
])
|
||||||
/* BlueOcean seems to not show child-build links */
|
/* BlueOcean seems to not show child-build links */
|
||||||
print "URL: ${b.getAbsoluteUrl()}"
|
print "Build: ${b.getAbsoluteUrl()} (${b.result})"
|
||||||
|
if (b.result != 'SUCCESS') {
|
||||||
|
error("Build Failed")
|
||||||
|
}
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,18 @@ common = load 'ci/common.groovy'
|
||||||
ios = load 'ci/ios.groovy'
|
ios = load 'ci/ios.groovy'
|
||||||
android = load 'ci/android.groovy'
|
android = load 'ci/android.groovy'
|
||||||
|
|
||||||
def podLockExists() {
|
def wait(lockFile) {
|
||||||
def lockFile = (
|
/* Crude wait for a lock file to disappear */
|
||||||
env.HOME+
|
def maxAttempts = 20
|
||||||
'/.cocoapods/repos/master/.git/refs/remotes/origin/master.lock'
|
def success = false
|
||||||
)
|
for (i = 0; i <= maxAttempts; i++) {
|
||||||
return fileExists(lockFile)
|
rval = fileExists(lockFile)
|
||||||
|
if (!rval) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
}
|
||||||
|
error("Failed to acquire lock: ${lockFile}")
|
||||||
}
|
}
|
||||||
|
|
||||||
def podUpdate() {
|
def podUpdate() {
|
||||||
|
@ -17,19 +23,14 @@ def podUpdate() {
|
||||||
* We could set CP_REPOS_DIR, but the would result in
|
* We could set CP_REPOS_DIR, but the would result in
|
||||||
* multiple ~3GB directories all over the place and would be slow.
|
* multiple ~3GB directories all over the place and would be slow.
|
||||||
**/
|
**/
|
||||||
def maxAttempts = 10
|
def lockFile = "${env.HOME}/.cocoapods.lock"
|
||||||
def success = false
|
try {
|
||||||
for (i = 0; i <= maxAttempts; i++) {
|
wait(lockFile)
|
||||||
if (!podLockExists()) {
|
sh "touch ${lockFile}"
|
||||||
success = true
|
sh 'pod update --silent'
|
||||||
break
|
} finally {
|
||||||
}
|
sh "rm ${lockFile}"
|
||||||
sleep 10
|
|
||||||
}
|
}
|
||||||
if (!success) {
|
|
||||||
error('Another pod proc. is preventing us from updating!')
|
|
||||||
}
|
|
||||||
sh 'pod update --silent'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def prep(type = 'nightly') {
|
def prep(type = 'nightly') {
|
||||||
|
|
Loading…
Reference in New Issue