-
Bug
-
Resolution: Won't Fix
-
Major
-
Jenkins 2.249.1
Bitbucket plugin Version: 1.1.25
-
Powered by SuggestiMate
After Installing Bitbucket plugin and setting the Web Hook in Bitbucket Cloud, push to repo sends a trigger to Jenkins server.
Jenkins receives the trigger and the json payload and it starts to go over the jobs and tries to match the trigger to the correct job.
After going over all of the jobs, it stops with the following error:
test_job_Pipeline SCM doesnt match remote repo {1}.
There are two issue here:
1. Why is there a mismatch?
2. There is no info of what is mismatched.
Here's the full log:
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe Considering candidate job test_job
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe test_job hasnt BitBucketTrigger set
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe Considering candidate job master
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe master hasnt BitBucketTrigger set
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe Now checking SCMSourceOwners/multiBranchProjects
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe Considering candidate scmSourceOwner org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@742701[test_job_Pipeline]
Oct 04, 2020 1:33:25 PM FINER com.cloudbees.jenkins.plugins.BitbucketJobProbe Considering candidate scmSource com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource{id='9b5f736a-f4a0-432f-9eed-ed2ce4bbaa82'}
Oct 04, 2020 1:33:25 PM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe test_job_Pipeline SCM doesnt match remote repo {1}
[JENKINS-63848] Error SCM doesnt match remote repo {1} lacks relevant info
borist i've released 1.1.26 with more logging information. Please re-run and and add the logs here, thanks
Hi Tzach,
I've installed version 1.1.26. Still not working, btw.
I've attached a screenshot (BitBucket Plugin Logger.png) of the Jenkins logger setup. Please let me know if you want me to change the logger setup.
Here is the logger after installing version 1.1.26:
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketHookReceiver
Received commit hook notification : {"push": {"changes": [{"forced": false, "old": {"name": "test-branch", "links": {"commits":
, "self": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/refs/branches/test-branch"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/branch/test-branch"}}, "default_merge_strategy": "merge_commit", "merge_strategies": ["merge_commit", "squash", "fast_forward"], "type": "branch", "target": {"rendered": {}, "hash": "39cfe3a71c8dc23020838c22c3ff433c137c40c4", "links": {"self":
{"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/39cfe3a71c8dc23020838c22c3ff433c137c40c4"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/commits/39cfe3a71c8dc23020838c22c3ff433c137c40c4"}}, "author": {"raw": "Boris Ts. <boris.t@acme.com>", "type": "author", "user": {"display_name": "Boris Ts.", "uuid": "
{71ca8c42-124a-49ea-b3fe-3d169c93a312}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D"}, "html": {"href": "https://bitbucket.org/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D/"}, "avatar": {"href": "https://secure.gravatar.com/avatar/a31f5cdcae36b3439834871af3e68ed8?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBT-3.png"}}, "nickname": "Boris Ts.", "type": "user", "account_id": "3efe647b767b660b7a729ce7"}}, "summary": {"raw": "test.txt edited online with Bitbucket", "markup": "markdown", "html": "<p>test.txt edited online with Bitbucket</p>", "type": "rendered"}, "parents": [\{"hash": "34a6fa7f221e241e8c66b77dba0b1df252fc253f", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/34a6fa7f221e241e8c66b77dba0b1df252fc253f"}, "html": \{"href": "https://bitbucket.org/acme/devops_test_repo/commits/34a6fa7f221e241e8c66b77dba0b1df252fc253f"}}}], "date": "2020-10-11T07:18:50+00:00", "message": "test.txt edited online with Bitbucket", "type": "commit", "properties": {}}}, "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commits?include=1d725b5d5c3bed8d900823dc384872dd1f0decef&exclude=39cfe3a71c8dc23020838c22c3ff433c137c40c4"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/branches/compare/1d725b5d5c3bed8d900823dc384872dd1f0decef..39cfe3a71c8dc23020838c22c3ff433c137c40c4"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/diff/1d725b5d5c3bed8d900823dc384872dd1f0decef..39cfe3a71c8dc23020838c22c3ff433c137c40c4"}}, "created": false, "commits": [{"rendered": {}, "hash": "1d725b5d5c3bed8d900823dc384872dd1f0decef", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/1d725b5d5c3bed8d900823dc384872dd1f0decef"}, "comments": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/1d725b5d5c3bed8d900823dc384872dd1f0decef/comments"}, "patch": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/patch/1d725b5d5c3bed8d900823dc384872dd1f0decef"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/commits/1d725b5d5c3bed8d900823dc384872dd1f0decef"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/diff/1d725b5d5c3bed8d900823dc384872dd1f0decef"}, "approve": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/1d725b5d5c3bed8d900823dc384872dd1f0decef/approve"}, "statuses": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/1d725b5d5c3bed8d900823dc384872dd1f0decef/statuses"}}, "author": {"raw": "Boris Ts. <boris.t@acme.com>", "type": "author", "user": {"display_name": "Boris Ts.", "uuid": "{71ca8c42-124a-49ea-b3fe-3d169c93a312}", "links": {"self":
{"href": "https://api.bitbucket.org/2.0/users/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D"}, "html": {"href": "https://bitbucket.org/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D/"}, "avatar": {"href": "https://secure.gravatar.com/avatar/a31f5cdcae36b3439834871af3e68ed8?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBT-3.png"}}, "nickname": "Boris Ts.", "type": "user", "account_id": "3efe647b767b660b7a729ce7"}}, "summary": {"raw": "test.txt edited online with Bitbucket", "markup": "markdown", "html": "<p>test.txt edited online with Bitbucket</p>", "type": "rendered"}, "parents": [{"hash": "39cfe3a71c8dc23020838c22c3ff433c137c40c4", "type": "commit", "links": {"self":
{"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/39cfe3a71c8dc23020838c22c3ff433c137c40c4"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/commits/39cfe3a71c8dc23020838c22c3ff433c137c40c4"}}}], "date": "2020-10-11T07:21:53+00:00", "message": "test.txt edited online with Bitbucket", "type": "commit", "properties": {}}], "truncated": false, "closed": false, "new": {"name": "test-branch", "links": {"commits":
{"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commits/test-branch"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/refs/branches/test-branch"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/branch/test-branch"}}, "default_merge_strategy": "merge_commit", "merge_strategies": ["merge_commit", "squash", "fast_forward"], "type": "branch", "target": {"rendered": {}, "hash": "1d725b5d5c3bed8d900823dc384872dd1f0decef", "links": {"self":
{"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/1d725b5d5c3bed8d900823dc384872dd1f0decef"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo/commits/1d725b5d5c3bed8d900823dc384872dd1f0decef"}}, "author": {"raw": "Boris Ts. <boris.t@acme.com>", "type": "author", "user": {"display_name": "Boris Ts.", "uuid": "
{71ca8c42-124a-49ea-b3fe-3d169c93a312}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D"}, "html": {"href": "https://bitbucket.org/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D/"}, "avatar": {"href": "https://secure.gravatar.com/avatar/a31f5cdcae36b3439834871af3e68ed8?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBT-3.png"}}, "nickname": "Boris Ts.", "type": "user", "account_id": "3efe647b767b660b7a729ce7"}}, "summary": {"raw": "test.txt edited online with Bitbucket", "markup": "markdown", "html": "<p>test.txt edited online with Bitbucket</p>", "type": "rendered"}, "parents": [\{"hash": "39cfe3a71c8dc23020838c22c3ff433c137c40c4", "type": "commit", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo/commit/39cfe3a71c8dc23020838c22c3ff433c137c40c4"}, "html": \{"href": "https://bitbucket.org/acme/devops_test_repo/commits/39cfe3a71c8dc23020838c22c3ff433c137c40c4"}}}], "date": "2020-10-11T07:21:53+00:00", "message": "test.txt edited online with Bitbucket", "type": "commit", "properties": {}}}}]}, "actor": {"display_name": "Boris Ts.", "uuid": "{71ca8c42-124a-49ea-b3fe-3d169c93a312}", "links": {"self":
{"href": "https://api.bitbucket.org/2.0/users/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D"}, "html": {"href": "https://bitbucket.org/%7B71ca8c42-124a-49ea-b3fe-3d169c93a312%7D/"}, "avatar": {"href": "https://secure.gravatar.com/avatar/a31f5cdcae36b3439834871af3e68ed8?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBT-3.png"}}, "nickname": "Boris Ts.", "type": "user", "account_id": "3efe647b767b660b7a729ce7"}, "repository": {"scm": "git", "website": null, "uuid": "
{15ac9a5e-7db8-4264-89ef-444c61016282}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo"}, "html": {"href": "https://bitbucket.org/acme/devops_test_repo"}, "avatar": {"href": "https://bytebucket.org/ravatar/%7B15ac9a5e-7db8-4264-89ef-444c61016282%7D?ts=default"}}, "project": {"links": {"self": {"href": "https://api.bitbucket.org/2.0/workspaces/acme/projects/ACV"}, "html": {"href": "https://bitbucket.org/acme/workspace/projects/ACV"}, "avatar": {"href": "https://bitbucket.org/account/user/acme/projects/ACV/avatar/32?ts=1599462181"}}, "type": "project", "name": "acme v2", "key": "ACV", "uuid": "{e7b21c25-f706-4113-8301-e14f6cadad0f}"}, "full_name": "acme/devops_test_repo", "owner": {"username": "acme", "display_name": "acme", "type": "team", "uuid": "{573cad2f-4784-4e58-8764-890e77e61ebc}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/teams/%7B573cad2f-4784-4e58-8764-890e77e61ebc%7D"}, "html": {"href": "https://bitbucket.org/%7B573cad2f-4784-4e58-8764-890e77e61ebc%7D/"}, "avatar": {"href": "https://bitbucket.org/account/acme/avatar/"}}}, "workspace": {"slug": "acme", "type": "workspace", "name": "acme", "links": {"self": {"href": "https://api.bitbucket.org/2.0/workspaces/acme"}, "html": {"href": "https://bitbucket.org/acme/"}, "avatar": {"href": "https://bitbucket.org/workspaces/acme/avatar/?ts=1543720940"}}, "uuid": "{573cad2f-4784-4e58-8764-890e77e61ebc}"}, "type": "repository", "is_private": true, "name": "devops_test_repo"}}Oct 11, 2020 10:21:53 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
Processing new Webhooks payload
Oct 11, 2020 10:21:53 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
Received commit hook notification for {"scm":"git","website":null,"uuid":"{15ac9a5e-7db8-4264-89ef-444c61016282}
","links":{"self":
{"href":"https://api.bitbucket.org/2.0/repositories/acme/devops_test_repo"},"html":{"href":"https://bitbucket.org/acme/devops_test_repo"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B15ac9a5e-7db8-4264-89ef-444c61016282%7D?ts=default"}},"project":{"links":{"self":
{"href":"https://api.bitbucket.org/2.0/workspaces/acme/projects/ACV"},"html":{"href":"https://bitbucket.org/acme/workspace/projects/ACV"},"avatar":{"href":"https://bitbucket.org/account/user/acme/projects/ACV/avatar/32?ts=1599462181"}},"type":"project","name":"acme v2","key":"ACV","uuid":"{e7b21c25-f706-4113-8301-e14f6cadad0f}"},"full_name":"acme/devops_test_repo","owner":{"username":"acme","display_name":"acme","type":"team","uuid":"
{573cad2f-4784-4e58-8764-890e77e61ebc}","links":{"self":
{"href":"https://api.bitbucket.org/2.0/teams/%7B573cad2f-4784-4e58-8764-890e77e61ebc%7D"},"html":{"href":"https://bitbucket.org/%7B573cad2f-4784-4e58-8764-890e77e61ebc%7D/"},"avatar":{"href":"https://bitbucket.org/account/acme/avatar/"}}},"workspace":{"slug":"acme","type":"workspace","name":"acme","links":{"self":
{"href":"https://api.bitbucket.org/2.0/workspaces/acme"},"html":{"href":"https://bitbucket.org/acme/"},"avatar":{"href":"https://bitbucket.org/workspaces/acme/avatar/?ts=1543720940"}},"uuid":"{573cad2f-4784-4e58-8764-890e77e61ebc}"},"type":"repository","is_private":true,"name":"devops_test_repo"}
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate job test_job
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
test_job hasnt BitBucketTrigger set
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate job master
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
master hasnt BitBucketTrigger set
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate job test-branch
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
test-branch hasnt BitBucketTrigger set
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate job master
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
master hasnt BitBucketTrigger set
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Now checking SCMSourceOwners/multiBranchProjects
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate scmSourceOwner devops_test_repo
Oct 11, 2020 10:21:53 AM FINER com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate scmSource com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource{id='9b5f736a-f4a0-432f-9eed-ed2ce4bbaa82'}
Oct 11, 2020 10:21:53 AM FINEST com.cloudbees.jenkins.plugins.BitbucketJobProbe
SCMSource is [BitbucketSCMSource] which is not supported
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
devops_test_repo SCM doesnt match remote repo {1}
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate scmSourceOwner wfs_backend_graphql
Oct 11, 2020 10:21:53 AM FINER com.cloudbees.jenkins.plugins.BitbucketJobProbe
Considering candidate scmSource com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource{id='64a9bb0e-d445-4577-ae41-3bcbfc9a45f2'}
Oct 11, 2020 10:21:53 AM FINEST com.cloudbees.jenkins.plugins.BitbucketJobProbe
SCMSource is [BitbucketSCMSource] which is not supported
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe
wfs_backend_graphql SCM doesnt match remote repo {1}
borist
Any chance you did not check the "Build when a change is pushed to Bitbucket"
See Scans Jenkins for all jobs with "Build when a change is pushed to Bitbucket" option enabled.
Oct 11, 2020 10:21:53 AM FINE com.cloudbees.jenkins.plugins.BitbucketJobProbe test_job hasnt BitBucketTrigger set
I'm using multibranch declarative pipelines.
'Build when a change is pushed to Bitbucket' is not an option, afaik.
Also, the Jenkins job's name is 'devops_test_repo'.
'test_job' is another job that is not relevant to the webhook trigger.
borist thanks for the correction.
The problem is this
Oct 11, 2020 10:21:53 AM FINEST com.cloudbees.jenkins.plugins.BitbucketJobProbe SCMSource is [BitbucketSCMSource] which is not supported
I'll see what I can do in order to support it but it will take me a while.
Can you please write how to reproduce this as I'm not not familiar with "multibranch declarative pipelines"
borist I think that https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/ will answer your needs
borist
please use https://support.cloudbees.com/hc/en-us/articles/115000051112-Bitbucket-Webhooks-Troubleshooting and open all the logs.
That should give you the understanding of why there is mismatch.
Also, you can use "Override Repository URL" feature in order to correct that mismatch
If you are still missing logs/can't understand what is going, LMK, i'll add more logging