6
# Install the slave if it is not installed already.
6
juju-log "Installing jenkins-slave..."
7
apt-get -y install -qq jenkins-slave wget
8
juju-log "Installing jenkins-slave..."
9
if [[ ! -f /etc/init/jenkins-slave.conf ]]
11
if [[ "$(apt-cache madison jenkins-slave)" =~ .*jenkins-slave.* ]]
13
apt-get -y install -qq jenkins-slave wget
15
# This series doesn't provide a jenkins.
16
# Install the same slave package as the precise Jenkins master.
17
apt-get -y install -qq wget adduser default-jre-headless upstart-job
18
dpkg -i files/jenkins-slave_*.deb
21
juju-log "Jenkins-slave is already installed"
9
[[ -f /etc/init/jenkins-slave.conf ]] || install_slave
11
# Install some tools - can get set up deployment time
26
# Install extra packages needed by the slave.
13
juju-log "Installing tools..."
14
apt-get -y install -qq `config-get tools`
28
juju-log "Installing tools..."
29
apt-get -y install -qq $(config-get tools)
35
# If a master_url value is specified, use that to configure the slave.
36
master_url="$(config-get master_url)"
37
if [ -n "${master_url}" ]; then
38
juju-log "Using 'master_url' to configure the slave."
39
hooks/configure-slave "${master_url}"
41
juju-log "No 'master_url' set; not configuring slave at this time."
45
# Execute any hook overlay which may be provided
46
# by forks of this charm.
47
install_extra_hooks () {
48
juju-log "Installing hooks..."
49
if [[ -d hooks/install.d ]]
51
for i in $(ls -1 hooks/install.d/*)
59
juju-log "No extra hooks found."
18
# Execute any hook overlay which may be provided
19
# by forks of this charm
20
if [ -d hooks/install.d ]
22
for i in `ls -1 hooks/install.d/*`