Git Product home page Git Product logo

Comments (34)

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024 1

@OOYUKIOO thank you :)

For the Mercurial pull request support, we will work on it for the next release, together with the pull request support for git + bitbucket server.

I'm going to close this mercurial related issue, @AndresPineros and @love-git, if you have still some issues, please open a new one, thanks.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

I am fighting through the same issue. I have jenkins in a docker container in kubernetes on my windows machine. All of that seems to be working. I can push the port to ngrok. I setup the webhook in bitbucket and get the exact Post /bitbucket-hook/ 200 OK message. I have also found how to turn on the logging in jenkins to see if jenkins has done anything with that webhook post.

Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
Received commit hook notification : {"pullrequest": {"rendered": {"description": {"raw": "* .....

There is a lot of info in that webhook post....edited this to remove that. If this webhook information is helpful to understanding this issue, I can get test information reproduced.

Jun 14, 2019 2:37:58 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key payload from bitbucket
Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering remote [https://bitbucket.org/r1rcm/global-consent-registry-service]
Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering candidate job gcr-test-pipeline
Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering to poke gcr-test-pipeline
Jun 14, 2019 2:37:58 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
Jun 14, 2019 2:37:58 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

It seems the BitBucketPPRHookReceiver sees the post.
BitBucketPPRJobProbe considers the remote.
BitBucketPPRJobProbe considers poking the correct pipeline, the "gcr-test-pipeline"
BitBucketPPRHookReceiver sends a response....

and nothing happens.

Think its time to dust off the java skills and start looking into the code some.

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

Hi @love-git,
you are not using mercurial, isn't it?

Generally speaking, Mercurial was supported by the plugin that we forked, but since then we didn't work to guarantee its full support. We are actually not sure if we are going to remove it from the plugin in one of the next release...
The question is that we don't really know how many people are using it together with our plugin, so we also don't know how much time we should invest in developing it in this direction.

Now, the question is: has this issue to do with Mercurial or with something else?
If you are not using Mercurial, please open another issue providing more info about the configuration and the logs (after deleting possible sensitive data).
If you are using Mercurial post these info in this issue, trying to to follow the template provided through Github for the issues in general.

Thank you
Christian

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

@OOYUKIOO

can you provide the logs? Maybe, your issue has something to do with the fact, that we are not actively supporting Mercurial.

Thanks
Christian

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

BitBucketPPRJobProbe class
triggerScm method
Logs "Considering to poke {0}" message

After the log event this chunk of code is trying to set the isRemoteSet flag.

bitbucketTrigger
    .ifPresent(trigger -> item.ifPresent(i -> i.getSCMs().stream().forEach(scmTrigger -> {
      boolean isRemoteSet = false;
      for (URIish remote : remotes) {
        if (match(scmTrigger, remote)) {
          isRemoteSet = true;
          break;
        }
      }

match method
return matchGitScm(scm, url);

matchGitScm method

private boolean matchGitScm(SCM scm, URIish remote) {
for (RemoteConfig remoteConfig : ((GitSCM) scm).getRepositories()) {
for (URIish urIish : remoteConfig.getURIs()) {
LOGGER.log(Level.INFO, "Trying to match {0} ",
urIish.toString() + "<-->" + remote.toString());
LOGGER.info("Machted scm");

I do not see the Logs "Trying to match {0}" or "Matched scm". It seems the getRepositories or getURIs methods are not returning anything so it does not enter the inner loop.

the build is a Pipeline, I am trying to have a Jenkinsfile in git to drive the build. my Jenkinsfile is minimal, just trying to log it is doing stuff atm. Not sure I need things setup in the Jenkinsfile for the triggers to work.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

I am using git, it is in bitbucket.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

Here is the last bit of the logs, from the webhook to not firing a build.

Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver
Received commit hook notification : {"pullrequest": {"rendered": {"description": {"raw": "* fixed the reference version issues that produced some warnings. renamed the folder a project was in to keep things consistent.\r\n* removed an unused project folder. renamed another project folder to match the name of the project. fixed the references.\r\n* removed another unused project folder. renamed another project folder to match the project name.\r\n* removed another unused project folder.\r\n* removed some xml comments giving warnings.\r\n* upgrade to netcoreapp2.2. upgraded all nuget packages to latest versions.\r\n* all warnings are fixed. all tests are passing. all packages are updated.\r\n* getting the api up in a linux docker container.\r\n* adjusting swagger stuff to get it working in iis, docker, and with release mode.\r\n* added a version to the csproj file.\r\n* added a jenkinsfile.\r\n* moved jenkinsfile to the root of the solution folder.\r\n* playing around with jenkinsfile.\r\n* more changes to jenkinsfile.\r\n* trying scripted syntax.\r\n* still trying to get jenkinsfile to work.\r\n* added new jenkinsfile to solution and added another test stage.\r\n* testing more stuff.\r\n* whitespace change\r\n* passing jenkinsfile.", "markup": "markdown", "html": "

    \n
  • fixed the reference version issues that produced some warnings. renamed the folder a project was in to keep things consistent.
  • \n
  • removed an unused project folder. renamed another project folder to match the name of the project. fixed the references.
  • \n
  • removed another unused project folder. renamed another project folder to match the project name.
  • \n
  • removed another unused project folder.
  • \n
  • removed some xml comments giving warnings.
  • \n
  • upgrade to netcoreapp2.2. upgraded all nuget packages to latest versions.
  • \n
  • all warnings are fixed. all tests are passing. all packages are updated.
  • \n
  • getting the api up in a linux docker container.
  • \n
  • adjusting swagger stuff to get it working in iis, docker, and with release mode.
  • \n
  • added a version to the csproj file.
  • \n
  • added a jenkinsfile.
  • \n
  • moved jenkinsfile to the root of the solution folder.
  • \n
  • playing around with jenkinsfile.
  • \n
  • more changes to jenkinsfile.
  • \n
  • trying scripted syntax.
  • \n
  • still trying to get jenkinsfile to work.
  • \n
  • added new jenkinsfile to solution and added another test stage.
  • \n
  • testing more stuff.
  • \n
  • whitespace change
  • \n
  • passing jenkinsfile.
  • \n
", "type": "rendered"}, "title": {"raw": "Reference changes 1", "markup": "markdown", "html": "

Reference changes 1

", "type": "rendered"}}, "type": "pullrequest", "description": "* fixed the reference version issues that produced some warnings. renamed the folder a project was in to keep things consistent.\r\n* removed an unused project folder. renamed another project folder to match the name of the project. fixed the references.\r\n* removed another unused project folder. renamed another project folder to match the project name.\r\n* removed another unused project folder.\r\n* removed some xml comments giving warnings.\r\n* upgrade to netcoreapp2.2. upgraded all nuget packages to latest versions.\r\n* all warnings are fixed. all tests are passing. all packages are updated.\r\n* getting the api up in a linux docker container.\r\n* adjusting swagger stuff to get it working in iis, docker, and with release mode.\r\n* added a version to the csproj file.\r\n* added a jenkinsfile.\r\n* moved jenkinsfile to the root of the solution folder.\r\n* playing around with jenkinsfile.\r\n* more changes to jenkinsfile.\r\n* trying scripted syntax.\r\n* still trying to get jenkinsfile to work.\r\n* added new jenkinsfile to solution and added another test stage.\r\n* testing more stuff.\r\n* whitespace change\r\n* passing jenkinsfile.", "links": {"decline": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/decline"}, "commits": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/commits"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8"}, "comments": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/comments"}, "merge": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/merge"}, "html": {"href": "https://bitbucket.org/r1rcm/global-consent-registry-service/pull-requests/8"}, "activity": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/activity"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/diff"}, "approve": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/approve"}, "statuses": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/pullrequests/8/statuses"}}, "title": "Reference changes 1", "close_source_branch": false, "reviewers": [], "id": 8, "destination": {"commit": {"hash": "2cfa36c1b4ff", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/commit/2cfa36c1b4ff"}, "html": {"href": "https://bitbucket.org/r1rcm/global-consent-registry-service/commits/2cfa36c1b4ff"}}}, "repository": {"links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service"}, "html": {"href": "https://bitbucket.org/r1rcm/global-consent-registry-service"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B69fd5449-45d6-40aa-9e4d-d8f239986442%7D?ts=c_sharp"}}, "type": "repository", "name": "global-consent-registry-service", "full_name": "r1rcm/global-consent-registry-service", "uuid": "{69fd5449-45d6-40aa-9e4d-d8f239986442}"}, "branch": {"name": "develop"}}, "created_on": "2019-06-13T22:23:10.579774+00:00", "summary": {"raw": "* fixed the reference version issues that produced some warnings. renamed the folder a project was in to keep things consistent.\r\n* removed an unused project folder. renamed another project folder to match the name of the project. fixed the references.\r\n* removed another unused project folder. renamed another project folder to match the project name.\r\n* removed another unused project folder.\r\n* removed some xml comments giving warnings.\r\n* upgrade to netcoreapp2.2. upgraded all nuget packages to latest versions.\r\n* all warnings are fixed. all tests are passing. all packages are updated.\r\n* getting the api up in a linux docker container.\r\n* adjusting swagger stuff to get it working in iis, docker, and with release mode.\r\n* added a version to the csproj file.\r\n* added a jenkinsfile.\r\n* moved jenkinsfile to the root of the solution folder.\r\n* playing around with jenkinsfile.\r\n* more changes to jenkinsfile.\r\n* trying scripted syntax.\r\n* still trying to get jenkinsfile to work.\r\n* added new jenkinsfile to solution and added another test stage.\r\n* testing more stuff.\r\n* whitespace change\r\n* passing jenkinsfile.", "markup": "markdown", "html": "
    \n
  • fixed the reference version issues that produced some warnings. renamed the folder a project was in to keep things consistent.
  • \n
  • removed an unused project folder. renamed another project folder to match the name of the project. fixed the references.
  • \n
  • removed another unused project folder. renamed another project folder to match the project name.
  • \n
  • removed another unused project folder.
  • \n
  • removed some xml comments giving warnings.
  • \n
  • upgrade to netcoreapp2.2. upgraded all nuget packages to latest versions.
  • \n
  • all warnings are fixed. all tests are passing. all packages are updated.
  • \n
  • getting the api up in a linux docker container.
  • \n
  • adjusting swagger stuff to get it working in iis, docker, and with release mode.
  • \n
  • added a version to the csproj file.
  • \n
  • added a jenkinsfile.
  • \n
  • moved jenkinsfile to the root of the solution folder.
  • \n
  • playing around with jenkinsfile.
  • \n
  • more changes to jenkinsfile.
  • \n
  • trying scripted syntax.
  • \n
  • still trying to get jenkinsfile to work.
  • \n
  • added new jenkinsfile to solution and added another test stage.
  • \n
  • testing more stuff.
  • \n
  • whitespace change
  • \n
  • passing jenkinsfile.
  • \n
", "type": "rendered"}, "source": {"commit": {"hash": "aefb2cc712fb", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service/commit/aefb2cc712fb"}, "html": {"href": "https://bitbucket.org/r1rcm/global-consent-registry-service/commits/aefb2cc712fb"}}}, "repository": {"links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service"}, "html": {"href": "https://bitbucket.org/r1rcm/global-consent-registry-service"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B69fd5449-45d6-40aa-9e4d-d8f239986442%7D?ts=c_sharp"}}, "type": "repository", "name": "global-consent-registry-service", "full_name": "r1rcm/global-consent-registry-service", "uuid": "{69fd5449-45d6-40aa-9e4d-d8f239986442}"}, "branch": {"name": "reference-changes"}}, "comment_count": 0, "state": "OPEN", "task_count": 0, "participants": [], "reason": "", "updated_on": "2019-06-14T14:37:57.497245+00:00", "author": {"display_name": "Michael Love", "uuid": "{5c14738f-a72b-4906-a768-33097bc27037}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/%7B5c14738f-a72b-4906-a768-33097bc27037%7D"}, "html": {"href": "https://bitbucket.org/%7B5c14738f-a72b-4906-a768-33097bc27037%7D/"}, "avatar": {"href": "https://avatar-cdn.atlassian.com/5ced7327e389ff0d9643cdde?by=id&sg=VjUbprkKMoUy8%2FH49tgCPVxiVX0%3D&d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FML-1.png"}}, "nickname": "Michael Love", "type": "user", "account_id": "5ced7327e389ff0d9643cdde"}, "merge_commit": null, "closed_by": null}, "repository": {"scm": "git", "website": "", "name": "global-consent-registry-service", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/r1rcm/global-consent-registry-service"}, "html": {"href": "https://bitbucket.org/r1rcm/global-consent-registry-service"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B69fd5449-45d6-40aa-9e4d-d8f239986442%7D?ts=c_sharp"}}, "project": {"key": "GCR", "type": "project", "uuid": "{f32b3257-bccb-4a46-b672-db6e7ad600c4}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/teams/r1rcm/projects/GCR"}, "html": {"href": "https://bitbucket.org/account/user/r1rcm/projects/GCR"}, "avatar": {"href": "https://bitbucket.org/account/user/r1rcm/projects/GCR/avatar/32"}}, "name": "GCR"}, "full_name": "r1rcm/global-consent-registry-service", "owner": {"username": "r1rcm", "display_name": "R1 RCM", "type": "team", "uuid": "{047536f6-6dc8-4051-b0b1-91c867e48e1f}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/teams/%7B047536f6-6dc8-4051-b0b1-91c867e48e1f%7D"}, "html": {"href": "https://bitbucket.org/%7B047536f6-6dc8-4051-b0b1-91c867e48e1f%7D/"}, "avatar": {"href": "https://bitbucket.org/account/r1rcm/avatar/"}}}, "type": "repository", "is_private": true, "uuid": "{69fd5449-45d6-40aa-9e4d-d8f239986442}"}, "actor": {"display_name": "Michael Love", "uuid": "{5c14738f-a72b-4906-a768-33097bc27037}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/%7B5c14738f-a72b-4906-a768-33097bc27037%7D"}, "html": {"href": "https://bitbucket.org/%7B5c14738f-a72b-4906-a768-33097bc27037%7D/"}, "avatar": {"href": "https://avatar-cdn.atlassian.com/5ced7327e389ff0d9643cdde?by=id&sg=VjUbprkKMoUy8%2FH49tgCPVxiVX0%3D&d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FML-1.png"}}, "nickname": "Michael Love", "type": "user", "account_id": "5ced7327e389ff0d9643cdde"}}
Jun 14, 2019 2:37:58 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Received x-event-key payload from bitbucket
Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering remote [https://bitbucket.org/r1rcm/global-consent-registry-service]
Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering candidate job gcr-test-pipeline
Jun 14, 2019 2:37:58 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Considering to poke gcr-test-pipeline
Jun 14, 2019 2:37:58 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
Jun 14, 2019 2:37:58 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

config2
config1

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

config3

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

@love-git have you triggered it once manually?

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

There is a part of the logs that is interesting. When I do a push to the branch, goes through the same considering remote, considering candidate, considering to poke, sending response, response sent....then i get Injecting env vars because of server push cause.....i have issues with the env vars as well it seems.

As far as building by hand once, yeah, ive done that a few times actually.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

I am happy to try anything, everything again. I will go build by hand again and then update the pull request again, see if anything changes.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

I stripped down the jenkinsfile to just echo some stuff. I can start the build by hand and have it run successfully. I then go update the pull request and watch the webhook fire off and jenkins process it, without triggering the pipeline build.

from bitbucket-push-and-pull-request-plugin.

love-git avatar love-git commented on June 17, 2024

looking into this last event, it did make some progress. I adjusted the scm url to not have my name in it. This time i see the "Trying to match" log as well as the "Machted scm" log. Then it says...

Jun 14, 2019 5:24:54 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe
Triggering trigger io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger for job gcr-test-pipeline
Jun 14, 2019 5:24:54 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
No matching filters
Jun 14, 2019 5:24:54 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Sending response.
Jun 14, 2019 5:24:54 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

@love-git, If you leave the allowed repositories branches empty, what happens?

from bitbucket-push-and-pull-request-plugin.

AndresPineros avatar AndresPineros commented on June 17, 2024

Same issue here. Nothing happens.

from bitbucket-push-and-pull-request-plugin.

AndresPineros avatar AndresPineros commented on June 17, 2024

As a temporary solution, until I figure what's up with the plugin, I did a pipeline that handles pushes and redirects the request to the respective build pipeline:

node {
    def branchPatterns = /master|develop|intergration|release\/.*|hotfix\/.*/
    def semverPatternOriginal = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/
    //This is an altered version of semver that also accepts 4 field versions. Example: 2.1.2.5-rc. Some of our apps are versioned this way.
    def semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(\.(0|[1-9]\d*))?(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/

    //Execution
    stage("Build Project") {
        if ("$branchName" == "null") {
            currentBuild.description = "No branch name in event"
            return
        }
        if("$branchName" ==~ branchPatterns || "$branchName" ==~ semverPattern) {
            def parsedRepository = "$repository".replaceAll('\\.', '-').toLowerCase()
            currentBuild.description = "${parsedRepository} $branchName"
            build job: "${parsedRepository}-build", parameters: [gitParameter(name: 'branchOrTag', value: "$branchName")], wait: false
        } else {
            currentBuild.description = "Non matched branch"
        }
    } 
}

It uses the Generic Webhook Plugin to send the events from Bitbucket to Jenkins.

The variable "repository" has the jsonPath "$.repository.name"
The variable "branchName" has the jsonPath "$.push.changes[0].new.name"

If anyone is interested I can give more details. It should also work for PRs if you're willing to add the code, which is fairly simple.

from bitbucket-push-and-pull-request-plugin.

OOYUKIOO avatar OOYUKIOO commented on June 17, 2024

@cdelmonte-zg
Sorry for the late reply, below is the Jenkins log after I submit a pull request on Bitbucket:

Jun 17, 2019 10:46:58 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Received x-event-key payload from bitbucket
Jun 17, 2019 10:46:58 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Received x-event-key payload from bitbucket
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
INFO: Received commit hook notification for branch: ***/readmemd-edited-online-with-bitbucket-1560782815132
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
INFO: Received commit hook type: named_branch
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/***/git-webhook/src/master/<-->https://bitbucket.org/***/testrepo
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/***/git-webhook/src/master/<-->https://bitbucket.org/***/testrepo
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/***/testrepo/src/default/<-->https://bitbucket.org/***/testrepo
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/***/testrepo/src/default/<-->https://bitbucket.org/***/testrepo
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Sending response.
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Sending response.
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.
Jun 17, 2019 10:46:59 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

Hello @OOYUKIOO and @love-git

if you install the new release of the plugin 1.6.4 are the issues solved?
About Mercurial, I uploaded in the documentation a screenshot, that shows a working configuration.

from bitbucket-push-and-pull-request-plugin.

OOYUKIOO avatar OOYUKIOO commented on June 17, 2024

@cdelmonte-zg I just checked the plugin page on Jenkins and the the only update for this plugin is 1.6.3. I tried pull request as well as direct push, but Jenkins still doesn't build the project.

Here is the log:
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Received x-event-key payload from bitbucket
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
INFO: Received commit hook notification for branch: ****/readmemd-edited-online-with-bitbucket-1561035797654
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
INFO: Received commit hook type: named_branch
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/****/testrepo/src/default/<-->https://bitbucket.org/****/testrepo
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Sending response.
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Received x-event-key payload from bitbucket
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/****/testrepo/src/default/<-->https://bitbucket.org/****/testrepo
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Sending response.
Jun 20, 2019 9:03:24 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

@OOYUKIOO did you refresh the list of the available updates clicking the "check now" button on the bottom right corner of the page of the updates in the plugin manager?

N.B. with mercurial the plugin will work only for pushs and not for pull requests: documentation

Just another question:
Is the string "INFO: Trying to match https://bitbucket.org/****/testrepo/src/default/" the one you wrote in the repository URL?

Thank you

from bitbucket-push-and-pull-request-plugin.

OOYUKIOO avatar OOYUKIOO commented on June 17, 2024

@cdelmonte-zg Ah I see the updated release now, thank you.

Unfortunately Jenkins is still not building on just pushs. And yes, the URL in the INFO string is the URL in the configuration repository URL

config

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

ok @OOYUKIOO :)

what happens if you delete the substring "/src/default/" from the repository URL and after that you trigger a build manually clicking on "build now"?

from bitbucket-push-and-pull-request-plugin.

OOYUKIOO avatar OOYUKIOO commented on June 17, 2024

@cdelmonte-zg
Jenkins built the project after I deleted "/src/default/" from the URL, thank you!
Here is the log on Jenkins:

Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Received x-event-key payload from bitbucket
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
INFO: Received commit hook notification for branch: default
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.action.BitBucketPPRRepositoryAction
INFO: Received commit hook type: named_branch
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/****/testrepo/src/default/<-->https://bitbucket.org/****/testrepo
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe hgLooselyMatches
INFO: Mercurial loose match between https://bitbucket.org/****/testrepo/src/default/<- and ->https://bitbucket.org/****/testrepo
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Didn't match scm https://bitbucket.org/****/testrepo/src/default/
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Trying to match https://bitbucket.org/****/testrepo/<-->https://bitbucket.org/****/testrepo
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe hgLooselyMatches
INFO: Mercurial loose match between https://bitbucket.org/****/testrepo/<- and ->https://bitbucket.org/****/testrepo
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchMercurialScm
INFO: Matched scm
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
INFO: Called onPost
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryTriggerMatcher matchesAction
INFO: BitBucketPPREvent[event= repo, action = push]
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryTriggerMatcher matchesAction
INFO: 1. (Is the trigger filter instance of BitBucketPPRRepositoryPushActionFilter? <> AND does it equal BitBucketPPRConsts.REPOSITORY_PUSH push to bitbucketEvent.getAction() push? <>) OR 2. (Is the trigger filter instance of BitBucketPPRServerRepositoryPushActionFilter? <>AND does it equal BitBucketPPRConsts.REPOSITORY_SERVER_PUSH refs_changed to bitbucketEvent.getAction() push? <>
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
INFO: matchingFilters is not null AND matchingFilters is not empty [io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryTriggerFilter@4b4e0cc5]
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Sending response.
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
INFO: Response sent.
Jun 21, 2019 8:28:51 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRPollingRunnable run
INFO: Run method called.
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger$1 onPollSuccess
INFO: Called onPollSuccess with polling result { }.
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger$1 onPollSuccess
INFO: On Poll Success, get cause: BitBucketPPRTriggerCause[bitbucketAction = BitBucketPPRAction[payload ={ "push":{ "changes":[{"forced":false,"links":{"html":{"href":"https://bitbucket.org//testrepo/branches/compare/c2c4c183fb9e1ba78267d9f38f6ea6a18e3e8703..750e0b6a971d98410fa7e600d7c7683f9de7416e"}},"truncated":false,"created":false,"closed":false,"new":{"type":"named_branch","name":"default"}}]},"repository":{"scm":"hg","website":"","name":"TestRepo","links":{"html":{"href":"https://bitbucket.org//testrepo"},"self":{"href":"https://api.bitbucket.org/2.0/repositories//testrepo"}},"owner":{"type":"user","display_name":"","uuid":"{17a6ced3-e5ef-4fea-85f1-637e1c7875fc}","links":{"html":{"href":"https://bitbucket.org/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D/"},"self":{"href":"https://api.bitbucket.org/2.0/users/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D"}},"nickname":""},"type":"repository","is_private":true,"uuid":"{2f508680-f454-4b17-aa1d-bf1626383855}"},"actor":{"display_name":"","account_id":"5ac77ecba05a8d1c9884816d","type":"user","links":{"html":{"href":"https://bitbucket.org/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D/"},"self":{"href":"https://api.bitbucket.org/2.0/users/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D"}},"nickname":"","uuid":"{17a6ced3-e5ef-4fea-85f1-637e1c7875fc}"}}, scm=hg, user=, scmUrls=[https://bitbucket.org//testrepo], branchName=default, type=named_branch, repositoryName=TestRepo, pullRequestId=null, repositoryUuid={2f508680-f454-4b17-aa1d-bf1626383855}]]
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryPushActionFilter shouldTriggerBuild
INFO: Should trigger build for the bitbucket action: BitBucketPPRAction [payload={"push":{"changes":[{"forced":false,"links":{"html":{"href":"https://bitbucket.org/
/testrepo/branches/compare/c2c4c183fb9e1ba78267d9f38f6ea6a18e3e8703..750e0b6a971d98410fa7e600d7c7683f9de7416e"}},"truncated":false,"created":false,"closed":false,"new":{"type":"named_branch","name":"default"}}]},"repository":{"scm":"hg","website":"","name":"TestRepo","links":{"html":{"href":"https://bitbucket.org//testrepo"},"self":{"href":"https://api.bitbucket.org/2.0/repositories//testrepo"}},"owner":{"type":"user","display_name":"","uuid":"{17a6ced3-e5ef-4fea-85f1-637e1c7875fc}","links":{"html":{"href":"https://bitbucket.org/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D/"},"self":{"href":"https://api.bitbucket.org/2.0/users/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D"}},"nickname":""},"type":"repository","is_private":true,"uuid":"{2f508680-f454-4b17-aa1d-bf1626383855}"},"actor":{"display_name":"","account_id":"5ac77ecba05a8d1c9884816d","type":"user","links":{"html":{"href":"https://bitbucket.org/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D/"},"self":{"href":"https://api.bitbucket.org/2.0/users/%7B17a6ced3-e5ef-4fea-85f1-637e1c7875fc%7D"}},"nickname":"","uuid":"{17a6ced3-e5ef-4fea-85f1-637e1c7875fc}"}}, scm=hg, user=, scmUrls=[https://bitbucket.org//testrepo], branchName=default, type=named_branch, repositoryName=TestRepo, pullRequestId=null, repositoryUuid={2f508680-f454-4b17-aa1d-bf1626383855}]?
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryPushActionFilter matches
INFO: Following allowed branches patterns are set:
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryPushActionFilter matches
INFO: The branchName in action is: default
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryPushActionFilter matches
INFO: Matching branch: default with branchSpec pattern: **
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger shouldScheduleJob
INFO: Should schedule job : true and(polling result has changes true or is pull request false)
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger scheduleJob
INFO: Check if job should be triggered due to changes in SCM
Jun 21, 2019 8:28:53 AM io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger scheduleJob
INFO: SCM changes detected in TestWebhook.Triggering #19
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:02 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:04 AM io.jenkins.plugins.bitbucketpushandpullrequest.environment.BitBucketPPREnvironmentContributor buildEnvironmentFor
INFO: Injecting env vars because of pull request cause.
Jun 21, 2019 8:29:07 AM hudson.model.Run execute
INFO: TestWebhook #19 main build action completed: SUCCESS

from bitbucket-push-and-pull-request-plugin.

OOYUKIOO avatar OOYUKIOO commented on June 17, 2024

@cdelmonte-zg
Thank you again for your help!
According to the documentation only push can trigger build on Jenkins, but when I tried pull request, just for the sake of it, Jenkins also successfully built the project, but the changes made in the pull request isn't registered. The log shows that there is no changes found in the repository. Then on accepting the pull request, the changes were detected. Is this the expected behavior (aka pull request won't trigger)? Is there any future plan to make the pull request trigger build?

from bitbucket-push-and-pull-request-plugin.

astuppad avatar astuppad commented on June 17, 2024

Hi am facing similar issue on integration with with bitbucket
not able to trigger the builds on Pull requests

Below are my logs
Event BitBucketPPREvent [event=pr, action=opened] doesnt match trigger filter io.jenkins.plugins.bitbucketpushandpullrequest.filter.repository.BitBucketPPRRepositoryTriggerFilter@7d37fd20
Jul 22, 2020 3:24:58 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
No matching filters
Jul 22, 2020 3:24:58 AM INFO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver doIndex
Response sent.

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

Hi @niketjsh , are you using mercurial?

from bitbucket-push-and-pull-request-plugin.

astuppad avatar astuppad commented on June 17, 2024

from bitbucket-push-and-pull-request-plugin.

astuppad avatar astuppad commented on June 17, 2024

Hi @niketjsh , are you using mercurial?

Hi @cdelmonte-zg ,
Is it not supported with bitbucket server integration plugin?

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

Hi @niketjsh

just a question, first: are you using our plugin ( Bitbucket Push and Pull Request Plugin ) or another one?

from bitbucket-push-and-pull-request-plugin.

astuppad avatar astuppad commented on June 17, 2024

Hi @niketjsh

just a question, first: are you using our plugin ( Bitbucket Push and Pull Request Plugin ) or another one?

Yes, using the Bitbucket Push and Pull Request Plugin

from bitbucket-push-and-pull-request-plugin.

astuppad avatar astuppad commented on June 17, 2024

Screenshot 2020-07-28 at 8 16 55 PM
Screenshot 2020-07-28 at 8 20 59 PM

from bitbucket-push-and-pull-request-plugin.

cdelmonte-zg avatar cdelmonte-zg commented on June 17, 2024

Hi @niketjsh,

now I understand better, thank you.

I think, the problem is that this plugin works properly only if combined with the git plugin. The integration with the Bitbucket Server Plugin is not supported.

from bitbucket-push-and-pull-request-plugin.

astuppad avatar astuppad commented on June 17, 2024

Hi @niketjsh,

now I understand better, thank you.

I think, the problem is that this plugin works properly only if combined with the git plugin. The integration with the Bitbucket Server Plugin is not supported.

Ok if i use git plugin to trigger the build then build status notification to bitbucket server doesnt work.
Do you have any suggestion which plugin i need to use for build status notification for bitbucket in this case

from bitbucket-push-and-pull-request-plugin.

Related Issues (20)

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.