bitbucket-push-and-pull-request-plugin icon indicating copy to clipboard operation
bitbucket-push-and-pull-request-plugin copied to clipboard

BitBucket Cloud Push not triggering Pipeline with same repository URL

Open simone201 opened this issue 3 years ago • 4 comments

I've created a new Jenkins Pipeline (really simple) with the Jenkinsfile taken from a repository on master branch. I've also declared in the pipeline the following trigger:

properties([
  pipelineTriggers([
    [
      $class: 'BitBucketPPRTrigger',
      triggers: [
        [
          $class: 'BitBucketPPRRepositoryTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRRepositoryPushActionFilter',
            triggerAlsoIfNothingChanged: true,
            triggerAlsoIfTagPush: false,
            triggerOnlyIfTagPush: true,
            allowedBranches: "",
            isToApprove: false
          ]
        ]
      ]
    ]
  ])
])

as per plugin documentation. I've tried enabling the webhooks in the same repository as the Jenkinsfile, also ran manually the pipeline a couple of times to let it enable the trigger (checked in its configuration) but on TAG PUSH is not triggering the pipeline at all, neither on any other kind of trigger.

Here's the log of the plugin taken from Jenkins:

Received input stream over Bitbucket hook notification: redacted entirely for brevity

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key: repo:push from Bitbucket

Dec 21, 2020 10:54:09 AM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
the payload is: {"push":{"changes":[{"forced":false,"links":{"commits":{"href":"https://api.bitbucket.org/2.0/repositories/redacted/test_hook/commits?include\redacted"}},"truncated":false,"created":true,"closed":false,"new":{"type":"tag","name":"test1","target":{"hash":"redacted","links":{"html":{"href":"https://bitbucket.org/redacted/test_hook/commits/redacted"},"self":{"href":"https://api.bitbucket.org/2.0/repositories/redacted/test_hook/commit/redacted"}}}}}]},"repository":{"scm":"git","name":"test_hook","links":{"html":{"href":"https://bitbucket.org/redacted/test_hook"},"self":{"href":"https://api.bitbucket.org/2.0/repositories/redacted/test_hook"}},"project":{"links":{"html":{"href":"https://bitbucket.org/redacted/workspace/projects/UT"},"self":{"href":"https://api.bitbucket.org/2.0/workspaces/redacted/projects/UT"}},"type":"project","uuid":"{redacted}","key":"UT","name":"utilities"},"owner":{"type":"team","display_name":"redacted","uuid":"{redacted}","links":{"html":{"href":"https://bitbucket.org/redacted/"},"self":{"href":"https://api.bitbucket.org/2.0/teams/redacted"}}},"type":"repository","is_private":true,"uuid":"{redacted}"},"actor":{"display_name":"Simone Renzo","account_id":"redacted","type":"user","links":{"html":{"href":"https://bitbucket.org/redacted/"},"self":{"href":"https://api.bitbucket.org/2.0/users/redacted"}},"nickname":"Simone Renzo","uuid":"{redacted}"}}

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRPayloadProcessorFactory createProcessor
Create BitBucketPPRRepositoryCloudPayloadProcessor

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.observer.BitBucketPPRObserverFactory createObservable
Add BitBucketPPRPushCloudObserver for BitBucketPPREvent [event=repo, action=push]

Dec 21, 2020 10:54:09 AM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
the selected payload processor is: io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRRepositoryCloudPayloadProcessor@7e540607

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRRepositoryCloudPayloadProcessor buildActionForJobs
Instantiate BitBucketPPRRepositoryAction

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction 
Received commit hook notification for branch: test1

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction 
Received commit hook type: tag

Dec 21, 2020 10:54:09 AM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering remote [https://bitbucket.org/redacted/test_hook]

Dec 21, 2020 10:54:09 AM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering candidate job Bitbucket-Webhook-Test

Dec 21, 2020 10:54:09 AM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering to poke Bitbucket-Webhook-Test

Dec 21, 2020 10:54:09 AM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
Sending response.

Dec 21, 2020 10:54:09 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

Dec 21, 2020 10:55:05 AM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger
Created new file bitbucket-polling.log for logging in the directory /var/jenkins_home/jobs/Bitbucket-Webhook-Test.

Any idea why is not triggering the pipeline as expected?

Jenkins Version: 2.263.1 Plugin Version: 2.6.4

simone201 avatar Dec 21 '20 11:12 simone201