[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: deploy_jdn: dont deploy everywhere if wrong params were given
Holger Levsen
gitlab at salsa.debian.org
Thu Mar 4 13:15:32 GMT 2021
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
6b884986 by Holger Levsen at 2021-03-04T14:10:02+01:00
deploy_jdn: dont deploy everywhere if wrong params were given
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
cc27b39b by Holger Levsen at 2021-03-04T14:14:54+01:00
deploy_jdn: show help text if wrong params where given
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- deploy_jdn
Changes:
=====================================
deploy_jdn
=====================================
@@ -15,30 +15,36 @@
# use at your own risk. it might eat your cats. you have been warned.
# the HOSTS lists below is yet another code duplication…
-# useful things:
-# ./deploy_jdn all - deploy on all nodes (and handle 398 days hosts properly)
-# ./deploy_jdn $host - deploy on $host and jenkins (and handle 398 days hosts properly)
-# ./deploy_jdn all $foo - run "$foo" on all nodes (and handle 398 days hosts properly)
-# ./deploy_jdn - deploy on jenkins only
-# ./deploy_jdn jenkins - deploy on jenkins only
-# ./deploy_jdn jenkins ionos10 - deploy on jenkins and ionos10
-# ./deploy_jdn jenkins o167 - deploy on jenkins and osuosl167
-# ./deploy_jdn jenkins c9 - deploy on jenkins and codethink9
-# ./deploy_jdn jenkins 10 - deploy on jenkins and ionos10
-# ./deploy_jdn jenkins 5 6 - deploy on jenkins and ionos5 and ionos6
-# ./deploy_jdn jenkins amd64 - deploy on jenkins and all amd64 nodes
-# ./deploy_jdn only ionos10 - deploy on ionos10
-# ./deploy_jdn only o167 - deploy on osuosl167
-# ./deploy_jdn only c9 - deploy on codethink9
-# ./deploy_jdn only i10 - deploy on ionos10
-# ./deploy_jdn only 5 6 - deploy on ionos5 and ionos6
-# ./deploy_jdn only amd64 - deploy on all amd64 only
-# ./deploy_jdn upgrade|u - run "apt-get update && upgrade && clean" everywhere
-# ./deploy_jdn upgradey|uy - run "apt-get upgrade -y" everywhere
-# ./deploy_jdn rmstamp|rm - delete stamp files everywhere
-#
-# rebooting all of them, except jenkins is easily done like this
-# $ parallel -j 8 -i sh -c 'ssh {} sudo reboot' -- $(./nodes/list_nodes | grep -v jenkins)
+help() {
+cat <<- EOF
+accepted params:
+ ./deploy_jdn all - deploy on all nodes (and handle 398 days hosts properly)
+ ./deploy_jdn \$host - deploy on \$host and jenkins (and handle 398 days hosts properly)
+ ./deploy_jdn all \$foo - run "\$foo" on all nodes (and handle 398 days hosts properly)
+ ./deploy_jdn - deploy on jenkins only
+ ./deploy_jdn jenkins - deploy on jenkins only
+ ./deploy_jdn jenkins ionos10 - deploy on jenkins and ionos10
+ ./deploy_jdn jenkins o167 - deploy on jenkins and osuosl167
+ ./deploy_jdn jenkins c9 - deploy on jenkins and codethink9
+ ./deploy_jdn jenkins 10 - deploy on jenkins and ionos10
+ ./deploy_jdn jenkins 5 6 - deploy on jenkins and ionos5 and ionos6
+ ./deploy_jdn jenkins amd64 - deploy on jenkins and all amd64 nodes
+ ./deploy_jdn only ionos10 - deploy on ionos10
+ ./deploy_jdn only o167 - deploy on osuosl167
+ ./deploy_jdn only c9 - deploy on codethink9
+ ./deploy_jdn only i10 - deploy on ionos10
+ ./deploy_jdn only 5 6 - deploy on ionos5 and ionos6
+ ./deploy_jdn only amd64 - deploy on all amd64 only
+ ./deploy_jdn upgrade|u - run "apt-get update && upgrade && clean" everywhere
+ ./deploy_jdn upgradey|uy - run "apt-get upgrade -y" everywhere
+ ./deploy_jdn rmstamp|rm - delete stamp files everywhere
+
+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')
GIT_REPO="https://salsa.debian.org/qa/jenkins.debian.net.git"
@@ -149,7 +155,12 @@ elif [ "$1" = "jenkins" ] || [ "$1" = "only" ] ; then
esac
done
echo -n "Running j.d.n.git updates on ${HOSTS[@]} now"
+else
+ echo "I dont understand what to do, please try again."
+ help
+ exit 1
fi
+
BG=""
get_arch_color() {
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/eb3bec8af96f556e125190f7961d2f88eef81174...cc27b39b4374ad9626d71a7b1970b3f710049961
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/eb3bec8af96f556e125190f7961d2f88eef81174...cc27b39b4374ad9626d71a7b1970b3f710049961
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20210304/77b2fdb1/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list