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

Ignore committers does not work #367

Open
3 tasks done
reitzmichnicht opened this issue Sep 11, 2020 · 15 comments
Open
3 tasks done

Ignore committers does not work #367

reitzmichnicht opened this issue Sep 11, 2020 · 15 comments
Labels

Comments

@reitzmichnicht
Copy link

Your checklist for this issue

  • Jenkins version
    2.249.1
  • Plugin version
    2.9.2
  • Bitbucket server and version
    Bitbucket Server 6.6.1

Description

Setting ignored committers for a multibranch pipeline with a bitbucket source does not work. The description says the webhook is configured accordingly, but the integrated webhook approach in bitbucket server does not allow this setting.
We really need this feature to ignore the Jenkins as committer itself or ignore by commit message.

Kind regards,
Michael

@bitwiseman
Copy link
Contributor

@reitzmichnicht Which "ignored committers" setting? Could show a screenshot?

@reitzmichnicht
Copy link
Author

branch source
This is a checkout behaviour setting

@reitzmichnicht
Copy link
Author

I'll take a look and test it, was not aware that it supports organizationalFolder of bitbucket as its a bit outdated.

Nonetheless the provided bitbucket trait ignore committers seems to be legacy for not native webhooks?

@bitwiseman bitwiseman added the bug label Sep 22, 2020
@bitwiseman
Copy link
Contributor

@reitzmichnicht

Nonetheless the provided bitbucket trait ignore committers seems to be legacy for not native webhooks?

I'm not sure. I don't have bandwidth to delve much on this issue currently.

@ryancurrah
Copy link

The plugin https://github.com/jenkinsci/ignore-committer-strategy-plugin is def what your looking for. I made the same mistake when I started.

@xtroce
Copy link

xtroce commented Apr 12, 2021

I ran into the same problem, with configuring the ignored commiter and it not being working diving into debugging. Wouldn't it be better to remove the internal plugin and just mentioning in the documentation that if you should use another plugin to do that, instead of leaving an essentially non working function in the code?

@diegosep
Copy link

Hi, I confirm, this feature of the plugin is not working, I tried either email, name, or more options and it does not work.

@PrasannaShasthriDevOps
Copy link

I can confirm too that this feature is not working for us.

@elopezvalecky
Copy link

elopezvalecky commented Aug 27, 2021

After digging around this I found out that if you are using Native Hook (or the called webhook in BitBucket) this feature is not supported at least not in BitBucket Server 6.x... but if you use the Plugin Hook (the so called "Webhook to Jenkins for Bitbucket Server") then you can use this feature...
What it makes documentation not clear how to use it.

The other plugin mentioned in here "ignore-committer-strategy-plugin" wont work if you still use the BitBucket plugin for checkout.

@KalleOlaviNiemitalo
Copy link
Contributor

KalleOlaviNiemitalo commented Aug 27, 2021

From Bitbucket Server native webhooks, the plugin could easily extract the actor who pushed the commits. It could then filter with that. The actor might not always be the same as the author or the committer, but I think it would work fine for ignoring pushes made by Jenkins, if Jenkins has its own user account in Bitbucket Server.

@nicolasaigner
Copy link

Any feedback on this? I have the same problem and I don't want to install other plugins.

@jaunusa
Copy link

jaunusa commented Mar 15, 2023

Having the same issue trying to ignore committers with this plugin using v7.x for server version, running Bitbucket version v7.21.10.
Bitbucket Branch Source Plugin version: 796.v6cb_1559e1673
Jenkins version: 2.361.1
Switching to "Plugin" at "Webhook implementation to use" does not create webhooks in Bitbucket repository and throws a Jenkins warning:

Mar 15, 2023 10:04:01 AM WARNING org.apache.http.client.protocol.ResponseProcessCookies processCookies
Invalid cookie header: "Set-Cookie: BITBUCKETSESSIONID=XXXXXX; Max-Age=1209600; Expires=Wed, 29 Mar 2023 09:04:01 GMT; Path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 29 Mar 2023 09:04:01 GMT
Mar 15, 2023 10:04:01 AM WARNING com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1 doRun
Could not register hooks for MIS Group/misreport
java.io.FileNotFoundException: URL: /rest/webhook/1.0/projects/MISG/repos/misreport/configurations
	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:879)
	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getWebHooks(BitbucketServerAPIClient.java:733)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHook(WebhookAutoRegisterListener.java:167)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHooks(WebhookAutoRegisterListener.java:133)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.access$000(WebhookAutoRegisterListener.java:56)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1.doRun(WebhookAutoRegisterListener.java:102)
	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:94)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

EDIT:
In these code lines we can see, why the ignore committers setting is ignored when "Native" is selected in the config:

Is there are Plugin needed on Bitbucket when using Plugin for "Webhook implementation to use" in Jenkins config?
The only plugin I can find is this:
https://marketplace.atlassian.com/apps/1211284/webhook-to-jenkins-for-bitbucket?hosting=server&tab=overview
But its no more possible to install it to a Bitbucket server instance.

@capeflynn
Copy link

Does anyone know if there are plans to fix this issue or if there is already a workaround we could use?

@CJCombrink
Copy link

Any updates on this?
Also having the same issue, I can't get the "Set ignored committers" to work and would really like to have this functionality

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

No branches or pull requests