Merge lp:~abentley/juju-ci-tools/install-hammer-time into lp:juju-ci-tools

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 1960
Proposed branch: lp:~abentley/juju-ci-tools/install-hammer-time
Merge into: lp:juju-ci-tools
Diff against target: 51 lines (+18/-1)
1 file modified
update-jenkins-slave.bash (+18/-1)
To merge this branch: bzr merge lp:~abentley/juju-ci-tools/install-hammer-time
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+321184@code.launchpad.net

Commit message

Install Hammer Time.

Description of the change

This branch updates update-jenkins-slave.bash to install Hammer Time.

Hammer Time is installed on all Ubuntu slaves, but not others because we don't guarantee that git is installed and correctly configured on them.

While it is possible to install a particular git branch, I suspect that master will be the correct choice for a long time.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'update-jenkins-slave.bash'
2--- update-jenkins-slave.bash 2016-11-11 15:32:33 +0000
3+++ update-jenkins-slave.bash 2017-03-28 15:09:30 +0000
4@@ -15,6 +15,19 @@
5 }
6
7
8+update_git_repo() {
9+ # Clone or pull a git repo.
10+ git_repo=$1
11+ local_dir="$(echo $git_repo|sed -r 's/.*\/([^\/]*)\.git/\1/')"
12+ local_path="$HOME/$local_dir"
13+ if [[ -d $local_path ]]; then
14+ (cd $local_path; git pull $git_repo)
15+ else
16+ git clone $git_repo $local_path
17+ fi
18+}
19+
20+
21 get_os() {
22 # Get the to OS name: ubuntu, darwin, linux, unknown.
23 local_uname=$(uname -a)
24@@ -37,11 +50,15 @@
25 bzr --no-aliases launchpad-login juju-qa-bot
26
27 echo "Updating branches"
28+OS=$(get_os)
29 update_branch lp:workspace-runner
30 update_branch lp:juju-release-tools
31 update_branch lp:juju-ci-tools
32 update_branch lp:juju-ci-tools/repository
33 update_branch lp:~juju-qa/+junk/cloud-city
34+if [[ $OS == "ubuntu" ]]; then
35+ update_git_repo git@github.com:juju/hammer-time.git
36+fi
37
38 echo "Updating permissions"
39 sudo chown -R jenkins $HOME/cloud-city
40@@ -50,10 +67,10 @@
41 chmod 600 $HOME/cloud-city/staging-juju-rsa
42
43 echo "Updating dependencies from branches"
44-OS=$(get_os)
45 if [[ $OS == "ubuntu" ]]; then
46 make -C $HOME/juju-ci-tools install-deps
47 make -C $HOME/workspace-runner install
48+ make -C $HOME/hammer-time develop
49 elif [[ $OS == "darwin" ]]; then
50 $HOME/juju-ci-tools/pipdeps.py install
51 fi

Subscribers

People subscribed via source and target branches