Merge lp:~canonical-platform-qa/qa-jenkins-jobs/git-retry-lifeboat into lp:qa-jenkins-jobs

Proposed by Allan LeSage
Status: Merged
Approved by: Max Brustkern
Approved revision: 51
Merged at revision: 54
Proposed branch: lp:~canonical-platform-qa/qa-jenkins-jobs/git-retry-lifeboat
Merge into: lp:qa-jenkins-jobs
Diff against target: 23 lines (+12/-1)
1 file modified
ubuntu-system-tests/jobs.yaml (+12/-1)
To merge this branch: bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/git-retry-lifeboat
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
Review via email: mp+292102@code.launchpad.net

Commit message

Retry git checkout of lifeboat service.

Description of the change

We sometimes get 500s from Launchpad git service, instead of failing retry!

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

That's awesome, I didn't know shell had until.

review: Approve
52. By Allan LeSage

De-tabify.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-system-tests/jobs.yaml'
2--- ubuntu-system-tests/jobs.yaml 2016-03-10 21:53:46 +0000
3+++ ubuntu-system-tests/jobs.yaml 2016-04-18 16:27:27 +0000
4@@ -129,7 +129,18 @@
5
6 # use plars' lifeboat scripts to get our adb serial
7 rm -rf lifeboat
8- git clone $LIFEBOAT_BRANCH lifeboat
9+ # we occasionally see 500s from Launchpad git service
10+ GIT_RETRY=0
11+ until git clone $LIFEBOAT_BRANCH lifeboat || [ $GIT_RETRY -gt 10 ]; do
12+ sleep 1
13+ GIT_RETRY=$(($GIT_RETRY+1))
14+ echo "git clone lifeboat attempt failed, trying again . . .'
15+ done
16+ if [ $GIT_RETRY -gt 10 ]; then
17+ echo "error: git clone lifeboat failed!"
18+ exit 1
19+ fi
20+
21 export ANDROID_SERIAL=$(./lifeboat/get-device-info serial $NODE_NAME)
22
23 rm -rf $WORKSPACE/results

Subscribers

People subscribed via source and target branches