I have been manually taking the master (and only) node offline whenever I sync our development database to avoid a bunch of false test failures. I have a script that does the full DB import and would like to automate the node maintenance as well.
How can I mark the master node temporarily offline using the command-line interface JAR?
- I wrote a simple Bash script to execute Jenkins tasks.
I can authenticate using that script.
$ jenkins who-am-i Authenticated as: david Authorities: david authenticated
However, I cannot get
offline-node
oronline-node
to recognize the master node. The help states that I can omit the node name for "master", but that doesn't work.$ jenkins offline-node Argument "NAME" is required java -jar jenkins-cli.jar online-node NAME Stop using a node for performing builds temporarily, until the next "online-node" command. NAME : Slave name, or empty string for master
It seems to be looking specifically for a slave, but I need to take the master's executor offline.
$ jenkins offline-node master No such slave "master" exists. Did you mean "null"?