FYI - A workaround for Serverstack:
#!/bin/bash -xe # FYI, set env var if juju enviro is needed, ex: export jenv="-e beis0"
master="jenkins/0" f_dst="/var/lib/jenkins/proxy.xml" f_tmp="/home/ubuntu/proxy.xml" f_src="deploy-files/proxy.xml"
if [ ! -f "$f_src" ]; then echo "Local proxy source file not found." exit 1 fi
juju scp ${jenv} $f_src ${master}:${f_tmp} juju ssh ${jenv} ${master} "sudo cp -f ${f_tmp} ${f_dst} &&\ stat ${f_dst} &&\ sudo service jenkins restart &&\ sudo status jenkins"
FYI - A workaround for Serverstack:
#!/bin/bash -xe
# FYI, set env var if juju enviro is needed, ex: export jenv="-e beis0"
master="jenkins/0" /var/lib/ jenkins/ proxy.xml" /home/ubuntu/ proxy.xml" deploy- files/proxy. xml"
f_dst="
f_tmp="
f_src="
if [ ! -f "$f_src" ]; then
echo "Local proxy source file not found."
exit 1
fi
juju scp ${jenv} $f_src ${master}:${f_tmp}
juju ssh ${jenv} ${master} "sudo cp -f ${f_tmp} ${f_dst} &&\
stat ${f_dst} &&\
sudo service jenkins restart &&\
sudo status jenkins"