Bitbucket Server Integration with Jenkins Shared Library

9 views
Skip to first unread message

Bruce Coveny

unread,
May 5, 2020, 11:28:55 AM5/5/20
to Jenkins Users
Sorry in a long post.

We are utilizing a newer plugin Bitbucket Server Integration (https://plugins.jenkins.io/atlassian-bitbucket-server-integration/).  Along with using a Jenkins Shared Library pulled from SCM as well (https://www.jenkins.io/doc/book/pipeline/shared-libraries/) which is configured in Jenkins -> Manage Jenkins -> Configure System.  

In using both of these plugins we have multiple Jenkins instances (not agents/nodes but full Jenkins instances).  The same project can be built on different instances but utilizing different branches of the repository.

So for reference the setup is kind of like:

+- jenkins-instance-a
|   +- shared-library
|       +- branch-master
|   +- project-x
|       +- branch-feature
|
+- jenkins-instance-b
|   +- shared-library
|       +- branch-master
|   +- project-x
|       +- branch-master


First, I know many may reply with you should use 1 Jenkins instance with different nodes to manage the flow, but this is not what I have to work with (sorry).

Second, the issue I am having is if the shared library changes it impacts both Jenkins instances (which I am okay with).  However, if a commit/push is done on project-x only on the feature branch Bitbucket will trigger a call to both instance (which should be fine because both branches of the project are not changing) and actually build both instances.  My assumption is because the shared library change is the reason for the build notification.

My question is this an issue with the way Jenkins Shared Library may be working or should an issue be created for the plugin to not trigger the build if the shared library changed but only trigger the build if the project has commits done to it?
Reply all
Reply to author
Forward
0 new messages