Thanks!

I looked at the job, which is a multi-branch pipeline, and I did not see
any disable or enable button. So assume the job does get somehow disabled
via code, how would I enable it (manually)? only by code?

On Tue, Apr 4, 2017 at 11:35 AM, 'Maciej Jaros' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Idan Adar (2017-04-03 15:11):
>
> Hello,
>
> I received a request, which sounds kinda far-fetched to me, but maybe I
> wrong.
>
> Lets assume there is a job that is scheduled to run 3 times ago. End to
> end sort of tests. And at some point one of the job runs fails.
> The request here is to block all future PRs for any repository in GitHub
> from triggering their respective jobs (each repo has a Jenkinsfile, a PR
> triggers it).
>
> Is this at all possible? Blocking all jobs until an error is fixed?
>
>
> I think you would have to manually enable builds after the error is fixed,
> but you can disable builds with Groovy:
> def job = Jenkins.instance.getItem("your-job-name");
> job.disable()
> //job.enable()
>
> Regards,
> Nux.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/YcdTo2AZgiA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/f5fecaad-dbc3-d665-c35f-15e97345d2fa%40mol.com.pl
> <https://groups.google.com/d/msgid/jenkinsci-users/f5fecaad-dbc3-d665-c35f-15e97345d2fa%40mol.com.pl?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Idan Adar*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAA6x3weEutHAa%2BtMVK2qurGcJX0ykt7r9KWQFAsaob6tFfQ%3DHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to