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

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

Commit message

Skip hammer-time where not supported.

Description of the change

This branch prevents hammer-time being downloaded when it would fail.

It blacklists the specific hosts that don't have network connectivity to github. It also prevents downloads on trusty and precise.

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

I have a question about detecting github access.

review: Needs Information (code)
Revision history for this message
Aaron Bentley (abentley) wrote :

Reply below.

1967. By Aaron Bentley

Merged trunk into skip-hammer-time.

1968. By Aaron Bentley

Detect github access instead of using a hardcoded list.

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 2017-03-28 20:45:57 +0000
3+++ update-jenkins-slave.bash 2017-04-03 14:44:48 +0000
4@@ -51,12 +51,24 @@
5
6 echo "Updating branches"
7 OS=$(get_os)
8+if [[ $OS != "ubuntu" ]]; then
9+ hammer_time="disabled"
10+# Does not support python3-venv
11+elif (lsb_release -c|grep -E 'trusty|precise'); then
12+ hammer_time="disabled"
13+# Check network access to github
14+elif (netcat github.com 22 -w 1 > /dev/null < /dev/null); then
15+ hammer_time="enabled"
16+else
17+ hammer_time="disabled"
18+fi
19+
20 update_branch lp:workspace-runner
21 update_branch lp:juju-release-tools
22 update_branch lp:juju-ci-tools
23 update_branch lp:juju-ci-tools/repository
24 update_branch lp:~juju-qa/+junk/cloud-city
25-if [[ $OS == "ubuntu" ]]; then
26+if [[ $hammer_time == "enabled" ]]; then
27 sudo apt-get install git -y
28 update_git_repo git@github.com:juju/hammer-time.git
29 fi
30@@ -71,11 +83,11 @@
31 if [[ $OS == "ubuntu" ]]; then
32 make -C $HOME/juju-ci-tools install-deps
33 make -C $HOME/workspace-runner install
34- if (lsb_release -c|grep -v -E 'trusty|precise'); then
35- make -C $HOME/hammer-time develop
36- fi
37 elif [[ $OS == "darwin" ]]; then
38 $HOME/juju-ci-tools/pipdeps.py install
39 fi
40+if [[ $hammer_time == "enabled" ]]; then
41+ make -C $HOME/hammer-time develop
42+fi
43
44 echo "$HOSTNAME update complete"

Subscribers

People subscribed via source and target branches