Both Declarative and Scripted Pipeline syntax doesn't support build blocker plugin

          [JENKINS-67625] build blocker doesn't work in pipeline jobs

          Any update on this one? It works in the UI for regular, non-multibranch pipelines. How would one add this to a Jenkinsfile? I've scoured Google and Stack Overflow and nothing. dmone, anything? Anyone?

          Joshua Westmoreland added a comment - Any update on this one? It works in the UI for regular, non-multibranch pipelines. How would one add this to a Jenkinsfile? I've scoured Google and Stack Overflow and nothing. dmone , anything? Anyone?

          Denis Mone added a comment -

          Hi jdwntrepid.
          If i understand correctly you want to configure the blocking behaviour of pipeline from the Jenkinsfile itself and not only from the UI.
          Something like the following:

          pipeline {
            agent {
              docker {
                image 'jdk11' 
              }
            }
            options {
              // your request
              blocksOn {
                'another-job', global: false, checkQueue: false
              }
            }
            stages {
              stage('stage1') {
                //...
              }
              stage('stage2') {
                //...
              } 
            }
          }
          

          I understand that this is indeed useful but at this time i don't have time to implement it.
          You are welcome to contribute though.
          I did a quick google search about Jenkins plugin development and i found this link which is what you probably need to get started
          plugin-development/pipeline-integration/#defining-symbols

          Denis Mone added a comment - Hi jdwntrepid . If i understand correctly you want to configure the blocking behaviour of pipeline from the Jenkinsfile itself and not only from the UI. Something like the following: pipeline { agent { docker { image 'jdk11' } } options { // your request blocksOn { 'another-job' , global: false , checkQueue: false } } stages { stage( 'stage1' ) { //... } stage( 'stage2' ) { //... } } } I understand that this is indeed useful but at this time i don't have time to implement it. You are welcome to contribute though. I did a quick google search about Jenkins plugin development and i found this link which is what you probably need to get started plugin-development/pipeline-integration/#defining-symbols

            dmone Denis Mone
            pavan_18 pavan ambure
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: