Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triggering build works but Jenkins does not decline PR on failed build #290

Open
jmeit-fwdsec opened this issue Nov 4, 2022 · 1 comment

Comments

@jmeit-fwdsec
Copy link

After making a PR on bitbucket, the plugin successfully starts a new build on Jenkins. After the build fails, the PR should be declined because I have ticked the box that says "Let Jenkins decline the pull request on BitBucket if the build fails".

The log shows that the webhook is working from bitbucket and then shows the payload that was received by Jenkins. Then it shows the following...

Nov 04, 2022 11:29:56 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.observer.BitBucketPPRObserverFactory
Add BitBucketPPRPullRequestCloudObserver for {}

Nov 04, 2022 11:29:56 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRPayloadProcessorFactory createProcessor
Create BitBucketPPRPullRequestCloudPayloadProcessor

Nov 04, 2022 11:29:56 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Trigger not set

Nov 04, 2022 11:29:56 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Trigger not set

Nov 04, 2022 11:29:56 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Trigger not set

And it repeats "Trigger not set" many many times.

I have stored my OAuth consumer key as Secret Text, and selected it as the Credentials.

What more can I try?

@martens-d
Copy link

1.: "Trigger not set" is written to the log for EVERY pipeline in Jenkins that is not configured for bitbucket (all other jobs in Jenkins).

2.: for OAuth consumer key, I could not get that to work. But what works is a decline like the approve I described here:
#288 (comment)

for the decline look here: https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8287172368

and put that in the

post {
  failure {
    ...
  }
}

section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants