~james-page/ubuntu-openstack-ci/drop-tox-from-slave-config

« back to all changes in this revision

Viewing changes to operate/deprecated/912-bounce-slaves.sh

  • Committer: Ryan Beisner
  • Date: 2018-12-13 22:12:48 UTC
  • mfrom: (402.2.9 uosci-func-test-update)
  • Revision ID: ryan.beisner@canonical.com-20181213221248-by9gaj688y9911cw
[1chb1n, r=thedac] Make functional test naming generic and deprecate unused legacy bits

The functional tests may run amulet or zaza based on each
repo's tox definitions.

Leave symlink shims in for legacy amulet jobs until the
corresponding jobs are all updated to point to the new
generic runner file.

Remove several unused legacy amulet helpers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
2
 
echo $0
3
 
 
4
 
# Reboot all jenkins slaves (!!)
5
 
 
6
 
param=$1
7
 
 
8
 
if [ -z "$param" ]; then
9
 
  echo "Reboots all jenkins slaves."
10
 
  echo "Potentially dangerous, so you must confirm with YES."
11
 
  echo "Usage:  (thisscript).sh YES"
12
 
fi
13
 
 
14
 
if [ "$param" == "YES" ]; then
15
 
  # Get jenkins units
16
 
  units=$(juju status --format=yaml | egrep "osci-slave/" \
17
 
    | cut -d ":" -f 1 | sed 's/^ *//')
18
 
  for unit in $units; do
19
 
    echo "rebooting ${unit}!"
20
 
    juju ssh $unit "sudo reboot"&
21
 
  done
22
 
fi
23