java - Disabling a jenkins job for x number of hours -
i looking disable jenkins job amount of time 4 hours now.
for eg want disable job 4 hours starting 11 am, please allow me know whether possible?
you create 2 helper jobs:
one job scheduled run @ 11 disables job want and another job runs @ 15 pm enables jobthe actual enabling , disabling of jobs easiest using jenkins command line client, either java client (https://wiki.jenkins-ci.org/display/jenkins/jenkins+cli) or ssh client (https://wiki.jenkins-ci.org/display/jenkins/jenkins+ssh)
at work have set kind of setup. myself utilize ssh client. disable job use
ssh -p <jenkins ssh port> user@localhost disable-job <jobname>
it thought configure jenkins set static ssh port , set user ssh key without password purpose.
the client command enable job enable-job
.
java jenkins jenkins-plugins jenkins-cli jenkins-scriptler
No comments:
Post a Comment