Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/build-scripts:fix-build into ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Konrad Zapałowicz
Approved revision: fc5b2b2f3bb2676785db2da2f67031a3c5d1bfd9
Merged at revision: f6c019f2efa305f59cf9268723a1327001d92500
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/build-scripts:fix-build
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master
Diff against target: 17 lines (+4/-1)
1 file modified
jobs/generic-build-snap-worker (+4/-1)
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) code Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+319283@code.launchpad.net

Commit message

Create local branches for all remotes

This is needed so we can push all braches later with
'git push --all'.

Description of the change

Create local branches for all remotes

This is needed so we can push all braches later with
'git push --all'.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/generic-build-snap-worker b/jobs/generic-build-snap-worker
2index 074318d..4f09bf5 100755
3--- a/jobs/generic-build-snap-worker
4+++ b/jobs/generic-build-snap-worker
5@@ -18,8 +18,11 @@ set -x
6
7 [ -e $WORKSPACE/src ] && rm -rf $WORKSPACE/src
8
9-git clone -b $TARGET_GIT_REPO_BRANCH $TARGET_GIT_REPO $WORKSPACE/src
10+git clone --no-checkout $TARGET_GIT_REPO $WORKSPACE/src
11 cd $WORKSPACE/src
12+for remote in `git branch -r | grep -v origin/master`; do git checkout --track $remote ; done
13+
14+git checkout $TARGET_GIT_REPO_BRANCH
15
16 git config user.name "System Enablement CI Bot"
17 git config user.email "ce-system-enablement@lists.canonical.com"

Subscribers

People subscribed via source and target branches