GithubHelp home page GithubHelp logo

jenkinsci / bitbucket-push-and-pull-request-plugin Goto Github PK

View Code? Open in Web Editor NEW
46.0 12.0 50.0 1.46 MB

Plugin for Jenkins v2.138.2 or later, that triggers job builds on Bitbucket's push and pull request events.

Home Page: https://plugins.jenkins.io/bitbucket-push-and-pull-request

License: MIT License

Java 86.98% HTML 11.14% Groovy 1.88%
bitbucket-plugin jenkins pipeline plugin-trigger bitbucket-cloud bitbucket-server jenkins-plugin trigger builds-triggered mercurial

bitbucket-push-and-pull-request-plugin's Introduction

Bitbucket Push and Pull Request Plugin

Build Status Contributors Jenkins Plugin GitHub release Jenkins Plugin Installs Gitter

jenkins logo

Compatibility

Starting from version 3.x.x the Plugin is compatible with:

  • Jenkins version: >= 2.361.4
  • Java version: 11

The version 2.x.x of the Plugin is compatible with:

  • Jenkins >= v2.138.2
  • Java 8

Introduction

Plugin for Jenkins v2.361.4 or later, that triggers builds on Bitbucket's push and pull requests events.

Some of the features introduced by Bitbucket Push and Pull Request are:

  • build state notification
  • support of pull requests for Bitbucket cloud (rest api v2.x+ with mercurial and git) and bitbucket Server (from version 5.14 to version 7.21 - with git)
  • support of pushs for Bitbucket cloud (rest api v2.x+ with mercurial and git) and Bitbucket server (from version 5.14 to version 7.21 - with git)
  • usage of Gson instead of net.sf.json.JSONObject
  • Introduction of models and major security improvements

Bitbucket Push and Pull Request supports the

  • Bitbucket cloud rest api v2.x+ and later (with git and mercurial repos)
  • Bitbucket server 5.14+ and later (with git repos)

Before you start

The version 2.x.x of the Plugin is compatible with:

  • Jenkins >= v2.138.2
  • Java 8

Otherwise, The version 3.x.x of the Plugin compatible with:

  • Jenkins version: >= 2.361.4
  • Java version: 11

Bitbucket Push And Pull Request Plugin will not work if the old Bitbucket plugin https://plugins.jenkins.io/bitbucket is still installed. So, please de-install from Jenkins the previous Bitbucket plugin if you want to use this new one.

Reason is: both plugins use the same webhook endpoint and Jenkins gives priority to the old Bitbucket plugin, due to the lexical ordering used by Stapler to dispatch the request.

In case you want to use both plugins on the same Jenkins instance, you must:

  • override the default webhook endpoint "bitbucket-hook" in the Jenkins Global Configurations of the Bitbucket Push and Pull Request Plugin using a fresh new webhook - let's say: "bitbucket-ppr-webhook". This webhook has to be a new one, consumed only by the Bitbucket Push and Pull Request Plugin, in order to avoid conflicts with other plugins
  • After that, restart Jenkins
  • and configure the Bitbucket Cloud / Server webhooks accordingly to the new webhook endpoint (in our example: "bitbucket-ppr-webhook")

Configuration

Configure the webhook

Configure your Bitbucket repository adding a webhook in the settings page. In the URL field (see image, at point A) add your JENKINS_URL followed by "/bitbucket-hook/" (for example https://my-jenkins.on-my-planet-far-away.com/bitbucket-hook/) Credentials for the webhook endpoint are not required, the trailing slash is mandatory.

For more specific infos about managing webhooks please consult:

Configure the Global Configurations of the Plugin

in the Jenkins Global Configurations:

  1. you can override the default webhook endpoint "/bitbucket-hook/" consumed by the plugin

  2. you can configure a single job to be triggered exclusively. That overrides the default behavior of having a dedicated endpoint (+ some internal matching logic) for ALL pipelines to be triggered via this plugin. In case of a non-existing job a WARNING will be logged at global jenkins log. You can omit this feature by simply leaving this field blank.

  3. you can disable the build status notifications propagation.

  4. you can choose what build key to use for build status propagation

  5. you can set global credentials used by the plugin for the state notification

example global config jenkins bb ppr 1

Configure your Jenkins job

  1. Configure the Bitbucket Repository under the Source Code Management with your credentials. For git: example config git In case you are using Mercurial instead of git, configure it as follows: exampel config mercurial Please note: the branch, related to the events which trigger the builds, must be specified in the field Revision.

  2. Now activate the plugin in your job selecting the "Build with Bitbucket Push and Pull Request Plugin" option in the Build Triggers pane.

  3. Run the first job manually

Authentication for state notification and generally when using the Bitbucket REST API

TYPE BB CLOUD BB SERVER JENKINS CREDENTIALS NOTES
Username & Password X X Username with password deprecated by bbc, will be removed in march 2022
HTTP access token - X Secret Text learn more about HTTP tokens
OAuth consumers X - Secret Text Oauth Consumers example config
  1. you can set globally the credentials used by the plugin for the state notification
  2. you can set for each job the credentials used by the plugin for the state notification, overwriting the global credentials
  3. you you don't set nothing the plugin will try to use the credentials used by the git plugin

Bitbucket Events supported by the plugin

FILTER BB CLOUD BB SERVER NOTES
Pull Request Created X X
Pull Request Updated X X
Pull Request Declined X X
Pull Request Merged X X
Push X X
Comment Created X X
Comment Updated X - If a user updates the same comment with not much time in between, Bitbucket only sends the event request the first time the comment is updated.
Comment Deleted X -

Some examples

example config jenkins bb ppr 1 example config jenkins bb ppr 2 example config jenkins bb ppr 3 example config jenkins bb ppr 4

Troubleshooting: Some important aspects to keep in mind

About the initialization of the plugin

The Bitbucket Push and Pull Request Plugin (BBPPR Plugin) uses the Git Plugin to handle with the git repositories managed by BitBucket. More in details:

  1. The user initiliazes a new job starting manually a build.
  2. The Git Plugin clones the repository declared in the job fetching the branches as defined in the Branch Specifier filter field.
  3. Due to the fact that each branch is new, the BBPPR Plugin sees everywhere changes and, as a consequence, the BBPPR Plugin starts for each new fetched branch a job.
  4. It's also important to keep in mind that the filters on the branches specified by the BBPPR Plugin in its Allowed Branches field, are not applied in the initialization phase, because they are only active for jobs triggered through the BitBucket webhook (and not for the ones, which are built manually).

About the filters on the branches

Talking generally, there are two filters used to 'control the branches':

  • the Git plugin filter on the branches: a kind of general filter applied at job level.

  • the BBPPR plugin filter: a specific one, that acts at trigger level and that is there because the user can have in a job more triggers than only one.

  • Important is to keep in mind, that you cannot trigger events on branches that are excluded from the Git Plugin filter. It has the precedence because it defines (fetches) the branches, that can be accessed by the BBPPR plugin.

  • Moreover, the way in which the matching is done is the same for both plugins, because we are using for the matching the public method given to disposal from the Git Plugin. The reason for that is the wish to guarantee consistency between the two plugins, at least regarding the way in which branches are matched. This all means also, that we are not implementing the matching logic.

  • As you see from the code: return matches(allowedBranches, bitbucketAction.getTargetBranch(), null);, the matching is between the string you specified (allowedBranches) and the target branch specified in the payload sent from BitBucket (bitbucketAction.getTargetBranch()). This means that The filter is not on the source branch, but on the target branch.

  • You can find al lot of examples in this test class: BitBucketPPRPullRequestCreatedActionFilterTest.java

Environment variables

NAME VALUE SCOPE BB TYPE NOTES
BITBUCKET_TARGET_BRANCH target branch PR + P C + S
BITBUCKET_ACTOR actor name PR + P C + S
BITBUCKET_PAYLOAD Complete payload as json string PR + P C + S
BITBUCKET_X_EVENT x-event which triggered the plugin PR + P C + S
BITBUCKET_SOURCE_BRANCH source branch PR C + S
BITBUCKET_PULL_REQUEST_TITLE PR title PR C + S
BITBUCKET_PULL_REQUEST_ID id PR C + S
BITBUCKET_PULL_REQUEST_LINK link PR C + S
BITBUCKET_PULL_REQUEST_DESCRIPTION PR description PR C + S
BITBUCKET_PULL_REQUEST_COMMENT_TEXT Comment of BB Cloud Pull Request PR C + S
BITBUCKET_PULL_REQUEST_LATEST_COMMIT_FROM_SOURCE_BRANCH Latest commit hash on the source branch PR C + S
BITBUCKET_PULL_REQUEST_LATEST_COMMIT_FROM_TARGET_BRANCH Latest commit hash on the target branch PR C + S
BITBUCKET_REPOSITORY_UUID Repository identifier P C
BITBUCKET_REPOSITORY_ID Repository identifier P S
BITBUCKET_REPOSITORY_URL Repository URL PR C
REPOSITORY_LINK Repository link P C Deprecated: to remove in 2.6
REPOSITORY_NAME Repository name P S Deprecated: to remove in 2.6

Dsl Job actions for Bitbucket Push and Pull Request Trigger

bitbucketTriggers {

  // For Bitbucket Cloud
  repositoryPushAction(triggerAlsoIfTagPush: boolean, triggerAlsoIfNothingChanged: boolean, allowedBranches: String)
  repositoryPushAction(triggerAlsoIfTagPush: boolean, triggerAlsoIfNothingChanged: boolean, allowedBranches: String, isToApprove: boolean)
  repositoryPushAction(triggerAlsoIfTagPush: boolean, triggerAlsoIfNothingChanged: boolean, allowedBranches: String, isToApprove: boolean, triggerOnlyIfTagPush: boolean)

  pullRequestApprovedAction(onlyIfReviewersApproved: boolean)
  pullRequestApprovedAction(onlyIfReviewersApproved: boolean, allowedBranches: String)
  pullRequestApprovedAction(onlyIfReviewersApproved: boolean, allowedBranches: String, isToApprove: boolean)

  pullRequestCreatedAction()
  pullRequestCreatedAction(allowedBranches: String)
  pullRequestCreatedAction(allowedBranches: String, isToApprove: String)

  pullRequestUpdatedAction()
  pullRequestUpdatedAction(allowedBranches: String)
  pullRequestUpdatedAction(allowedBranches: String, isToApprove: String)

  pullRequestMergedAction()
  pullRequestMergedAction(allowedBranches: String)
  pullRequestMergedAction(allowedBranches: String, isToApprove: String)

  pullRequestDeclinedAction()
  pullRequestDeclinedAction(allowedBranches: String)

  pullRequestCommentCreatedAction()
  pullRequestCommentCreatedAction(allowedBranches: String)
  pullRequestCommentCreatedAction(allowedBranches: String, commentFilter: String) // CommentFilter is java a regex expression

  pullRequestCommentUpdatedAction()
  pullRequestCommentUpdatedAction(allowedBranches: String)
  pullRequestCommentUpdatedAction(allowedBranches: String, commentFilter: String) // CommentFilter is java a regex expression

  pullRequestCommentDeletedAction()
  pullRequestCommentDeletedAction(allowedBranches: String)

  // For Bitbucket Server
  // note: flag `isToApprove` has no effect yet
  repositoryServerPushAction(triggerAlsoIfTagPush: boolean, triggerAlsoIfNothingChanged: boolean, allowedBranches: String)
  repositoryServerPushAction(triggerAlsoIfTagPush: boolean, triggerAlsoIfNothingChanged: boolean, allowedBranches: String, isToApprove: boolean)
  repositoryServerPushAction(triggerAlsoIfTagPush: boolean, triggerAlsoIfNothingChanged: boolean, allowedBranches: String, isToApprove: boolean, triggerOnlyIfTagPush: boolean)

  pullRequestServerApprovedAction(onlyIfReviewersApproved: boolean)
  pullRequestServerApprovedAction(onlyIfReviewersApproved: boolean, allowedBranches: String)
  pullRequestServerApprovedAction(onlyIfReviewersApproved: boolean, allowedBranches: String, isToApprove: boolean)

  pullRequestServerCreatedAction()
  pullRequestServerCreatedAction(allowedBranches: String)
  pullRequestServerCreatedAction(allowedBranches: String, isToApprove: boolean)

  pullRequestServerUpdatedAction()
  pullRequestServerUpdatedAction(allowedBranches: String)
  pullRequestServerUpdatedAction(allowedBranches: String, isToApprove: boolean)

  pullRequestServerSourceUpdatedAction()
  pullRequestServerSourceUpdatedAction(allowedBranches: String)
  pullRequestServerSourceUpdatedAction(allowedBranches: String, isToApprove: boolean)

  pullRequestServerMergedAction()
  pullRequestServerMergedAction(allowedBranches: String)
  pullRequestServerMergedAction(allowedBranches: String, isToApprove: boolean)

  pullRequestServerDeclinedAction()
  pullRequestServerDeclinedAction(allowedBranches: String)

  pullRequestServerCommentCreatedAction()
  pullRequestServerCommentCreatedAction(allowedBranches : String)
  pullRequestServerCommentCreatedAction(allowedBranches : String, commentFilter : String)
}

Dsl Job snippets

Valid for freestyle jobs and pipeline jobs (until job-dsl plugin v1.76, deprecated in v1.77 for pipeline jobs)

// pullRequestCreatedAction()
job('example-pull-request-created') {
  triggers{
    bitbucketTriggers {
      pullRequestCreatedAction()
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request created')
  }
}

// pullRequestCreatedAction() with filter on branches
job('example-pull-request-created-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestCreatedAction("master")
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request created with filter on branches')
  }
}

// pullRequestCreatedAction() with filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-created-with-filter-on-branches-and-is-to-approve') {
  triggers{
    bitbucketTriggers {
      pullRequestCreatedAction("master", true)
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request created with filter on branches')
  }
}

// pullRequestUpdatedAction()
job('example-pull-request-updated') {
  triggers{
    bitbucketTriggers {
      pullRequestUpdatedAction()
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request updated')
  }
}

// pullRequestUpdatedAction() wiht filter on branches
job('example-pull-request-updated-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestUpdatedAction("master")
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request updated with filter on branches')
  }
}

// pullRequestUpdatedAction() wiht filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-updated-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestUpdatedAction("master", true)
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request updated with filter on branches')
  }


// pullRequestApprovedAction(boolean onlyIfReviewersApproved)
job('example-pull-request-approved') {
  triggers{
    bitbucketTriggers {
      pullRequestApprovedAction(false)
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request approved')
  }
}

// pullRequestApprovedAction(boolean onlyIfReviewersApproved) with filter on branches
job('example-pull-request-approved-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestApprovedAction(false, "master")
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request approved with filter on branches')
  }
}


// pullRequestApprovedAction(boolean onlyIfReviewersApproved) with filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-approved-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestApprovedAction(false, "master", true)
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request approved with filter on branches')
  }
}

// pullRequestMergedAction()
job('example-pull-request-merged') {
  triggers{
    bitbucketTriggers {
      pullRequestMergedAction()
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request merged')
  }
}

// pullRequestMergedAction() with filter on branches
job('example-pull-request-merged-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestMergedAction("master")
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request merged with filter on branches')
  }
}

// pullRequestMergedAction() with filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-merged-with-filter-on-branches') {
  triggers{
    bitbucketTriggers {
      pullRequestMergedAction("master")
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request merged with filter on branches')
  }
}

// repositoryPushAction(boolean triggerAlsoIfTagPush, boolean triggerAlsoIfNothingChanged, String allowedBranches)
job('example-push') {
  triggers{
    bitbucketTriggers {
      repositoryPushAction(false, true, "master")
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
      shell('echo START push')
  }
}


// repositoryPushAction(boolean triggerAlsoIfTagPush, boolean triggerAlsoIfNothingChanged, String allowedBranches)
// and eventually approve Pull Request in BB after the job is done
job('example-push') {
  triggers{
    bitbucketTriggers {// and eventually approve Pull Request in BB after the job is done

      repositoryPushAction(false, true, "master", true)
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
      shell('echo START push')
  }
}

// combination of triggers is also possible
job('example-pull-request-created-updated') {
  triggers{
    bitbucketTriggers {
      pullRequestCreatedAction()
      pullRequestUpdatedAction()
      pullRequestMergedAction("master")
    }
  }
  scm {
    git {
      remote {
          url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
      shell('echo START pull request created')
  }
}

Valid for pipeline with job-dsl 1.77+ (and before)

Note that this may require an additional script approval, the seed job failing with a message similar to:

ERROR: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object (javaposse.jobdsl.dsl.jobs.WorkflowJob bitbucketTrigger script$_run_closure1$_closure5$_closure24$_closure29$_closure30$_closure31)
// pullRequestCreatedAction()
job('example-pull-request-created') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestCreatedActionFilter {
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request created')
  }
}

// pullRequestCreatedAction() with filter on branches
job('example-pull-request-created-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestCreatedActionFilter {
                  allowedBranches("master")
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request created with filter on branches')
  }
}

// pullRequestCreatedAction() with filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-created-with-filter-on-branches-and-is-to-approve') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestCreatedActionFilter {
                  allowedBranches("master")
                  isToApprove(true)
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request created with filter on branches')
  }
}

// pullRequestUpdatedAction()
job('example-pull-request-updated') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestUpdatedActionFilter {
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request updated')
  }
}

// pullRequestUpdatedAction() wiht filter on branches
job('example-pull-request-updated-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestUpdatedActionFilter {
                  allowedBranches("master")
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request updated with filter on branches')
  }
}

// pullRequestUpdatedAction() wiht filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-updated-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestUpdatedActionFilter {
                  allowedBranches("master")
                  isToApprove(true)
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request updated with filter on branches')
  }


// pullRequestApprovedAction(boolean onlyIfReviewersApproved)
job('example-pull-request-approved') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestApprovedActionFilter {
                  triggerOnlyIfAllReviewersApproved(false)
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request approved')
  }
}

// pullRequestApprovedAction(boolean onlyIfReviewersApproved) with filter on branches
job('example-pull-request-approved-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestApprovedActionFilter {
                  triggerOnlyIfAllReviewersApproved(false)
                  allowedBranches("master")
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request approved with filter on branches')
  }
}


// pullRequestApprovedAction(boolean onlyIfReviewersApproved) with filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-approved-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestApprovedActionFilter {
                  triggerOnlyIfAllReviewersApproved(false)
                  allowedBranches("master")
                  isToApprove(true)
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request approved with filter on branches')
  }
}

// pullRequestMergedAction()
job('example-pull-request-merged') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestMergedActionFilter {
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request merged')
  }
}

// pullRequestMergedAction() with filter on branches
job('example-pull-request-merged-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestMergedActionFilter {
                  allowedBranches("master")
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request merged with filter on branches')
  }
}

// pullRequestMergedAction() with filter on branches
// and eventually approve Pull Request in BB after the job is done
job('example-pull-request-merged-with-filter-on-branches') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestMergedActionFilter {
                  allowedBranches("master")
                  isToApprove(true)
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
    shell('echo START pull request merged with filter on branches')
  }
}

// repositoryPushAction(boolean triggerAlsoIfTagPush, boolean triggerAlsoIfNothingChanged, String allowedBranches)
job('example-push') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRRepositoryTriggerFilter {
              actionFilter {
                bitBucketPPRRepositoryPushActionFilter {
                  triggerAlsoIfTagPush(false)
                  triggerAlsoIfNothingChanged(true)
                  allowedBranches("master")
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
      shell('echo START push')
  }
}


// repositoryPushAction(boolean triggerAlsoIfTagPush, boolean triggerAlsoIfNothingChanged, String allowedBranches)
// and eventually approve Pull Request in BB after the job is done
job('example-push') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {// and eventually approve Pull Request in BB after the job is done
          triggers {
            bitBucketPPRRepositoryTriggerFilter {
              actionFilter {
                bitBucketPPRRepositoryPushActionFilter {
                  triggerAlsoIfTagPush(false)
                  triggerAlsoIfNothingChanged(true)
                  allowedBranches("master")
                  isToApprove(true)
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
        url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
      shell('echo START push')
  }
}

// combination of triggers is also possible
job('example-pull-request-created-updated') {
  properties {
    pipelineTriggers {
      triggers {
        bitBucketTrigger {
          triggers {
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestCreatedActionFilter {
                }
              }
            }
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestUpdatedActionFilter {
                }
              }
            }
            bitBucketPPRPullRequestTriggerFilter {
              actionFilter {
                bitBucketPPRPullRequestMergedActionFilter {
                  allowedBranches("master")
                }
              }
            }
          }
        }
      }
    }
  }
  scm {
    git {
      remote {
          url("https://git.company.domain/scm/~username/telegram.git")
      }
    }
  }
  steps {
      shell('echo START pull request created')
  }
}

Second (more verbose) valid dsl for freestyle jobs

Below example is for Pull-request updated (that shall be approved) on BitBucket Cloud, for a FreeStyle job. All the above examples can be adapted with the same paradigm.

freeStyleJob('test-job') {
  triggers {
    bitBucketTrigger {
      triggers {
        bitBucketPPRPullRequestTriggerFilter {
          actionFilter {
            bitBucketPPRPullRequestUpdatedActionFilter {
              isToApprove(true)
            }
          }
        }
      }
    }
  }
}

Pipeline script

Example of pipeline code for building on pull-request and push events.

properties([
  pipelineTriggers([
    [
      $class: 'BitBucketPPRTrigger',
      triggers : [
        [
          $class: 'BitBucketPPRPullRequestTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRPullRequestCreatedActionFilter',
          ]
        ],
        [
          $class: 'BitBucketPPRPullRequestTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRPullRequestApprovedActionFilter',
          ]
        ],
        [
          $class: 'BitBucketPPRPullRequestTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRPullRequestUpdatedActionFilter',
          ]
        ],
        [
          $class: 'BitBucketPPRPullRequestTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRPullRequestMergedActionFilter',
          ]
        ],
        [
          $class: 'BitBucketPPRRepositoryTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRRepositoryPushActionFilter',
            triggerAlsoIfNothingChanged: true,
            triggerAlsoIfTagPush: false,
            allowedBranches: "",
            isToApprove: true
          ]
        ]
      ]
    ]
  ])
])

pipeline {
  agent any

  stages {
  stage('Build') {
      steps {
        echo 'Building...'

        echo 'Env vars for cloud pull request...'
        echo "BITBUCKET_SOURCE_BRANCH ${env.BITBUCKET_SOURCE_BRANCH}"
        echo "BITBUCKET_TARGET_BRANCH ${env.BITBUCKET_TARGET_BRANCH}"
        echo "BITBUCKET_PULL_REQUEST_LINK ${env.BITBUCKET_PULL_REQUEST_LINK}"
        echo "BITBUCKET_PULL_REQUEST_ID ${env.BITBUCKET_PULL_REQUEST_ID}"
        echo "BITBUCKET_PAYLOAD ${env.BITBUCKET_PAYLOAD}"

        echo 'Env vars for cloud push...'
        echo "REPOSITORY_LINK ${env.REPOSITORY_LINK}"
        echo "BITBUCKET_SOURCE_BRANCH ${env.BITBUCKET_SOURCE_BRANCH}"
        echo "BITBUCKET_REPOSITORY_URL ${env.BITBUCKET_REPOSITORY_URL}"
        echo "BITBUCKET_PUSH_REPOSITORY_UUID ${env.BITBUCKET_PUSH_REPOSITORY_UUID}"
        echo "BITBUCKET_PAYLOAD ${env.BITBUCKET_PAYLOAD}"

        echo 'Env vars for server push...'
        echo "REPOSITORY_LINK ${env.REPOSITORY_LINK}"
        echo "BITBUCKET_SOURCE_BRANCH ${env.BITBUCKET_SOURCE_BRANCH}"
        echo "BITBUCKET_REPOSITORY_URL ${env.BITBUCKET_REPOSITORY_URL}"
        echo "BITBUCKET_PUSH_REPOSITORY_UUID ${env.BITBUCKET_PUSH_REPOSITORY_UUID}"
        echo "BITBUCKET_PAYLOAD ${env.BITBUCKET_PAYLOAD}"
      }
    }
  }
}

Thanks and Acknowledgments

This plugin is originally based on the Sazo's fork (https://github.com/sazo/bitbucket-plugin) of the Bitbucket plugin: https://plugins.jenkins.io/bitbucket.

bitbucket-push-and-pull-request-plugin's People

Contributors

cdelmonte-zg avatar cverbiest avatar eiriarte-mendez avatar gozke avatar hexonxons avatar jsj1027 avatar laudrup avatar macghriogair avatar markewaite avatar rabadin avatar raghav-a avatar rhotau avatar solarlodge avatar x4team avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitbucket-push-and-pull-request-plugin's Issues

add ssh uri matching for clone

Mar 08, 2019 9:09:15 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm
INFO: Trying to match https://git.int/scm/ds/hook-test.git<-->https://git.int/scm/ds/hook-test.git
INFO: Machted scm

Mar 08, 2019 9:07:28 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm
INFO: Trying to match ssh://[email protected]:7999/ds/hook-test.git<-->https://git.int/scm/ds/hook-test.git

When using ssh to clone from bitbucket server the SCM is not matched as it always seems to check against the https URL.

Builds not triggering with 1.6.1 and Bitbucket Server 7.0.1

After upgrading to 1.6.1 version of the plugin jobs fail to trigger, downgrading to 1.6.0 fixes the issue.
Jenkins ver. 2.176

From the Jenkins logs:

May 10, 2019 9:43:47 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.
May 10, 2019 9:43:47 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of server push cause.
May 10, 2019 9:43:47 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
WARNING: Problem injecting env variables: Cause = null
May 10, 2019 9:43:47 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of push cause.
May 10, 2019 9:43:47 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRPollingRunnable run
SEVERE: Failed to record SCM polling
java.lang.ClassCastException: io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRServerRepositoryAction cannot be cast to io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
        at io.jenkins.plugins.bitbucketpushandpullrequest.cause.repository.BitBucketPPRRepositoryCause.getRepositoryPayLoad(BitBucketPPRRepositoryCause.java:41)
        at io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor.buildEnvironmentFor(BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor.java:41)
        at hudson.model.Run.getEnvironment(Run.java:2379)
        at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:864)
        at hudson.plugins.git.GitSCM.getParamExpandedRepos(GitSCM.java:484)
        at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:693)
        at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:658)
        at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:400)
        at hudson.scm.SCM.poll(SCM.java:417)
        at hudson.model.AbstractProject._poll(AbstractProject.java:1390)
        at hudson.model.AbstractProject.poll(AbstractProject.java:1293)
        at io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRPollingRunnable.run(BitBucketPPRPollingRunnable.java:66)
        at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
        at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

May 10, 2019 9:43:47 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger$1 onPollError
INFO: Called onPollError

Webhook not triggering

Webhook for pull requests or push are simply not triggering from Bitbucket cloud.
I can see in the Bitbucket webhook logs that the request is sent to jenkins.

I have previously tried a different Bitbucket Push plugin and it triggers properly so I know the webhook url is correct.

I have manually run the job once.

There are no logs that appear in the jenkins console!! Using Jenkins 2.164.1.

Any ideas?

bitbucket-push-and-pull-request-plugin - Not triggering builds for FEATURE branch

bitbucket-push-and-pull-request-plugin - Is not triggering builds for Feature Branches but it is triggering MASTER branch for PULL/PUSH/MERGE

I have specified feature in ALLOWED branches in different ways like - 'feature**, feature*, feature/, feature/*, feature, /feature, */feature/**, /feature/, */feature'

It will be great someone would help me with this

Webhook does not trigger build on pull request creation

I'm trying to configure a webhook in BitBucket Server to trigger a build in Jenkins when a pull request is created.

I followed the instructions at this link to setup the webhook: https://confluence.atlassian.com/bitbucketserver/managing-webhooks-in-bitbucket-server-938025878.html

But the instructions do not provide details as to what URL on the Jenkins side should be triggered. I configured the webhook to use the polling URL as mentioned in the build job REST API.

When I test the webhook connection, it is successful, but in Jenkins, the build is not started. The BitBucket Push and Pull Request Hook Log says:

Polling has not run yet.

Is this an issue with how I configured the webhook? If so, can you provide any help in configuring the BitBucket side for this to work?

This is the webhook configuration in Bitbucket:
bitbucket_config

This is the trigger configuration in Jenkins:
jenkins_config

This project is not configured using Pipelines. Instead it's a Freestyle project.

Thanks!

Branch expression matching before triggering the build: expecting fix for Bitbucket server

Hi @cdelmonte-zg and @macghriogair

I were very happy to see changes fixing issue #36 so I downloaded this upgrade and made a try. However, it seems my build is not being triggered. After checking the content of the commit, I found this PR seems fixed the issue on Bitbucket Cloud, but may forget to make changes for Bitbucket server which is supposed to be taken care of in BitBucketPPRServerRepositoryPushActionFilter, am I right? I am keeping my local changes for a while. :-)

Anyway, thank you so much for your attention and appreciate your great help!

Regards,

Grant.

Jobs are not triggered on push event

Plugin Version: 2.0.0
Jenkins Version: 2.150.3
Jenkins Job Type: Pipeline
Triggered via: Bitbucket Cloud

Expected Behavior

Job should be triggered on push event.

Actual Behavior

Job is not triggered on Jenkins.
However, the webhook is executed. I get a 200 http response and "ok" in the response body.

Context

The plugin is not working. Though the webhook is triggered and seems ok, Jenkins jobs are not running.

Multiple triggers of the commits on initialization of the jobs

Hi,

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 1.6.2
  • Jenkins Version: 2.164.3
  • Jenkins Job Type: Freestyle
  • Triggered via: Bitbucket Cloud

Expected Behavior

Whenever I set up my job, and I push a commit, it should only trigger my job once. Regardless of previous history.

Actual Behavior

It seems like the first time, right after a job is created, the gitSCM is triggering the job multiple times, as many as branches exist in the project. This only happens once, after which the history of the commits are build, and consecutive commits into the repo only trigger the execution once.

Possible Solution

I am not familiarized enough with the code to be able to propose one solution, but filtering out the gitSCM to only use the branch associated to the commit that triggers the job, should help avoiding the gitSCM checking into other branches.

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. Have a repo with multiple branches in bitbucket
  2. Create a new job, in Freestyle, and add the gitSCM. No credentials are needed. Use blank build branch (all branches)
  3. Create a new branch in the repo
  4. commit something to that new branch.
  5. see the job's history. It should be close to the number of branches that the original git repository had.

Context

It took me quite some time to realize this. I also saw some comments in the jenkin's plugging description where they were having similar issues. I think this might not be 100% this plugging's fault, but it is likely the cause comes from the fact that you are using gitSCM class.

Jenkins Job configuration

Triggers: PR (update, create, approved), Push commit with blank branch
gitSCM:
build shell script: echo "hello there"

Jenkins logs

I have removed some information:

Received commit hook notification : {"push": ......."}}
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key payload from bitbucket
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction 
Received commit hook notification for branch: testingBranch
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction 
Received commit hook type: branch
May 22, 2019 7:26:26 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering remote [https://bitbucket.org/crpl_cisc/sollve_vv]
May 22, 2019 7:26:26 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering candidate job sollve_vv_fatnode
May 22, 2019 7:26:26 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering to poke sollve_vv_fatnode
May 22, 2019 7:26:26 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering candidate job sollve_vv_start
May 22, 2019 7:26:26 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering to poke sollve_vv_start
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm
Trying to match https://bitbucket.org/crpl_cisc/sollve_vv.git<-->https://bitbucket.org/crpl_cisc/sollve_vv 
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm
Machted scm
May 22, 2019 7:26:26 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Triggering trigger io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger for job sollve_vv_start
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryTriggerMatcher matchesAction
io.jenkins.plugins.bitbucketpushandpullrequest.model.cloud.BitBucketPPREvent@3b72b90a
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:26 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:26 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:26 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:26 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger$1 onPollSuccess
Called onPollSuccess
May 22, 2019 7:26:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryPushActionFilter matches
Should trigger build?
May 22, 2019 7:26:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryPushActionFilter matches
allowed branches are not set.
May 22, 2019 7:26:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger shouldScheduleJob
Should schedule job : true and (polling result has changes true or is pull request false)
May 22, 2019 7:26:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger scheduleJob
SCM changes detected in sollve_vv_start. Triggering  #35
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting REPOSOTORY_LINK: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_SOURCE_BRANCH: sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_REPOSITORY_URL: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_PUSH_REPOSITORY_UUID: {31d5bfed-b240-4b64-b3f1-dae54fe988ca}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRAction
Injecting BITBUCKET_PAYLOAD: {....}}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting REPOSOTORY_LINK: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_SOURCE_BRANCH: sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_REPOSITORY_URL: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_PUSH_REPOSITORY_UUID: {31d5bfed-b240-4b64-b3f1-dae54fe988ca}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRAction
Injecting BITBUCKET_PAYLOAD: {.....}}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting REPOSOTORY_LINK: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_SOURCE_BRANCH: sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_REPOSITORY_URL: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_PUSH_REPOSITORY_UUID: {31d5bfed-b240-4b64-b3f1-dae54fe988ca}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRAction
Injecting BITBUCKET_PAYLOAD: {....}}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting REPOSOTORY_LINK: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_SOURCE_BRANCH: sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_REPOSITORY_URL: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_PUSH_REPOSITORY_UUID: {31d5bfed-b240-4b64-b3f1-dae54fe988ca}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRAction
Injecting BITBUCKET_PAYLOAD: {....}}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting REPOSOTORY_LINK: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_SOURCE_BRANCH: sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_REPOSITORY_URL: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_PUSH_REPOSITORY_UUID: {31d5bfed-b240-4b64-b3f1-dae54fe988ca}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRAction
Injecting BITBUCKET_PAYLOAD: {....}}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting REPOSOTORY_LINK: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_SOURCE_BRANCH: sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_REPOSITORY_URL: https://bitbucket.org/crpl_cisc/sollve_vv
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor
Injecting BITBUCKET_PUSH_REPOSITORY_UUID: {31d5bfed-b240-4b64-b3f1-dae54fe988ca}
May 22, 2019 7:26:36 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:36 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:36 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRAction
Injecting BITBUCKET_PAYLOAD: {....}}
May 22, 2019 7:26:45 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:45 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:45 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:45 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:45 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:45 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:45 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:45 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:45 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:45 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:45 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:45 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:46 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:46 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:46 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:46 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:46 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:46 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:46 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:46 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:46 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:46 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:46 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:46 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:47 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:47 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:47 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:47 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:47 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:47 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:47 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of server push cause.
May 22, 2019 7:26:47 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:47 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Injecting env vars because of push cause.
May 22, 2019 7:26:47 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null
May 22, 2019 7:26:47 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Injecting env vars because of pull request cause.
May 22, 2019 7:26:47 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterPullRequestEnvironmentContributor buildEnvironmentFor
Problem injecting env variables: Cause = null

I believe that what's causing that "Problem injecting env variables: Cause = null" is in part this.

No job is triggered after recieving hook from Bitbucket on newest Jenkins 2.224

After updating Jenkins to 2.224 Bitbucket hook that is successful no longer triggers the jobs. Here is the partial log:
obraz

After that all jobs are listed, but none is triggered.
Here is what I have in the job (it has been recreated from scratch):
obraz

Bitbucket side:
obraz

It was working fine before the update. Plugin is in 2.3.0 version.

Trigger Configurations always change

  • Plugin Version: 2.2.0
  • Jenkins Version: 2.196
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud

I configured to Build with BitBucket Push and Pull Request Plugin Trigger for Created an Update. When I look later,there was only created option. I should add update or created options. Maybe it doesn't save correctly.

The trigger must be stable, it shouldn't change random. Are there any way to trigger this job? Bitbucket hook doesn't work. (for example this plugin for example environment variable doesn't work)

add ssh uri matching

.When using ssh to clone from bitbucket server the SCM is not matched as it always seems to check against the https URL.

Bitbucket Cloud and Pull Requests

Hello, I am using Bitbucket Cloud, I want to build the master branch with a PR merged locally, but Cloud doesn't support refs. How can I build the master repo with a PR merged locally?

repo:push to feature branch do not trigger builds

  • Plugin Version: 2.0.0
  • Jenkins Version: 2.176.1
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud

Expected Behavior

When a BitBucket webhook for repo:push is configured and sent to Jenkins/plugin a build is triggered for specific branch (master, feature)

Actual Behavior

No build is triggered for branches other than the master branch.

Possible Solution

find a way to trigger branches with all names

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. setup BitBucket webhook for repo:push events
  2. setup jenkins scm for repo and branch 'master, feature/'
    1.etup build trigger for plugin "Push" allowed branches 'master, feature/
    '
  3. Make pushes to feature branch which should trigger build for feature branch

Context

Changes in feature branch are not noticed until a PR is created and jenkins build is triggered by PR.

Bitbucket payload

Only if relevant, will be helpful for reproducing the issue

Jenkins Job configuration

image

source checkout in jenkins job:
git branch: '**', credentialsId: 'bitbucket_cred', url: 'https://bitbucket.org/reponame'

Jenkins logs

INFO Following allowed branches patterns are set: feature/, feature/testfeature1,
INFO The branchName in action is: feature/testfeature1
INFO Matching branch: feature/testfeature1 with branchSpec pattern: feature/

INFO Should schedule job : true and (polling result has changes false or is pull request false)

DSL pipeline, allowedBranches to be parametric

Feature Request

Sorry if im not servin this issue properly.
Im looking for option to be allowedBranches to be parametric in DSL pipeline
We have jobs witch is related to the branches, but Jenkinsfile is only one in all branches

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • [ x] There is no existing issue regarding the same topic

Feature description

Jenkins ver. 2.176.1
Plugin Version: 2.0.0
Jenkins Version: 2.176.1
Jenkins Job Type: Pipeline
Triggered via: Bitbucket Server

`pipeline {
agent any
environment {
BRANCH="${env.GIT_BRANCH}"
}
triggers {
bitBucketTrigger([[$class: 'BitBucketPPRRepositoryTriggerFilter', actionFilter: [$class: 'BitBucketPPRServerRepositoryPushActionFilter', allowedBranches: "${BRANCH}", triggerAlsoIfTagPush: false]]])
}

stages {
stage('Webhook test') {
steps {
echo "${env.GIT_BRANCH}"
echo "${BRANCH}"
echo "${env.JOB_NAME}"
}
}
}
}`

Jenkins shows an exception:
groovy.lang.MissingPropertyException: No such property: BRANCH for class: groovy.lang.Binding

Possible Implementation

Not obligatory, but suggest an idea for implementing addition or change

Add trigger for pull request merged

Hello @cdelmonte-zg ;

I am using version 1.5.0 of this plugin. I have a weird issue where Jenkins is returning HTTP 500 when it receives a pullrequest:fulfilled request (which is sent when a PR is merged) from Bitbucket.

Here is the request headers:

Key Value
 X-Request-UUID da1497fc-23a8-4715-9bca-15622469e4db
X-Event-Key pullrequest:fulfilled
X-Event-Time Sun, 28 Apr 2019 16:08:06 GMT
X-Attempt-Number 4
X-Hook-UUID 42c4a9a4-792c-42f7-8a06-223a86cd34fd
User-Agent Bitbucket-Webhooks/2.0
Content-Type application/json

And here is the body of the request:

{
  "pullrequest": {
    "rendered": {
      "description": {
        "raw": "",
        "markup": "markdown",
        "html": "",
        "type": "rendered"
      },
      "title": {
        "raw": "test file updated",
        "markup": "markdown",
        "html": "<p>test file updated</p>",
        "type": "rendered"
      }
    },
    "type": "pullrequest",
    "description": "",
    "links": {
      "decline": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "commits": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "comments": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "merge": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "html": {
        "href": "https://bitbucket.org/.../pull-requests/87"
      },
      "activity": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "diff": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "approve": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "statuses": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      }
    },
    "title": "test file updated",
    "close_source_branch": true,
    "reviewers": [],
    "id": 87,
    "destination": {
      "commit": {
        "hash": "a807ce367a1e",
        "type": "commit",
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/.../a807ce367a1e"
          },
          "html": {
            "href": "https://bitbucket.org/.../commits/a807ce367a1e"
          }
        }
      },
      "repository": {
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/..."
          },
          "html": {
            "href": "https://bitbucket.org/..."
          },
          "avatar": {
            "href": "...."
          }
        },
        "type": "repository",
        "name": "...",
        "full_name": "...",
        "uuid": "..."
      },
      "branch": {
        "name": "jenkins-bitbucket-pr-support"
      }
    },
    "created_on": "2019-04-28T16:03:31.748563+00:00",
    "summary": {
      "raw": "",
      "markup": "markdown",
      "html": "",
      "type": "rendered"
    },
    "source": {
      "commit": {
        "hash": "9395a3cb6913",
        "type": "commit",
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/.../commit/9395a3cb6913"
          },
          "html": {
            "href": "https://bitbucket.org/.../commits/9395a3cb6913"
          }
        }
      },
      "repository": {
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/..."
          },
          "html": {
            "href": "https://bitbucket.org/..."
          },
          "avatar": {
            "href": "..."
          }
        },
        "type": "repository",
        "name": "...",
        "full_name": "...",
        "uuid": "..."
      },
      "branch": {
        "name": "test/729"
      }
    },
    "comment_count": 0,
    "state": "MERGED",
    "task_count": 0,
    "participants": [],
    "reason": "",
    "updated_on": "2019-04-28T16:07:11.883087+00:00",
    "author": {
      "username": "ozgur",
      "display_name": "Özgür Vatansever",
      "uuid": "...",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/users/ozgur"
        },
        "html": {
          "href": "https://bitbucket.org/ozgur"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/ozgur/avatar/"
        }
      },
      "nickname": "ozgur",
      "type": "user",
      "account_id": "..."
    },
    "merge_commit": {
      "hash": "d815f669f833",
      "type": "commit",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/repositories/.../commit/d815f669f833"
        },
        "html": {
          "href": "https://bitbucket.org/.../commits/d815f669f833"
        }
      }
    },
    "closed_by": {
      "username": "ozgur",
      "display_name": "Özgür Vatansever",
      "uuid": "...",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/users/ozgur"
        },
        "html": {
          "href": "https://bitbucket.org/ozgur/"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/ozgur/avatar/"
        }
      },
      "nickname": "ozgur",
      "type": "user",
      "account_id": "..."
    }
  },
  "repository": {
    "scm": "git",
    "website": "https://bitbucket.org/...",
    "name": "testapp",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "html": {
        "href": "https://bitbucket.org/..."
      },
      "avatar": {
        "href": "..."
      }
    },
    "project": {
      "key": "TESTAPP",
      "type": "project",
      "uuid": "...",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/.../projects/TESTAPP"
        },
        "html": {
          "href": "https://bitbucket.org/account/user/.../projects/TESTAPP"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/user/.../projects/TESTAPP/avatar/32"
        }
      },
      "name": "TestApp"
    },
    "full_name": "...",
    "owner": {
      "username": "...",
      "display_name": "...",
      "type": "team",
      "uuid": "...",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/..."
        },
        "html": {
          "href": "https://bitbucket.org/.../"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/.../avatar/"
        }
      }
    },
    "type": "repository",
    "is_private": true,
    "uuid": "..."
  },
  "actor": {
    "username": "ozgur",
    "display_name": "Özgür Vatansever",
    "uuid": "...",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/users/ozgur"
      },
      "html": {
        "href": "https://bitbucket.org/ozgur/"
      },
      "avatar": {
        "href": "https://bitbucket.org/account/ozgur/avatar/"
      }
    },
    "nickname": "ozgur",
    "type": "user",
    "account_id": "..."
  }
}

Here is my Jenkins config:

Screen Shot 2019-04-28 at 19 52 23

Screen Shot 2019-04-28 at 19 52 29

Is this something related to the JSON payload containing non-ascii characters? Or is this plugin not handling pull request fulfilled messages at all?

I'd be appreciated if you can help me get this sorted out.

I am using Jenkins 2.150.2.

Thanks.

[Feature] Approve pull request on successful build

Feature Request

Would it be possible to have the plugin approve the PR if the job is successful, and remove the approval if unsuccessful?

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • [ x] There is no existing issue regarding the same topic
    (i dont think so)

Feature description

When job is successful, the Git user approves the PR
When job is unsuccessful, the Git user removes approval from the PR

Possible Implementation

The bitbucket-pull-request-builder plugin does this.

WARNING: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 1550 path $.repository.links.self"

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 1.62
  • Jenkins Version: 2.164.3
  • Jenkins Job Type: Pipline
  • Triggered via: Bitbucket Server 5.15.3 with bitbucket-webhooks 1.6.3

Expected Behavior

Payload handled correctly

Actual Behavior

Waning in logs saying "WARNING: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 1550 path $.repository.links.self"

Possible Solution

Not obligatory, but suggest a fix/reason for the bug

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug
1.
1.
1.
1.

Context

How has this issue affected you? What are you trying to accomplish?
Providing context helps us come up with a solution that is most useful in the real world.

Bitbucket payload

Only if relevant, will be helpful for reproducing the issue

Jenkins Job configuration

Only if relevant. Mainly scm and plugin parts will be helpful for reproducing the issue

Jenkins logs

Only if relevant, will be helpful for debugging

Not Working With the Pipeline, Kindly help me on this!

Plugin Version: 2.2.0
Jenkins Version:2.190.1
Jenkins Job Type: Pipeline
Triggered via: Bitbucket Cloud
Its not working with the pipeline, It has working fine with the Freestyle project.

This is the log of Pipeline project - Oct 21, 2019 10:39:02 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key pullrequest:updated from Bitbucket
Oct 21, 2019 10:39:02 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
Oct 21, 2019 10:39:02 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

Kindly help me how to resolve this...

An exception appears on pull request: ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 2.0.0
  • Jenkins Version: 2.183
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud

Expected Behavior

Success build

Actual Behavior

I get an exception: ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. Create pipeline
  2. Add pull request trigger (created)

Context

We have several jobs for unit tests (.net core/angular)
It exception appears sometimes but if it happens next build won't start, only after manually start

Jenkins Job configuration

section Build triggers:
check Build with BitBucket Push and Pull Request Plugin with BitBucket cloud pull request = created
section Pipeline script:

 stage('Checkout') {
            steps {             
              git credentialsId: 'my cred', url: 'my url', branch: '${BITBUCKET_SOURCE_BRANCH}'
            }
        }

Send a comment to PR or commit

Feature Request

Either as a build or post-build action, it would be nice to have a way to submit a comment into the PR or the commit. This should help expand the information provided in the bitbucket side. There should also be an interface that allows us users to send information from the build (e.g. through env variables) into the comment itself. I am not that familiarized with Jenkins to be able to propose a good solution.

Here is the API that could be used for this
https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/comments

Currently running build is not stopped by new commit/s for the same PR

  • I am not able to fix the problem myself and send a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 2.2.1
  • Jenkins Version: 2.190.3
  • Jenkins Job Type: Freestyle
  • Triggered via: Bitbucket Cloud

Expected Behavior

While an existing build is in progress for the project, triggered by this plugin because of a PR update (new commit) or PR create events, if I submit another commit and bitbucket sends an PR update event, the ongoing build should be cancelled/stopped and a new one should start that will pick the new revision.

Actual Behavior

Current build it is not stopped, it keeps on going; the new build for the new commit is not triggered even though "Execute concurrent builds if necessary" is checked, I understand this is not a setting that belongs to this plugin... however it makes sense to work.

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. have a project that is triggered on the PR update and create events
  2. create a PR, build will start
  3. wait 5 min and then commit changes to the same PR
  4. observe how the second commit it is not stopping the current build and it is not triggering another build

Context

This is affecting resource consumption, time consumption, and it can mislead cause it finishing the old build and not builds the second. thus leaving with impression build is successful on the last commit.

Bitbucket payload

usual update PR event. it is quite long,I can provide it if really needed it.

Jenkins Job configuration

we access bitbucket through stored credentials in jenkins
building branch origin/feature/* but it is reproing with simpler filters like origin/development

Trigger build on new tags only

Hi everyone,
I am trying to trigger a job on a New tag pushed event without success.

The trigger configuration looks like this:
image

When I push a new tag, the job is not triggered.

Everything works instead if I set the Allowed Branches filter either to:

  • an empty string (which won't be an acceptable solution in my case, cause it will trigger the job on any push)
    or
  • to the exact tag name (which is not acceptable for me either, cause tag names are not fixed strings).

Is there a solution for this use case?

Thanks you guys.

Triggers builds for unwanted branches on Jenkins

  • Plugin Version: 1.6.2
  • Jenkins Version: 2.153

Screen Shot 2019-06-11 at 3 01 11 pm

  • Jenkins Job Type: multibranch pipeline
  • Triggered via: Bitbucket Cloud

Expected Behavior

This plugin should trigger the build only for the specific branch for which the pull request has been created / updated

Actual Behavior

When a pull request is updated / created it ends up triggering build for many branches

http://jenkins_IP_or_host:8080/job/Job_Name/BitBucketPollLog/ is not available

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 2.2.1
  • Jenkins Version: 2.190.3
  • Jenkins Job Type: Freestyle
  • Triggered via: Bitbucket Cloud

Expected Behavior

When I visit http://jenkins_IP_or_host:8080/job/Job_Name/BitBucketPollLog/ is should load the log of requests coming from bitbucket

Actual Behavior

visiting the link results in a jenkins generic 404 error

Filter branches for the trigger - Pull Request events

Feature Request

Plugin Version: 2.2.0

Screen Shot 2019-10-17 at 10 28 49 pm

Expected Behaviour

This plugin should trigger the build only for the specific branch for which the pull request has been created / updated / approved / merged.

Actual Behaviour

When a pull request is created / updated / approved / merged it ends up triggering build for all the branches.

Jobs not triggered when there is an existing job for the same repo

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 2.2.0
  • Jenkins Version: 2.190.2
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud

Expected Behavior

If there are two pipeline jobs with the same repo and different branches webhook should trigger the correct job.

Actual Behavior

No jobs are triggered

Possible Solution

Don't have much context, but I think plugin should check all jobs to match repo/branch pair and trigger correct one

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. Create a job1 with repo1 branch 1
  2. Create a job2 with repo1 branch 2
  3. Trigger a webhook to for job2

Context

I want to have different jobs for different branches of the same repo, but it's not possible because of this problem.

Jenkins logs

2019-11-13 11:00:59.146+0000 [id=85]    INFO    i.j.p.b.f.r.BitBucketPPRRepositoryPushActionFilter#matches: Following allowed branches patterns are set: branch1
2019-11-13 11:00:59.146+0000 [id=85]    INFO    i.j.p.b.f.r.BitBucketPPRRepositoryPushActionFilter#matches: The branchName in action is: branch2
2019-11-13 11:00:59.147+0000 [id=85]    INFO    i.j.p.b.f.r.BitBucketPPRRepositoryPushActionFilter#matches: Matching branch: branch2 with branchSpec pattern: branch1

repo:push to master events do not trigger builds

  • Plugin Version: 1.6.2
  • Jenkins Version: 2.164.2
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud repo:push

Expected Behavior

When a BitBucket webhook for repo:push is configured and sent to Jenkins/plugin a build is triggered for resulting merged master branch

Actual Behavior

No build is triggered because the test for hasChanges() returns no significant changes

Possible Solution

find a way to populate the changes for the push action object

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. setup BitBucket webhook for repo:push events
  2. setup jenkins scm for repo and branch '*/master'
  3. setup build trigger for plugin "Push" allowed branches '*/master'
    4.merge code to master

Context

need to notice changes to master and trigger builds

Bitbucket payload

Jenkins logs

INFO: Should schedule job : true and (polling result has changes false or is pull request false)

Jenkins build triggered from push event with mercurial instead of git

Hi,

I've read through other issues regarding Jenkins build not being triggered, but nothing has worked for me so far.

I have a Jenkins project pulling from a private Bitbucket repository, which uses Mercurial as its version control. Here is how I set it up
pipeline

Trigger

Then I use ngrok to provide a public IP address for Jenkins which is running on my local machine so that I can add a webhook to the Bitbucket repository.
ngrok
webhook

As you can see from the screenshot, whenever I make/merge a pull request in Bitbucket, the webhook did get triggered, but Jenkins doesn't build the project. I've already manually build the project as someone suggested to ensure that the build gets triggered, but that didn't solve the issue.

Any idea on what would help? Thank you very much in advance!

Doesn't work branch filter for Cloud BitBucket pull requests

I have installed Jenkins version 2.204.1 and bitbucket push and pull request plugin version 2.2.1
When I create a Jenkins job or pipeline the filter for PR's is not working.
I have tried Jenkins versions 2.204.1 and the older one 2.150.1 and received the same issue for both.
image
image
image

Troubles with matching ssh-based repos

  • Plugin Version: 2.1.0-beta-1
  • Jenkins Version: 2.176.1
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud

Expected Behavior

After webhook received by Jenkins it triggers build process

Actual Behavior

Nothing happens, in log Invalid repository URLs error appears and it seems that plugin could not match https repo URL with git:// type configed inside job. In my case https://bitbucket.org/replaced/docker-env-jenkins/ vs [email protected]:replaced/docker-env-jenkins.git

Possible Solution

It definitely worked few months ago but was broken after fresh plugin updates

Bitbucket payload

{
  "push": {
    "changes": [
      {
        "forced": false,
        "old": {
          "name": "master",
          "links": {
            "commits": {
              "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commits/master"
            },
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/refs/branches/master"
            },
            "html": {
              "href": "https://bitbucket.org/replaced/docker-env-jenkins/branch/master"
            }
          },
          "default_merge_strategy": "merge_commit",
          "merge_strategies": [
            "merge_commit",
            "squash",
            "fast_forward"
          ],
          "type": "branch",
          "target": {
            "rendered": {},
            "hash": "21bf79027bc9c5b4489a66c62e06217a68bdf97c",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/21bf79027bc9c5b4489a66c62e06217a68bdf97c"
              },
              "html": {
                "href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/21bf79027bc9c5b4489a66c62e06217a68bdf97c"
              }
            },
            "author": {
              "raw": "Dmitry Ilyin <[email protected]>”,
              "type": "author"
            },
            "summary": {
              "raw": "ARGs in Dockerfile\n",
              "markup": "markdown",
              "html": "<p>ARGs in Dockerfile</p>",
              "type": "rendered"
            },
            "parents": [
              {
                "hash": "6bbc7ca28a2adaa50527f74dc7aac12a21a4001d",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/6bbc7ca28a2adaa50527f74dc7aac12a21a4001d"
                  },
                  "html": {
                    "href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/6bbc7ca28a2adaa50527f74dc7aac12a21a4001d"
                  }
                }
              }
            ],
            "date": "2019-07-14T16:35:40+00:00",
            "message": "ARGs in Dockerfile\n",
            "type": "commit",
            "properties": {}
          }
        },
        "links": {
          "commits": {
            "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commits?include=08862493534412c3200fa83e92932ec54c33a178&exclude=21bf79027bc9c5b4489a66c62e06217a68bdf97c"
          },
          "html": {
            "href": "https://bitbucket.org/replaced/docker-env-jenkins/branches/compare/08862493534412c3200fa83e92932ec54c33a178..21bf79027bc9c5b4489a66c62e06217a68bdf97c"
          },
          "diff": {
            "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/diff/08862493534412c3200fa83e92932ec54c33a178..21bf79027bc9c5b4489a66c62e06217a68bdf97c"
          }
        },
        "created": false,
        "commits": [
          {
            "rendered": {},
            "hash": "08862493534412c3200fa83e92932ec54c33a178",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178"
              },
              "comments": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178/comments"
              },
              "patch": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/patch/08862493534412c3200fa83e92932ec54c33a178"
              },
              "html": {
                "href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/08862493534412c3200fa83e92932ec54c33a178"
              },
              "diff": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/diff/08862493534412c3200fa83e92932ec54c33a178"
              },
              "approve": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178/approve"
              },
              "statuses": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178/statuses"
              }
            },
            "author": {
              "raw": "Dmitry Ilyin <[email protected]>”,
              "type": "author"
            },
            "summary": {
              "raw": "rus->eng for readme translation\n",
              "markup": "markdown",
              "html": "<p>rus-&gt;eng for readme translation</p>",
              "type": "rendered"
            },
            "parents": [
              {
                "hash": "21bf79027bc9c5b4489a66c62e06217a68bdf97c",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/21bf79027bc9c5b4489a66c62e06217a68bdf97c"
                  },
                  "html": {
                    "href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/21bf79027bc9c5b4489a66c62e06217a68bdf97c"
                  }
                }
              }
            ],
            "date": "2019-09-03T17:37:39+00:00",
            "message": "rus->eng for readme translation\n",
            "type": "commit",
            "properties": {}
          }
        ],
        "truncated": false,
        "closed": false,
        "new": {
          "name": "master",
          "links": {
            "commits": {
              "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commits/master"
            },
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/refs/branches/master"
            },
            "html": {
              "href": "https://bitbucket.org/replaced/docker-env-jenkins/branch/master"
            }
          },
          "default_merge_strategy": "merge_commit",
          "merge_strategies": [
            "merge_commit",
            "squash",
            "fast_forward"
          ],
          "type": "branch",
          "target": {
            "rendered": {},
            "hash": "08862493534412c3200fa83e92932ec54c33a178",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178"
              },
              "html": {
                "href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/08862493534412c3200fa83e92932ec54c33a178"
              }
            },
            "author": {
              "raw": "Dmitry Ilyin <[email protected]>",
              "type": "author"
            },
            "summary": {
              "raw": "rus->eng for readme translation\n",
              "markup": "markdown",
              "html": "<p>rus-&gt;eng for readme translation</p>",
              "type": "rendered"
            },
            "parents": [
              {
                "hash": "21bf79027bc9c5b4489a66c62e06217a68bdf97c",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/21bf79027bc9c5b4489a66c62e06217a68bdf97c"
                  },
                  "html": {
                    "href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/21bf79027bc9c5b4489a66c62e06217a68bdf97c"
                  }
                }
              }
            ],
            "date": "2019-09-03T17:37:39+00:00",
            "message": "rus->eng for readme translation\n",
            "type": "commit",
            "properties": {}
          }
        }
      }
    ]
  },
  "actor": {
    "display_name": "Dmitrii Ilin",
    "account_id": "5c8a1d5d9d7fc173a5953d2e",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/users/%7Bcbcf1fb2-0883-4e20-b2e8-f8f0c0f96258%7D"
      },
      "html": {
        "href": "https://bitbucket.org/%7Bcbcf1fb2-0883-4e20-b2e8-f8f0c0f96258%7D/"
      },
      "avatar": {
        "href": "https://secure.gravatar.com/avatar/6cc2b05c09264b9e7726136247d4d369?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FDI-0.png"
      }
    },
    "nickname": "dmitriiilin",
    "type": "user",
    "uuid": "{cbcf1fb2-0883-4e20-b2e8-f8f0c0f96258}"
  },
  "repository": {
    "scm": "git",
    "website": "",
    "name": "docker-env-jenkins",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins"
      },
      "html": {
        "href": "https://bitbucket.org/replaced/docker-env-jenkins"
      },
      "avatar": {
        "href": "https://bytebucket.org/ravatar/%7B425e3085-f16a-45b6-a6ee-5952817aa60c%7D?ts=default"
      }
    },
    "project": {
      "key": "PROJ",
      "type": "project",
      "uuid": "{683e7939-2426-47d2-a728-8080b652949a}",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/replaced/projects/PROJ"
        },
        "html": {
          "href": "https://bitbucket.org/account/user/replaced/projects/PROJ"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/user/replaced/projects/PROJ/avatar/32"
        }
      },
      "name": "DevOps"
    },
    "full_name": "replaced/docker-env-jenkins",
    "owner": {
      "username": "replaced",
      "display_name": "replaced",
      "type": "team",
      "uuid": "{cbc9cb85-5b50-4a37-b6af-f4e763d53af8}",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/%7Bcbc9cb85-5b50-4a37-b6af-f4e763d53af8%7D"
        },
        "html": {
          "href": "https://bitbucket.org/%7Bcbc9cb85-5b50-4a37-b6af-f4e763d53af8%7D/"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/replaced/avatar/"
        }
      }
    },
    "type": "repository",
    "is_private": true,
    "uuid": "{425e3085-f16a-45b6-a6ee-5952817aa60c}"
  }
}

Jenkins Job configuration

There is no repo address inside Jenkinsfile because I'm using Pipeline script from SCM. Configured git repo URL looks like [email protected]:replaced/docker-env-jenkins.git

#!/usr/bin/env groovy

properties([[$class: 'JiraProjectProperty'], pipelineTriggers([bitBucketTrigger([[$class: 'BitBucketPPRRepositoryTriggerFilter', actionFilter: [$class: 'BitBucketPPRRepositoryPushActionFilter', allowedBranches: 'master', triggerAlsoIfTagPush: false]]])])])

pipeline {
    agent any

    stages {
        stage('Build image') {
            steps {
                script {
                    image = docker.build("gdevops/env-jenkins",
                        "--pull ./jenkins-master")
                }
            }
        }

        stage('Publish image') {
            steps {
                script {
                    docker.withRegistry("registry") {
                        image.push("${env.BUILD_NUMBER}")

                        image.push("latest")
                    }
                }
            }
        }
    }
}

Jenkins logs

Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
Received commit hook notification : {"push": {"changes": [{"forced": false, "old": {"name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/refs/branches/master"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/branch/master"}}, "default_merge_strategy": "merge_commit", "merge_strategies": ["merge_commit", "squash", "fast_forward"], "type": "branch", "target": {"rendered": {}, "hash": "21bf79027bc9c5b4489a66c62e06217a68bdf97c", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/21bf79027bc9c5b4489a66c62e06217a68bdf97c"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/21bf79027bc9c5b4489a66c62e06217a68bdf97c"}}, "author": {"raw": "Dmitry Ilyin <[email protected]>", "type": "author"}, "summary": {"raw": "ARGs in Dockerfile\n", "markup": "markdown", "html": "<p>ARGs in Dockerfile</p>", "type": "rendered"}, "parents": [{"hash": "6bbc7ca28a2adaa50527f74dc7aac12a21a4001d", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/6bbc7ca28a2adaa50527f74dc7aac12a21a4001d"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/6bbc7ca28a2adaa50527f74dc7aac12a21a4001d"}}}], "date": "2019-07-14T16:35:40+00:00", "message": "ARGs in Dockerfile\n", "type": "commit", "properties": {}}}, "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commits?include=08862493534412c3200fa83e92932ec54c33a178&exclude=21bf79027bc9c5b4489a66c62e06217a68bdf97c"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/branches/compare/08862493534412c3200fa83e92932ec54c33a178..21bf79027bc9c5b4489a66c62e06217a68bdf97c"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/diff/08862493534412c3200fa83e92932ec54c33a178..21bf79027bc9c5b4489a66c62e06217a68bdf97c"}}, "created": false, "commits": [{"rendered": {}, "hash": "08862493534412c3200fa83e92932ec54c33a178", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178"}, "comments": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178/comments"}, "patch": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/patch/08862493534412c3200fa83e92932ec54c33a178"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/08862493534412c3200fa83e92932ec54c33a178"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/diff/08862493534412c3200fa83e92932ec54c33a178"}, "approve": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178/approve"}, "statuses": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178/statuses"}}, "author": {"raw": "Dmitry Ilyin <[email protected]>", "type": "author"}, "summary": {"raw": "rus->eng for readme translation\n", "markup": "markdown", "html": "<p>rus-&gt;eng for readme translation</p>", "type": "rendered"}, "parents": [{"hash": "21bf79027bc9c5b4489a66c62e06217a68bdf97c", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/21bf79027bc9c5b4489a66c62e06217a68bdf97c"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/21bf79027bc9c5b4489a66c62e06217a68bdf97c"}}}], "date": "2019-09-03T17:37:39+00:00", "message": "rus->eng for readme translation\n", "type": "commit", "properties": {}}], "truncated": false, "closed": false, "new": {"name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/refs/branches/master"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/branch/master"}}, "default_merge_strategy": "merge_commit", "merge_strategies": ["merge_commit", "squash", "fast_forward"], "type": "branch", "target": {"rendered": {}, "hash": "08862493534412c3200fa83e92932ec54c33a178", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/08862493534412c3200fa83e92932ec54c33a178"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/08862493534412c3200fa83e92932ec54c33a178"}}, "author": {"raw": "Dmitry Ilyin <[email protected]>", "type": "author"}, "summary": {"raw": "rus->eng for readme translation\n", "markup": "markdown", "html": "<p>rus-&gt;eng for readme translation</p>", "type": "rendered"}, "parents": [{"hash": "21bf79027bc9c5b4489a66c62e06217a68bdf97c", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins/commit/21bf79027bc9c5b4489a66c62e06217a68bdf97c"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins/commits/21bf79027bc9c5b4489a66c62e06217a68bdf97c"}}}], "date": "2019-09-03T17:37:39+00:00", "message": "rus->eng for readme translation\n", "type": "commit", "properties": {}}}}]}, "actor": {"display_name": "Dmitrii Ilin", "uuid": "{cbcf1fb2-0883-4e20-b2e8-f8f0c0f96258}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/%7Bcbcf1fb2-0883-4e20-b2e8-f8f0c0f96258%7D"}, "html": {"href": "https://bitbucket.org/%7Bcbcf1fb2-0883-4e20-b2e8-f8f0c0f96258%7D/"}, "avatar": {"href": "https://secure.gravatar.com/avatar/6cc2b05c09264b9e7726136247d4d369?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FDI-0.png"}}, "nickname": "dmitriiilin", "type": "user", "account_id": "5c8a1d5d9d7fc173a5953d2e"}, "repository": {"scm": "git", "website": "", "name": "docker-env-jenkins", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins"}, "html": {"href": "https://bitbucket.org/replaced/docker-env-jenkins"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B425e3085-f16a-45b6-a6ee-5952817aa60c%7D?ts=default"}}, "project": {"key": "PROJ", "type": "project", "uuid": "{683e7939-2426-47d2-a728-8080b652949a}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/teams/replaced/projects/PROJ"}, "html": {"href": "https://bitbucket.org/account/user/replaced/projects/PROJ"}, "avatar": {"href": "https://bitbucket.org/account/user/replaced/projects/PROJ/avatar/32"}}, "name": "DevOps"}, "full_name": "replaced/docker-env-jenkins", "owner": {"username": "replaced", "display_name": "replaced", "type": "team", "uuid": "{cbc9cb85-5b50-4a37-b6af-f4e763d53af8}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/teams/%7Bcbc9cb85-5b50-4a37-b6af-f4e763d53af8%7D"}, "html": {"href": "https://bitbucket.org/%7Bcbc9cb85-5b50-4a37-b6af-f4e763d53af8%7D/"}, "avatar": {"href": "https://bitbucket.org/account/replaced/avatar/"}}}, "type": "repository", "is_private": true, "uuid": "{425e3085-f16a-45b6-a6ee-5952817aa60c}"}}
Sep 03, 2019 8:54:12 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key repo:push from Bitbucket
Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
the payload is: {"push":{"changes":[{"forced":false,"links":{"html":{"href":"https://bitbucket.org/replaced/docker-env-jenkins/branches/compare/08862493534412c3200fa83e92932ec54c33a178..21bf79027bc9c5b4489a66c62e06217a68bdf97c"}},"truncated":false,"created":false,"closed":false,"new":{"type":"branch","name":"master"}}]},"repository":{"scm":"git","website":"","name":"docker-env-jenkins","links":{"html":{"href":"https://bitbucket.org/replaced/docker-env-jenkins"},"self":{"href":"https://api.bitbucket.org/2.0/repositories/replaced/docker-env-jenkins"}},"project":{"links":{"html":{"href":"https://bitbucket.org/account/user/replaced/projects/PROJ"},"self":{"href":"https://api.bitbucket.org/2.0/teams/replaced/projects/PROJ"}},"type":"project","uuid":"{683e7939-2426-47d2-a728-8080b652949a}","key":"PROJ","name":"DevOps"},"owner":{"type":"team","display_name":"replaced","uuid":"{cbc9cb85-5b50-4a37-b6af-f4e763d53af8}","links":{"html":{"href":"https://bitbucket.org/%7Bcbc9cb85-5b50-4a37-b6af-f4e763d53af8%7D/"},"self":{"href":"https://api.bitbucket.org/2.0/teams/%7Bcbc9cb85-5b50-4a37-b6af-f4e763d53af8%7D"}}},"type":"repository","is_private":true,"uuid":"{425e3085-f16a-45b6-a6ee-5952817aa60c}"},"actor":{"display_name":"Dmitrii Ilin","account_id":"5c8a1d5d9d7fc173a5953d2e","type":"user","links":{"html":{"href":"https://bitbucket.org/%7Bcbcf1fb2-0883-4e20-b2e8-f8f0c0f96258%7D/"},"self":{"href":"https://api.bitbucket.org/2.0/users/%7Bcbcf1fb2-0883-4e20-b2e8-f8f0c0f96258%7D"}},"nickname":"dmitriiilin","uuid":"{cbcf1fb2-0883-4e20-b2e8-f8f0c0f96258}"}}
Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
the selected payload processor is: io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRRepositoryPayloadProcessor@20e679c1
Sep 03, 2019 8:54:12 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction 
Received commit hook notification for branch: master
Sep 03, 2019 8:54:12 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction 
Received commit hook type: branch
Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering remote [https://bitbucket.org/replaced/docker-env-jenkins]
Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering candidate job docker-env-jenkins
Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering to poke docker-env-jenkins
Sep 03, 2019 8:54:12 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Job is of type: org.jenkinsci.plugins.workflow.job.WorkflowJob
Sep 03, 2019 8:54:12 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe triggerMatchingJobs
Invalid repository URLs [https://bitbucket.org/replaced/docker-env-jenkins]
null
Sep 03, 2019 8:54:12 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
Sep 03, 2019 8:54:12 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

[Feature] Propagate build status to Bitbucket

Propagate build status to Bitbucket

As a Bitbucket User I want to see updates on build statuses propagated via Bitbucket API to the Bitbucket repo.

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • There is no existing issue regarding the same topic (but: off topic mention here: #19 (comment))

Feature description

Once a build is triggered, there should be an update of the build status on Bitbucket Cloud / Bitbucket Server accordingly.
Once a build has been finished / failed / stopped, update build status as well.

tbd. Should updates be propagated for all jobs or only those triggered by the Plugin? Proposal: all jobs.

Known states:

  • INPROGRESS
  • SUCCESSFUL
  • FAILED
  • STOPPED

Possible Implementation

Maybe register an event listener / handler for Job update events, process the same pattern matching already in place for Job triggers. + consume Bitbucket REST API.

Bitbucket API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build
Bitbucket Server article: https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/

BITBUCKET_SOURCE_BRANCH is not injected for SCM poll

I want to use this plugin to trigger builds on Bitbucket pull requests. So I want to trigger builds on the branch of the created pull request. So I configure by SCM as follows:
Screenshot 2019-03-12 at 09 42 49

This works nicely, and checks out the required branch. The problem is with SCM polling:

Polling SCM changes on master
[P2] $ hg --config auth.jenkins.prefix=* --config ******** --config ******** --config "auth.jenkins.schemes=http https" pull --rev ${BITBUCKET_SOURCE_BRANCH}
pulling from https://bitbucket.org/Nikem/branch-test
abort: unknown revision '${BITBUCKET_SOURCE_BRANCH}'!

As you can see, the detected branch variable is not injected to poll task, so Jenkins fails to determine if there are significant changes in that branch.

BITBUCKET_PAYLOD

BITBUCKET_PAYLOAD=io.jenkins.plugins.bitbucketpushandpullrequest.model.BitBucketPPRNewPayload@1a554b37

Currently BITBUCKET_PAYLOAD stored java object reference in envrionment.
I think It would be string.

Create a BucketPPRPullRequestCommentCreatedFilter

Feature Request

Create a filter to trigger build if comment is created on PR

Feature description

There should be a filter for comment created event that matches a user configured comment. The filter should trigger a build iff the comment created matches the configured comment.

Possible Implementation

I know the bitbucket pullrequest:comment_created passes a comment in the payload
{ "actor": Owner, "repository": Repository, "pullrequest": PullRequest, "comment": Comment }
I looked around and it seems that adding a new filter shouldn't be a problem, I just don't know how to go about passing the comment from the payload to the filter.
I'm also not sure how configuration is going to provide the comment to be matched.

The plug-in does not work when there is a shared library set up in GIT SCM and I only want to create a JOB for any bitbucket repository.

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • [ x] You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • [ x] There is no existing issue regarding the same topic
  • Plugin Version: (2.2.0 )
  • Jenkins Version: 2.22
  • Jenkins Job Type: (Pipeline without SCM configured)
  • Triggered via: (Bitbucket Cloud?)

Expected Behavior

The plugin should not force setting GIT SCM in JOB in case of pipeline. Thus the GIT checkout configuration could be dynamic and according to the source branch and payload repository

Actual Behavior

I created a single JOB pipeline to receive the pull request from any repository. Inside the pipeline is checked out by the source branch and the name of the repository coming from payload.
I also use a shared library where my pipelines are centralized. Every time a job runs, this library is downloaded to the local branch. Since a repository has not been set up in the job (it should not, as it must be generic), the plugin tries to match the local branch (in this case the shared library) and the remote url (coming from webhook bitbucket) and how it is different , discards the JOB

Possible Solution

I could have a checkbox to skip the match on io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe.matchGitScm and let me manage the source branch checkout in the pipeline

Steps to Reproduce

  1. Create a JOB pipeline and configure the plugin to receive pull request created.
  2. Do not link JOB to a repository in GIT SCM.
  3. Set up a shared library in jenkins system configuration.
  4. Create a pull request on bitbucket

Context

How has this issue affected you? What are you trying to accomplish?
Providing context helps us come up with a solution that is most useful in the real world.

Bitbucket payload

Only if relevant, will be helpful for reproducing the issue

Jenkins Job configuration

image

Pipeline:
image

Inside file prAnalyze.groovy in jenkins_shared_library.git
image

Jenkins logs

the selected payload processor is: io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRPullRequestPayloadProcessor@1a6b19ad dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Considering remote [https://bitbucket.org/<TEAM>/<REPOSITORY>] dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Considering candidate job analise-pull-request dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Considering to poke analise-pull-request dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Job is of type: hudson.model.Hudson dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Scheduling for job:analise-pull-request dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe lambda$matchGitScm$9 GIT BRANCHESdevelop dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm GIT BRANCH VARIABLE GIT_BRANCH dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm GIT LOCAL BRANCH VARIABLE GIT_LOCAL_BRANCH dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm Trying to match https://bitbucket.org/<TEAM>/jenkins_shared_library.git<-->https://bitbucket.org/<TEAM>/<REPOSITORY dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe analise-pull-request SCM doesnt match remote repo {1}

New "Source branch updated" PR Webhook/Event supported in BBS 7.0

Any plans to support this new webhook/event which will enable a clean separation between "anything changed in the PR (including comments) vs "a commit has been made to the source branch"?

I assume your pullRequestServerUpdatedAction operates on the latter, and is "noisy" in the sense that it will trigger even when comments change.

Details on new webhook here:
https://confluence.atlassian.com/bitbucketserver/event-payload-938025882.html

Version 1.6.2 throws exception after receiving PR payload

Hello @cdelmonte-zg ;
We are getting a null pointer exception from the plugin for the any kind of event (push/merged/created etc.).

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 1.6.2
  • Jenkins Version: 2.150.2
  • Jenkins Job Type: Freestyle
  • Triggered via: Bitbucket Cloud

Expected Behavior

Payloads coming as a result of a webhook must be processed correctly.

Actual Behavior

We are getting a null pointer exception from the plugin for the any kind of event (push/merged/created etc.).

Jenkins Job configuration

Screen Shot 2019-05-13 at 16 12 44

Screen Shot 2019-05-13 at 16 12 51

Context

How has this issue affected you? What are you trying to accomplish?
Providing context helps us come up with a solution that is most useful in the real world.

Bitbucket payload

{
  "push": {
    "changes": [
      {
        "forced": false,
        "old": {
          "name": "development",
          "links": {
            "commits": {
              "href": "..."
            },
            "self": {
              "href": "..."
            },
            "html": {
              "href": "https://bitbucket.org/..."
            }
          },
          "default_merge_strategy": "merge_commit",
          "merge_strategies": [
            "merge_commit",
            "squash",
            "fast_forward"
          ],
          "type": "branch",
          "target": {
            "rendered": {},
            "hash": "69d4aa9af17aa3dec1b845ef6b8f0a8fd1cd50f8",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/.../69d4aa9af17aa3dec1b845ef6b8f0a8fd1cd50f8"
              },
              "html": {
                "href": "https://bitbucket.org/..."
              }
            },
            "author": {
              "raw": "Özgür Vatansever <...>",
              "type": "author",
              "user": {
                "username": "...",
                "display_name": "Özgür Vatansever",
                "uuid": "...",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/.../"
                  },
                  "avatar": {
                    "href": "..."
                  }
                },
                "nickname": "Özgür Vatansever",
                "type": "user",
                "account_id": "5b5586c6f220fc2d9cb5c74a"
              }
            },
            "summary": {
              "raw": "Merged in feature/commit-message-prepend-branch (pull request #106)\n\nHook for checking and prepending branch name into commit message\n\nApproved-by: Vidal HARA <...>\nApproved-by: Umut Tuzcu <...>\n",
              "markup": "markdown",
              "html": "<p>Merged in feature/commit-message-prepend-branch (pull request #106)</p>\n<p>Hook for checking and prepending branch name into commit message</p>\n<p>Approved-by: Vidal HARA ...",
              "type": "rendered"
            },
            "parents": [
              {
                "hash": "972918fc8f2fdea4780c99ce5885d3055d61afbc",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/.../..."
                  }
                }
              },
              {
                "hash": "86ecb44d42a10090eda99db4ecb54e59bf8bf363",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/.../..."
                  }
                }
              }
            ],
            "date": "2019-05-13T09:25:46+00:00",
            "message": "Merged in feature/commit-message-prepend-branch ...",
            "type": "commit",
            "properties": {}
          }
        },
        "links": {
          "commits": {
            "href": "https://api.bitbucket.org/2.0/repositories/..."
          },
          "html": {
            "href": "https://bitbucket.org/.../..."
          },
          "diff": {
            "href": "https://api.bitbucket.org/2.0/repositories/..."
          }
        },
        "created": false,
        "commits": [
          {
            "rendered": {},
            "hash": "09bf41c8afac69aa7aea9e5d87ea7d770cd789ad",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/..."
              },
              "comments": {
                "href": "https://api.bitbucket.org/2.0/repositories/..."
              },
              "patch": {
                "href": "https://api.bitbucket.org/2.0/repositories/..."
              },
              "html": {
                "href": "https://bitbucket.org/..."
              },
              "diff": {
                "href": "https://api.bitbucket.org/2.0/repositories/..."
              },
              "approve": {
                "href": "https://api.bitbucket.org/2.0/repositories/..."
              },
              "statuses": {
                "href": "https://api.bitbucket.org/2.0/repositories/..."
              }
            },
            "author": {
              "raw": "Ozgur Vatansever ...",
              "type": "author",
              "user": {
                "username": "...",
                "display_name": "Özgür Vatansever",
                "uuid": "...",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/.../"
                  },
                  "avatar": {
                    "href": "..."
                  }
                },
                "nickname": "Özgür Vatansever",
                "type": "user",
                "account_id": "..."
              }
            },
            "summary": {
              "raw": "[development] - updated agent label\n",
              "markup": "markdown",
              "html": "<p>[development] - updated agent label</p>",
              "type": "rendered"
            },
            "parents": [
              {
                "hash": "69d4aa9af17aa3dec1b845ef6b8f0a8fd1cd50f8",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/..."
                  }
                }
              }
            ],
            "date": "2019-05-13T10:49:01+00:00",
            "message": "[development] - updated agent label\n",
            "type": "commit",
            "properties": {}
          }
        ],
        "truncated": false,
        "closed": false,
        "new": {
          "name": "development",
          "links": {
            "commits": {
              "href": "https://api.bitbucket.org/2.0/repositories/.../commits/development"
            },
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/..."
            },
            "html": {
              "href": "https://bitbucket.org/..."
            }
          },
          "default_merge_strategy": "merge_commit",
          "merge_strategies": [
            "merge_commit",
            "squash",
            "fast_forward"
          ],
          "type": "branch",
          "target": {
            "rendered": {},
            "hash": "09bf41c8afac69aa7aea9e5d87ea7d770cd789ad",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories..."
              },
              "html": {
                "href": "https://bitbucket.org/..."
              }
            },
            "author": {
              "raw": "Ozgur Vatansever ...",
              "type": "author",
              "user": {
                "username": "...",
                "display_name": "Özgür Vatansever",
                "uuid": "...",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/.../"
                  },
                  "avatar": {
                    "href": "..."
                  }
                },
                "nickname": "Özgür Vatansever",
                "type": "user",
                "account_id": "..."
              }
            },
            "summary": {
              "raw": "[development] - updated agent label\n",
              "markup": "markdown",
              "html": "<p>[development] - updated agent label</p>",
              "type": "rendered"
            },
            "parents": [
              {
                "hash": "69d4aa9af17aa3dec1b845ef6b8f0a8fd1cd50f8",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/..."
                  },
                  "html": {
                    "href": "https://bitbucket.org/..."
                  }
                }
              }
            ],
            "date": "2019-05-13T10:49:01+00:00",
            "message": "[development] - updated agent label\n",
            "type": "commit",
            "properties": {}
          }
        }
      }
    ]
  },
  "actor": {
    "username": "...",
    "display_name": "Özgür Vatansever",
    "uuid": "...",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/users/..."
      },
      "html": {
        "href": "https://bitbucket.org/.../"
      },
      "avatar": {
        "href": "..."
      }
    },
    "nickname": "Özgür Vatansever",
    "type": "user",
    "account_id": "..."
  },
  "repository": {
    "scm": "git",
    "website": "https://bitbucket.org/...",
    "name": "...",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/..."
      },
      "html": {
        "href": "https://bitbucket.org/..."
      },
      "avatar": {
        "href": "..."
      }
    },
    "project": {
      "key": "...",
      "type": "project",
      "uuid": "...",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/.../projects/..."
        },
        "html": {
          "href": "https://bitbucket.org/account/user/.../projects/..."
        },
        "avatar": {
          "href": "https://bitbucket.org/account/user/.../projects/.../avatar/32"
        }
      },
      "name": "..."
    },
    "full_name": "...",
    "owner": {
      "username": "...",
      "display_name": "...",
      "type": "team",
      "uuid": "...",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/..."
        },
        "html": {
          "href": "https://bitbucket.org/.../"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/.../avatar/"
        }
      }
    },
    "type": "repository",
    "is_private": true,
    "uuid": "..."
  }
}

Only if relevant. Mainly scm and plugin parts will be helpful for reproducing the issue

Jenkins logs

May 13, 2019 1:05:55 PM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Sending response.
May 13, 2019 1:05:55 PM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.
May 13, 2019 1:05:55 PM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of server push cause.
May 13, 2019 1:05:55 PM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterServerRepositoryEnvironmentContributor buildEnvironmentFor
WARNING: Problem injecting env variables: Cause = null
May 13, 2019 1:05:55 PM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of push cause.
May 13, 2019 1:05:55 PM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRPollingRunnable run
SEVERE: Failed to record SCM polling
java.lang.NullPointerException
	at io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction.getRepositoryUrl(BitBucketPPRRepositoryAction.java:58)
	at io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor.buildEnvironmentFor(BitBucketPPRAdditionalParameterRepositoryEnvironmentContributor.java:43)
	at hudson.model.Run.getEnvironment(Run.java:2373)
	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:872)
	at hudson.plugins.git.GitSCM.getParamExpandedRepos(GitSCM.java:484)
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:693)
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:658)
	at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:400)
	at hudson.scm.SCM.poll(SCM.java:417)
	at hudson.model.AbstractProject._poll(AbstractProject.java:1390)
	at hudson.model.AbstractProject.poll(AbstractProject.java:1293)
	at io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRPollingRunnable.run(BitBucketPPRPollingRunnable.java:66)
	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Branch expression matching before triggering the build

The current logic on triggering build from Bitbucket Server pushing is tricky, and I tried several times to make the wildcard branch spec working, but not very successful. After debugging the plugin I am not 100% sure, but it seems that logic under following has space to be improved.

  public boolean shouldTriggerBuild(BitBucketPPRAction bitbucketAction) {
    if (bitbucketAction.getType().equalsIgnoreCase("BRANCH")
        || bitbucketAction.getType().equalsIgnoreCase("UPDATE") || this.triggerAlsoIfTagPush) {

/** REVIEW - Grant: Forgive me if I am wrong. 
Are we matching the branch name with spec, or matching spec with branch name?  
May the BranchSpec object here  contain the regular expression and being enhanced 
by EnvVars later, but the current logic seems actually put the branch name which shall
 be matched by the expression to the BranchSpec? 

As a result, only a complete match will trigger the build. This happens ti work if 
we configure the spec as master though...  
*/

      return matches(new BranchSpec(bitbucketAction.getBranchName()), this.allowedBranches);
    }

    return false;
  }

  protected boolean matches(BranchSpec branchSpec, String allowedBranches) {
    LOGGER.info("Should trigger build?");
    if (this.allowedBranches.isEmpty()) {
      LOGGER.info("allowed branches are not set.");
      return true;
    }

    LOGGER.info("Allowed branches are set.");
    String[] branches = this.allowedBranches.split(",");
    Arrays.stream(branches).map(String::trim).toArray(unused -> branches);

    for (String branchPattern : branches) {
      if (branchSpec.matches(branchPattern)) {
        return true;
      }
    }

    return false;
  }

And I tried to update the code as follows, it seems works fine with my Jenkins. So if any guys could confirm my finding and update I am planning to create a PR for this. Thanks and could you please share your thinking?

	public boolean shouldTriggerBuild(BitBucketPPRAction bitbucketAction) {
		if (bitbucketAction.getType().equalsIgnoreCase("BRANCH") || bitbucketAction.getType().equalsIgnoreCase("UPDATE")
				|| this.triggerAlsoIfTagPush) {

			String branchName = bitbucketAction.getBranchName();
			LOGGER.info("The branchName in action is: " + branchName);
			
			String[] branchSpecs = this.allowedBranches.split(",");
			for (String branchSpec: branchSpecs) {
				LOGGER.info("Matching branch: " + branchName + " with branchSpec: " + branchSpec);
				if (new BranchSpec(branchSpec.trim()).matches(branchName)) 
					return true;
			}
		}
		return false;
	}

Not Working with the Pipeline project

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 2.2.0
  • Jenkins Version:2.190.1
  • Jenkins Job Type: Pipeline
  • Triggered via: Bitbucket Cloud

Its not working with the pipeline, It has working fine with the Freestyle project.

This is the log of Pipeline project - Oct 21, 2019 10:39:02 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key pullrequest:updated from Bitbucket
Oct 21, 2019 10:39:02 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
Oct 21, 2019 10:39:02 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

Kindly help me how to resolve this...

BITBUCKET_SOURCE_BRANCH has wrong value for repo:push events

  • Plugin Version: 1.6.2
  • Jenkins Version: 2.164.2
  • Jenkins Job Type: Freestyle job, and Pipeline
  • Triggered via: Bitbucket Cloud repo:push event to master

Expected Behavior

As per the docs, BITBUCKET_SOURCE_BRANCH is expected to have a branch name for both pull and push events.

Actual Behavior

for repo:push event this value appears to be the repository name

Steps to Reproduce

Provide an unambiguous set of steps to reproduce this bug

  1. setup a push webhook in BitBucket
  2. set up SCM in jenkins job for repo and branch '*/master'
  3. setup job build trigger for "Push" event, allowed branches: '*/master'
  4. merge code change to master and observe value of BITBUCKET_SOURCE_BRANCH

Context

it is useful for this environment variable to have a similar role for push and pull events to avoid special case code.

bitbucketRepositoryPushAction missing signature

Please make sure all the following boxes are checked before submitting your feature request - thank you!

  • You're not able to fix the problem yourself and send us a pull request instead of an issue.
  • There is no existing issue regarding the same topic
  • Plugin Version: 2.2.0
  • Jenkins Version: 2.190.2
  • Jenkins Job Type: Freestyle
  • Triggered via: Bitbucket Cloud

Expected Behavior

Job DSL parsed successfully.

Actual Behavior

Job DSL parsing complains that

No signature of method: javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.bitbucketRepositoryPushAction() is applicable for argument types: (java.lang.Boolean, java.lang.String)

Possible Solution

Downgrading to 2.0.0 resolves the issue.

Steps to Reproduce

Job DSL configuration

triggers {
    bitbucketRepositoryPushAction(false, 'staging')
}

Context

Using the Job DSL plugin to manage the Jenkins job configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.