• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • build-blocker-plugin
    • None
    • Jenkins 2.89.3
      Build-Blocker-Plugin 1.7.3
      Pipeline 2.5

      all my Pipeline projects are named like

      <Project_Name>_PIPELINE

      I have only one node with several executors, but I do not want two Pipelines running at the same time, so I use Build-Blocker-Plugin, with

      .*_PIPELINE

      as regular expression.

      Problem : If I launch PROJECT_A_PIPELINE and just after PROJECT_B_PIPELINE, they both run on two executors, at the same time. I am expected PROJECT_B_PIPELINE to wait for PROJECT_A_PIPELINE to be over.

      I think this may be similar to JENKINS-50187 but not sure as there is a node label based behavior, so it could be more specific

      (note : I do need several executor as the node also runs regular Freestyle Project)

          [JENKINS-51607] Build-Blocker-Plugin - Does not block Pipeline

          Chad Geisler added a comment -

          Having this same issue. I'm in the process of converting all my freestyle jobs to pipelines and this is a blocking issue for me to complete that work. I need to block jobs with similar regular expression job name matches from building on the same node. Not sure why this fails, doesn't it block based on the job name running on that node, should have nothing to do with the pipeline code running.

          Any update on when this will be resolved?

          Chad Geisler added a comment - Having this same issue. I'm in the process of converting all my freestyle jobs to pipelines and this is a blocking issue for me to complete that work. I need to block jobs with similar regular expression job name matches from building on the same node. Not sure why this fails, doesn't it block based on the job name running on that node, should have nothing to do with the pipeline code running. Any update on when this will be resolved?

          Bob Lloyd added a comment -

          This is an old issue, so hopefully this will help others who have run into this:

          You need to select the "check buildable queued builds" in the configuration, as well.  Pipeline jobs are queued and considered differently.

          (this might also depend on the state of the 'other' job, as it might need to have pulled it's scripts)

          Bob Lloyd added a comment - This is an old issue, so hopefully this will help others who have run into this: You need to select the "check buildable queued builds" in the configuration, as well.  Pipeline jobs are queued and considered differently. (this might also depend on the state of the 'other' job, as it might need to have pulled it's scripts)

          Eric Oliver added a comment -

          boblloyd How old of an issue is this? I just recently tested this for pipeline jobs and setting "check buildable queued builds" still doesn't set a job into pending if a named job is already running. Both are pipeline jobs.

          Eric Oliver added a comment - boblloyd How old of an issue is this? I just recently tested this for pipeline jobs and setting "check buildable queued builds" still doesn't set a job into pending if a named job is already running. Both are pipeline jobs.

          Denis Mone added a comment -

          This issue should have been resolved since JENKINS-50187 is closed.
          The version that has the fix is 1.7.6 so you will need to update your plugin first.
          daemonpulsar could you please verify that your use case is covered by the fix.

          Denis Mone added a comment - This issue should have been resolved since JENKINS-50187 is closed. The version that has the fix is 1.7.6 so you will need to update your plugin first. daemonpulsar could you please verify that your use case is covered by the fix.

          Alex Undrus added a comment -

          On our Jenkins server the plugin does not block jobs when the following options are selected "block on node level" and "check buildable queued builds". Details:

          • Jenkins 2.303.1, plugin 1.7.7
          • Job runs on all 20 slave nodes matching the label
          • Problem: job starts on all nodes including those that run jobs listed in "Blocking Job" section 

          The version 1.7.3 works OK with the above mentioned settings.

          Alex Undrus added a comment - On our Jenkins server the plugin does not block jobs when the following options are selected "block on node level" and "check buildable queued builds". Details: Jenkins 2.303.1, plugin 1.7.7 Job runs on all 20 slave nodes matching the label Problem: job starts on all nodes including those that run jobs listed in "Blocking Job" section  The version 1.7.3 works OK with the above mentioned settings.

          Denis Mone added a comment -

          Thanks for reporting the problem.
          This was a regression bug i introduced trying to fix the original issue of this ticket.
          I have reverted the part of the code that introduced the bug.
          Tested it locally by creating two docker container agents with a couple of executors and running the scenario you mentioned.
          I have released a new version 1.7.8 which has the fix.

          Denis Mone added a comment - Thanks for reporting the problem. This was a regression bug i introduced trying to fix the original issue of this ticket. I have reverted the part of the code that introduced the bug. Tested it locally by creating two docker container agents with a couple of executors and running the scenario you mentioned. I have released a new version 1.7.8 which has the fix.

            dmone Denis Mone
            daemonpulsar Philippe Carrere
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: