[JIRA] (JENKINS-47867) Make "Committers To Ignore" configurable via traits

2 просмотра
Перейти к первому непрочитанному сообщению

thomaskasene@gmail.com (JIRA)

не прочитано,
12 февр. 2018 г., 11:48:0112.02.2018
– jenkinsc...@googlegroups.com
Thomas K commented on Improvement JENKINS-47867
 
Re: Make "Committers To Ignore" configurable via traits

Do we know how this is going? I'd love to see this feature!

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

pixman20@gmail.com (JIRA)

не прочитано,
12 февр. 2018 г., 16:14:0212.02.2018
– jenkinsc...@googlegroups.com
pixman20 commented on Improvement JENKINS-47867

The PR was merged into v2.2.8 shown here https://wiki.jenkins.io/display/JENKINS/Bitbucket+Branch+Source+Plugin as

  • Add ability for extension plugins to modify webhook creation / update process

You can build this repo and upload the jpi manually to your instance: https://github.com/pixman20/bitbucket-branch-source-configure-webhooks-plugin 
I haven't had time to go through the motions of publicizing that on the official plugin repo yet.

thomaskasene@gmail.com (JIRA)

не прочитано,
13 февр. 2018 г., 14:35:0213.02.2018
– jenkinsc...@googlegroups.com
Thomas K commented on Improvement JENKINS-47867

I can confirm that I was able to build and install your unofficial plugin pixman20 - and it seems to be working!

However, I'm unable to get the "Committers to ignore"-part of the webhook actually working, but I suppose that's a question for the Bitbucket Branch Source plugin... Any idea where I might post issues for that plugin? It doesn't seem to be available through GitHub, possibly because it's a fork.

pixman20@gmail.com (JIRA)

не прочитано,
13 февр. 2018 г., 15:51:1913.02.2018
– jenkinsc...@googlegroups.com
pixman20 commented on Improvement JENKINS-47867

Thomas K, You can comment on the main plugin page or you can create an issue for the bitbucket-branch-source-plugin component (same as this issue), but I'm guessing it's just an issue with your configuration.

You may have already done this, but be sure that you have configured your Jenkins instance (or your Bitbucket project) to update webhooks.  Just to be sure I just verified our instance is working correctly on my instance.

If Jenkins is actually creating the web hook on a Bitbucket Server instance, but the "Committers to ignore" field is not getting updated, then that may be an issue with the unofficial plugin.  

Either way, you may have to add some loggers to see what's going on if that's the case.

pixman20@gmail.com (JIRA)

не прочитано,
13 февр. 2018 г., 15:51:1913.02.2018
– jenkinsc...@googlegroups.com
pixman20 edited a comment on Improvement JENKINS-47867
[~thomaskasene], You can comment on [the main plugin page|https://plugins.jenkins.io/cloudbees-bitbucket-branch-source] or you can create an issue for the bitbucket-branch-source-plugin component (same as this issue), but I'm guessing it's just an issue with your configuration.

You may have already done this, but be sure that you have configured your Jenkins instance (or your Bitbucket project
job in Jenkins ) to update webhooks.  Just to be sure I just verified our instance is working correctly on my instance.


If Jenkins is actually creating the web hook on a Bitbucket Server instance, but the "Committers to ignore" field is not getting updated, then that may be an issue with the unofficial plugin.  

Either way, you may have to add some loggers to see what's going on if that's the case.

thomaskasene@gmail.com (JIRA)

не прочитано,
13 февр. 2018 г., 16:42:0213.02.2018
– jenkinsc...@googlegroups.com
Thomas K commented on Improvement JENKINS-47867

Your plugin appears to work - it updates the webhook in Bitbucket as expected. However, whenever Jenkins pushes its commits, Bitbucket still fires push events back to Jenkins. I assume I'm doing something wrong somewhere, but I can't figure out what. Jenkins sets the git user.email equal to the e-mail address of a registered Bitbucket account, so I was hoping that would be enough for it to recognize the user, but apparently not. Unfortunately I don't know enough about how this all works, and I'm not the admin of our Bitbucket Server instance, so I can't just tune the log levels to figure out what Bitbucket is picking up.

pixman20@gmail.com (JIRA)

не прочитано,
13 февр. 2018 г., 19:55:0213.02.2018
– jenkinsc...@googlegroups.com
pixman20 commented on Improvement JENKINS-47867

You can try checking what you put in the "Committers to Ignore" field against the committer in git...make sure you're using the right name, for example using the actual username instead of display name in some instances.

FWIW, this is the Bitbucket add-on that is firing the events back to Jenkins, and that's what Jenkins updates: https://marketplace.atlassian.com/plugins/nl.topicus.bitbucket.bitbucket-webhooks/server/overview 

In short, the Bitbucket Branch Source Plugin in Jenkins updates the webhooks in Bitbucket.  When a matching event is figured (see your webhook configuration), it notifies Jenkins by posting content to a URL (can't remember off-hand).  This is where you can try to add Jenkins loggers to see what it's getting.  Fortunately, since it's receiving data that you don't want, it's easier to dig into than not receiving data that you do want  ...hopefully.

My guess is though that it's either a Bitbucket add-on bug or more likely a mismatch between the committers to ignore field and the actual committer id that shows up in the git log

pixman20@gmail.com (JIRA)

не прочитано,
13 февр. 2018 г., 19:56:0313.02.2018
– jenkinsc...@googlegroups.com
pixman20 edited a comment on Improvement JENKINS-47867
You can try checking what you put in the "Committers to Ignore" field against the committer in git...make sure you're using the right name, for example using the actual username instead of display name in some instances.

FWIW, this is the Bitbucket add-on that is firing the events back to Jenkins, and that's what Jenkins updates: [https://marketplace.atlassian.com/plugins/nl.topicus.bitbucket.bitbucket-webhooks/server/overview

In short, the Bitbucket Branch Source Plugin in Jenkins updates the webhooks in Bitbucket.  When a matching event is figured  fired (see your webhook configuration), it notifies Jenkins by posting content to a some URL endpoint (can't remember off-hand what it is ).  This is where you can try to add Jenkins loggers to see what it's getting.  Fortunately, since it's receiving data that you don't want, it's easier to dig into than not receiving data that you do want :) ...hopefully.


My guess is though that it's either a Bitbucket add-on bug or more likely a mismatch between the committers to ignore field and the actual committer id that shows up in the git log

thomaskasene@gmail.com (JIRA)

не прочитано,
20 февр. 2018 г., 11:34:0220.02.2018
– jenkinsc...@googlegroups.com
Thomas K updated an issue
 
Jenkins / Improvement JENKINS-47867
Change By: Thomas K
Attachment: commit.PNG
Attachment: user.PNG
Attachment: webhook.PNG

thomaskasene@gmail.com (JIRA)

не прочитано,
20 февр. 2018 г., 11:35:0620.02.2018
– jenkinsc...@googlegroups.com
Thomas K updated an issue

thomaskasene@gmail.com (JIRA)

не прочитано,
20 февр. 2018 г., 11:35:0720.02.2018
– jenkinsc...@googlegroups.com
Thomas K updated an issue
Change By: Thomas K
Attachment: webhook.PNG

thomaskasene@gmail.com (JIRA)

не прочитано,
20 февр. 2018 г., 11:35:0720.02.2018
– jenkinsc...@googlegroups.com
Thomas K updated an issue
Change By: Thomas K
Attachment: user.PNG

thomaskasene@gmail.com (JIRA)

не прочитано,
20 февр. 2018 г., 11:54:0120.02.2018
– jenkinsc...@googlegroups.com
Thomas K commented on Improvement JENKINS-47867
 
Re: Make "Committers To Ignore" configurable via traits

I posted an issue on the bitbucket-webhooks-plugin in case you're curious and/or have any pointers: https://github.com/Eernie/bitbucket-webhooks-plugin/issues/94

redfive@jgaunt.com (JIRA)

не прочитано,
22 мая 2019 г., 19:09:0222.05.2019
– jenkinsc...@googlegroups.com

We're seeing an issue related to this, in that the committersToIgnore is always reset with the organization scan is run. I had started to implement a Trait that would add the WebhookConfiguration object to the BitbucketSCMSourceContext object included a committersToIgnore value. Ideally, I'd be able to set this setting using Groovy init code, as I'm configuring > 60 instances and want to be able to do this programmatically. 

Is there a reason why merely adding a Trait class to this class is bad? I had merely copied the WebhookRegistrationTrait.java class and updated it to do what I needed.

Finally, curious what the best way is to add a PR. Should I fork the repo to my personal account and submit a PR from that?

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

redfive@jgaunt.com (JIRA)

не прочитано,
28 мая 2019 г., 17:32:0228.05.2019
– jenkinsc...@googlegroups.com

FIled a PR with an implementation of the Trait: https://issues.jenkins-ci.org/browse/JENKINS-47867

The previous PR (https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/77) had a similar implementation but it was stated that this trait should exist in an external plugin. No rationale for that was given and it seems very logical for it to live in this plugin, to me. The class it modifies is implemented in this plugin and several other traits that also modify the BitbucketSCMSource exist in this plugin.

redfive@jgaunt.com (JIRA)

не прочитано,
28 мая 2019 г., 19:20:0228.05.2019
– jenkinsc...@googlegroups.com
John Gaunt edited a comment on Improvement JENKINS-47867
FIled a PR with an implementation of the Trait:


[
https:// issues github . jenkins-ci.org com / browse jenkinsci / JENKINS bitbucket - 47867 branch-source-plugin/pull/194]

The previous PR ([https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/77]) had a similar implementation but it was stated that this trait should exist in an external plugin. No rationale for that was given and it seems very logical for it to live in this plugin, to me. The class it modifies is implemented in this plugin and several other traits that also modify the BitbucketSCMSource exist in this plugin.

bitwiseman@gmail.com (JIRA)

не прочитано,
29 мая 2019 г., 14:44:0529.05.2019
– jenkinsc...@googlegroups.com

redfive@jgaunt.com (JIRA)

не прочитано,
29 мая 2019 г., 17:57:0229.05.2019
– jenkinsc...@googlegroups.com

Liam Newman this plugin might also have the same end effect, but what my changes do is set the ignoredCommitters on the Bitbucket side, which is a little more visible to most devs at our organization. The effect being that the event never gets to Jenkins from Bitbucket. Since there is already a variable for the setting in the Bitbucket Webhook code it seemed sane to allow it to be set. I've not been able to set it in any fashion to date, it's always an empty string. I also need to make sure I can set this value from a groovy init script (which perhaps that plugin enables as well).

bitwiseman@gmail.com (JIRA)

не прочитано,
29 мая 2019 г., 21:39:0229.05.2019
– jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

не прочитано,
30 мая 2019 г., 11:21:0230.05.2019
– jenkinsc...@googlegroups.com
Liam Newman started work on Improvement JENKINS-47867
 
Change By: Liam Newman
Status: Open In Progress

redfive@jgaunt.com (JIRA)

не прочитано,
24 июн. 2019 г., 17:48:0224.06.2019
– jenkinsc...@googlegroups.com

redfive@jgaunt.com (JIRA)

не прочитано,
24 июн. 2019 г., 17:52:0424.06.2019
– jenkinsc...@googlegroups.com
John Gaunt commented on Improvement JENKINS-47867
 
Re: Make "Committers To Ignore" configurable via traits

PR-194 has merged and I think the fix will be in v2.5.4 of the plugin. Will check as soon as I can find the builds and see if it's updated.

redfive@jgaunt.com (JIRA)

не прочитано,
26 июн. 2019 г., 18:08:0226.06.2019
– jenkinsc...@googlegroups.com
John Gaunt resolved as Fixed
 

Fix is present in v2.4.5 of the bitbucket-branch-source plugin.

Change By: John Gaunt
Status: In Progress Resolved
Resolution: Fixed
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений