Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Jenkins: How to Block execution of other job

  • 18-11-2016 10:10am
    #1
    Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭


    I have a Jenkins Build X with the plugin option.

    Block build if certain jobs are running

    The problem is that i need to do the opposite. I want to block the "certain jobs" from running if X is running.

    The jobs in question run every hour and may happen to execute while X is running. This would trip X over if it happened.

    I know that Jenkins CLI can do a disable of the job, but then i have the overhead of having to re-enable and the issue of "what if job is aborted etc". So would ideally like to use the Block option.

    Any suggestions?


Comments

  • Registered Users, Registered Users 2 Posts: 11,264 ✭✭✭✭jester77


    I haven't played with jenkins in a while, but the upstream/downstream pipeline option might work. You could set Job B/C/D/etc to be downstreams of Job A. They will then wait until Job A is completed before executing.


  • Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭veryangryman


    jester77 wrote: »
    I haven't played with jenkins in a while, but the upstream/downstream pipeline option might work. You could set Job B/C/D/etc to be downstreams of Job A. They will then wait until Job A is completed before executing.

    Problem is that Jobs B,C,D are system checks that run every hour. Job B is for server B, job C for server C etc.

    So while i am running Job A on server X, i dont want Job B to run on that server. C and D can do what they like as they are on different servers.


  • Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭biko


    As I see it you are probably best off pipelining the jobs every day (depending on what job X does).

    Alternatively you will have to set the block options for jobs A,B,C (unless ABC are piped and you only have to block A)


Advertisement