Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26488

Add support for Bitbucket Pull Request Builder plugin

XMLWordPrintable

      Bitbucket PR Builder plugin is similar to GitHub PR Builder plugin.

      And Job DSL plugin already supports GitHub.

      This is feature request to support Bitbucket PR Builder.
      I have attached config.xml for a job using it.

      Per my understanding, the important sections of that XML are

      SCM configuration

       
      <scm class="hudson.plugins.git.GitSCM" plugin="git@2.3.4">
          <configVersion>2</configVersion>
          <userRemoteConfigs>
            <hudson.plugins.git.UserRemoteConfig>
              <url>git@bitbucket.org:${repositoryOwner}/${repositoryName}.git</url>
            </hudson.plugins.git.UserRemoteConfig>
          </userRemoteConfigs>
          <branches>
            <hudson.plugins.git.BranchSpec>
              <name>*/${sourceBranch}</name>
            </hudson.plugins.git.BranchSpec>
          </branches>
          <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
          <submoduleCfg class="list"/>
          <extensions>
            <hudson.plugins.git.extensions.impl.PreBuildMerge>
              <options>
                <mergeRemote>origin</mergeRemote>
                <mergeTarget>${targetBranch}</mergeTarget>
                <mergeStrategy>default</mergeStrategy>
              </options>
            </hudson.plugins.git.extensions.impl.PreBuildMerge>
          </extensions>
        </scm>
      

      Build trigger

       
      <triggers>
          <bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger plugin="bitbucket-pullrequest-builder@1.4.3-SNAPSHOT">
            <spec>H/1 * * * *</spec>
            <cron>H/1 * * * *</cron>
            <username>mycompany</username>
            <password>mypassword</password>
            <repositoryOwner>myteam</repositoryOwner>
            <repositoryName>myrepo</repositoryName>
            <ciSkipPhrases></ciSkipPhrases>
            <checkDestinationCommit>true</checkDestinationCommit>
          </bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger>
        </triggers>
      

      This is a follow up to question on Google Group

        1. config.xml
          2 kB
          Maksym Grebenets

            daspilker Daniel Spilker
            mgrebenets Maksym Grebenets
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: