Hello,

      I have pipeline like this but when i push something i can see
      Webhook triggering job with no SCM
      in jenkins logs any hint ?

       
      pipeline {
          
          agent { label '' }
          
          triggers {
              BitbucketWebhookTriggerImpl()
         }

          parameters {
              gitParameter branch: '',
              branchFilter: 'origin./(.)',
              defaultValue: 'master',
              description: 'Select branch name (default master)',
              listSize: '5',
              name: 'BRANCH',
              quickFilterEnabled: true,
              selectedValue: 'NONE',
              sortMode: 'DESCENDING_SMART',
              tagFilter: '*',
              type: 'PT_BRANCH_TAG',
              useRepository: ''
          }

          stages {
              stage ('SCM') {
                  steps {
                      checkout(
                          changelog: true,
                          poll: false,
                          scm: [$class: 'BitbucketSCM', branches: [[name: "*/${BRANCH{color:#569cd6}}"]],
                              credentialsId: ''
                              id: ''
                              mirrorName: ''
                              projectName: ''
                              repositoryName: ''
                              serverId: ''
                          ]
                      )
                  }
              }

              stage('Test') {
                  steps {
                      sh """
                        ls -la
                      """
                  }
              }
          }
          
          post {
              cleanup {
                cleanWs()
              }
          }
      {color:#d4d4d4}}

          [JENKINS-62057] Webhook triggering job with no SCM

          Mark added a comment -

          Getting something similar.  It appears that webhook triggers to pipeline jobs are broken and do not work.  Increasing priority as critical functionality is broken. 

          Mark added a comment - Getting something similar.  It appears that webhook triggers to pipeline jobs are broken and do not work.  Increasing priority as critical functionality is broken. 

          Mark added a comment -

          It appears that webhooks only work with Jenkinsfile 

          Mark added a comment - It appears that webhooks only work with Jenkinsfile 

          Hi sadegh, thanks for the report.

          As of right now, the plugin has no way of determining if a job needs to be build from a webhook with a pipeline script. It only works if your pipeline is in a Jenkinsfile. I'm updating the readme to reflect this, but we will continue to track this issue as a bug (as I agree, critical functionality is missing).

          Martin Henschke added a comment - Hi sadegh, thanks for the report. As of right now, the plugin has no way of determining if a job needs to be build from a webhook with a pipeline script. It only works if your pipeline is in a Jenkinsfile. I'm updating the readme to reflect this, but we will continue to track this issue as a bug (as I agree, critical functionality is missing).

          For Workaround, I have created a freestyle Job "X" and created another Job "Y" as pipeline job which is my main Job.
          "X" creates a webhook in Bitbucket and gets triggered on repository push. In job "X" I have created a "Post-build Action" which starts build for my main job "Y". This is working fine for me. Please try.

          Pawandeep Singh added a comment - For Workaround, I have created a freestyle Job "X" and created another Job "Y" as pipeline job which is my main Job. "X" creates a webhook in Bitbucket and gets triggered on repository push. In job "X" I have created a "Post-build Action" which starts build for my main job "Y". This is working fine for me. Please try.

            Unassigned Unassigned
            nikaein sadegh nikaein
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: