Skip to main content

Bitbucket Multibranch Pipeline

Comments

5 comments

  • Manuel Cardenas

    Hi Domhnaill,

     

    Would it be possible for you to take a look at the document below and check if that covers your use case?

    https://support.cloudbees.com/hc/en-us/articles/115000053051-How-to-Trigger-Multibranch-Jobs-from-Bitbucket-Server- 

     

    Hope that this helps.

    Best regards,

    Manuel

     

     

    0
  • Domhnaill Byrne

    Hi Manuel,

     

    This is the set up that we've configured but we'd like to automate the set up of the hook in the same step as we create the multi-branch pipelines.

    The workflow we want is;

    1. Cloudbees Bitbucket project scans the repository and finds markerfile

    2. creates the multibranch pipeline

    3. Configures the Webhook plugin for the repo to trigger the jobs in cloudbees. (We have a script to configure this but we'd like to run it automatically once a pipeline is created)

    Let me know if this is possible.

    Thanks,

    Domhnaill 

     

     

    0
  • Manuel Cardenas

    Hi Domhnaill,

     

    Sorry, I missed your use case. I think that what you are expecting is something like: https://issues.jenkins-ci.org/browse/JENKINS-48035 am I correct?

    This way once that the job is created the webhook is already registered. Could you confirm that the webhook is created when you go to "Manage Jenkins > Configure System > GitHub plugin > Advanced > Re-register hooks for all jobs" ?

     

    According to the Jira issue the problem is solved in newer versions of the plugin. Could you verify that?

    Cheers,

    Manuel

    0
  • Domhnaill Byrne

    That looks like it works, thanks!

    Is it possible to configure the settings when it creates the hook?

    We'd like it to work on only pull-requests so we need to set "Branches to ignore" to ".*" or to ingore

    In an unrelated question, the generated job in cloudbees - can the master branch job be renamed to "Build and Release"? We'd like it to be more descriptive for the devs. 

     

    Thanks,

    Domhnaill

    0
  • Manuel Cardenas

    Hi Domhnaill,

    I am not sure that you can do it OOB, but I am pretty sure that you can craft a groovy script that can update the settings for the multibranch pipelines jobs with certain properties.

    Hope that this helps,

     

    Manuel

    0

Please sign in to leave a comment.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.