Hi guys,I spent a couple of hours to figure out why I'm not able to trigger a webhook from bitbucket to bamboo, I found nothing yet Issue:I want to detect when a PR is merged or a branch is deleted which as I see I'm not able to track these need from bamboo, so I need to have a webhook in bitbucket and call a bamboo reset api base on this pagehttps://confluence.atlassian.com/bamboo/triggering-a-bamboo-build-from-bitbucket-cloud-using-webhooks-873949130.htmlBut this solution is now working because each time I got this error message
{"message":"Anonymous user can't access this resource. If it should be available, modify anonymous user permissions at Administration > Security settings","status-code":401}
The only access we have for Anonymous group is view which I see this is not enough to call this API from bitbuckethttps://confluence.atlassian.com/bamboo/bamboo-permissions-369296034.htmlSo I don't know what to do and how to track if a PR is merged or a branch is deleted.I would appreciate to tell me what the problem isFYI: bamboo and bitbucket version is the latest one
Hi @Hamed Beiranvand,
To allow an anonymous user to trigger change detection you need to enable the following security option:
Your instance should be able to get the branch deletion even if there is no webhook configured. Bamboo has a feature for that. The branch detection feature is enabled by default and has the check interval configured in:
Let me know if after configuring the security property you get it working.
@Daniel Santos Thank you for your reply. I really appreciate it.About anonymous user, I think it's not a good idea in security perspective because it will enable the public to trigger the plan.And about the branch deletion, I do not know the way to trigger a plan when a branch is deleted.let me tell you what I want to do, for each PR a new environment would be created which it's supposed to be deleted when the PR is merged or deleted.So I created a new plan for this case, but I need to trigger it when the PR is merged or deleted.
Hi @Hamed Beiranvand
I'm not sure if I really understood you from the beginning.
About anonymous user, I think it's not a good idea in security perspective because it will enable the public to trigger the plan.
It would not be free to everyone. Only the IPs configured in the repository trigger will be able to use the resource, but I understand your concern.
And about the branch deletion, I do not know the way to trigger a plan when a branch is deleted.
If I understand you correctly you are trying run a build to check the changes of a pull request, is that correct? I think I didn't get that from the first message.
Have you tried the Plan configuration >> Branches >> When pull request is created configuration?
let me tell you what I want to do, for each PR a new environment would be created which it's supposed to be deleted when the PR is merged or deleted. So I created a new plan for this case, but I need to trigger it when the PR is merged or deleted.
let me tell you what I want to do, for each PR a new environment would be created which it's supposed to be deleted when the PR is merged or deleted.
So I created a new plan for this case, but I need to trigger it when the PR is merged or deleted.
Please check that configuration. It should work for what you need.
I already know about this part
Plan configuration >> Branches >> When pull request
and about
It would not be free to everyone. Only the IPs configured in the repository trigger will be able to use the resource
we do not allow to this solution for security stuff but anyway I really appreciate for your time to spent to answer my question
It looks like you're new here. Sign in or register to get started.