Commit cc27b39b authored by Holger Levsen's avatar Holger Levsen
Browse files

deploy_jdn: show help text if wrong params where given



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 6b884986
...@@ -15,30 +15,36 @@ ...@@ -15,30 +15,36 @@
# use at your own risk. it might eat your cats. you have been warned. # use at your own risk. it might eat your cats. you have been warned.
# the HOSTS lists below is yet another code duplication… # the HOSTS lists below is yet another code duplication…
# useful things: help() {
# ./deploy_jdn all - deploy on all nodes (and handle 398 days hosts properly) cat <<- EOF
# ./deploy_jdn $host - deploy on $host and jenkins (and handle 398 days hosts properly) accepted params:
# ./deploy_jdn all $foo - run "$foo" on all nodes (and handle 398 days hosts properly) ./deploy_jdn all - deploy on all nodes (and handle 398 days hosts properly)
# ./deploy_jdn - deploy on jenkins only ./deploy_jdn \$host - deploy on \$host and jenkins (and handle 398 days hosts properly)
# ./deploy_jdn jenkins - deploy on jenkins only ./deploy_jdn all \$foo - run "\$foo" on all nodes (and handle 398 days hosts properly)
# ./deploy_jdn jenkins ionos10 - deploy on jenkins and ionos10 ./deploy_jdn - deploy on jenkins only
# ./deploy_jdn jenkins o167 - deploy on jenkins and osuosl167 ./deploy_jdn jenkins - deploy on jenkins only
# ./deploy_jdn jenkins c9 - deploy on jenkins and codethink9 ./deploy_jdn jenkins ionos10 - deploy on jenkins and ionos10
# ./deploy_jdn jenkins 10 - deploy on jenkins and ionos10 ./deploy_jdn jenkins o167 - deploy on jenkins and osuosl167
# ./deploy_jdn jenkins 5 6 - deploy on jenkins and ionos5 and ionos6 ./deploy_jdn jenkins c9 - deploy on jenkins and codethink9
# ./deploy_jdn jenkins amd64 - deploy on jenkins and all amd64 nodes ./deploy_jdn jenkins 10 - deploy on jenkins and ionos10
# ./deploy_jdn only ionos10 - deploy on ionos10 ./deploy_jdn jenkins 5 6 - deploy on jenkins and ionos5 and ionos6
# ./deploy_jdn only o167 - deploy on osuosl167 ./deploy_jdn jenkins amd64 - deploy on jenkins and all amd64 nodes
# ./deploy_jdn only c9 - deploy on codethink9 ./deploy_jdn only ionos10 - deploy on ionos10
# ./deploy_jdn only i10 - deploy on ionos10 ./deploy_jdn only o167 - deploy on osuosl167
# ./deploy_jdn only 5 6 - deploy on ionos5 and ionos6 ./deploy_jdn only c9 - deploy on codethink9
# ./deploy_jdn only amd64 - deploy on all amd64 only ./deploy_jdn only i10 - deploy on ionos10
# ./deploy_jdn upgrade|u - run "apt-get update && upgrade && clean" everywhere ./deploy_jdn only 5 6 - deploy on ionos5 and ionos6
# ./deploy_jdn upgradey|uy - run "apt-get upgrade -y" everywhere ./deploy_jdn only amd64 - deploy on all amd64 only
# ./deploy_jdn rmstamp|rm - delete stamp files everywhere ./deploy_jdn upgrade|u - run "apt-get update && upgrade && clean" everywhere
# ./deploy_jdn upgradey|uy - run "apt-get upgrade -y" everywhere
# rebooting all of them, except jenkins is easily done like this ./deploy_jdn rmstamp|rm - delete stamp files everywhere
# $ parallel -j 8 -i sh -c 'ssh {} sudo reboot' -- $(./nodes/list_nodes | grep -v jenkins)
Rebooting all nodes, except jenkins, is easily done like this:
$ parallel -j 8 -i sh -c 'ssh {} sudo reboot' -- \$(./nodes/list_nodes | grep -v jenkins)
EOF
}
START=$(date +'%s') START=$(date +'%s')
GIT_REPO="https://salsa.debian.org/qa/jenkins.debian.net.git" GIT_REPO="https://salsa.debian.org/qa/jenkins.debian.net.git"
...@@ -151,6 +157,7 @@ elif [ "$1" = "jenkins" ] || [ "$1" = "only" ] ; then ...@@ -151,6 +157,7 @@ elif [ "$1" = "jenkins" ] || [ "$1" = "only" ] ; then
echo -n "Running j.d.n.git updates on ${HOSTS[@]} now" echo -n "Running j.d.n.git updates on ${HOSTS[@]} now"
else else
echo "I dont understand what to do, please try again." echo "I dont understand what to do, please try again."
help
exit 1 exit 1
fi fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment