I've setup Bitbucket webhook to triger Jenkins job by using bitbucket-push-and-pull-request plugin and work as I need.
I had to rename the repository in BitBucket settings, then change the url in the jenkins job and run the build manualy in order to check the new settings.
Webhook stop working and does not trigger the jenkins job anymore.
I've try to create new webhook in bitbucket and new jenkins job but still don't work.
If I rename the repo to the old name webhook work again.
Any idea how to solve this issue? (We're using Bitbucket server)
Related
The main idea was to try to trigger the build with a Webhook and add a ssh merge comand to the pipeline, but until now the webhook comunication doesn't seem to work well. Has anybody better ideas?
We have all our repositories in Bitbucket and I'm trying to set up a continuous intergration services to Azure DevOps that would build the project after each push.
We have created a dedicated user account for Bitbucket repositories that has real-only access to all repositories.
However, creating a CI webhook trigger from Bitbucket to Azure Devops requires admin access to repositories. We do not want to give that level of access to CI user account.
I could add the webhook to Bitbucket repository manually, but I'm missing the URL to which the webhook should post the trigger.
The url is something like https://dev.azure.com/myorganization/_apis/public/hooks/externalEvents?publisherId ...
I think it's called deployment trigger url but I cannot find it anywhere. Does the new Azure DevOps support manually adding webhooks or do we have to do it manually somehow?
I'm in the same boat with you all. I don't want to give my CI account "Admin" rights to ANY repo.
My workaround so far has been to give the CI account temporary access in order to create the webhook when the pipeline is first saved, then downgrade it after the webhook has been created, knowing that any changes will require another temporary permission elevation.
FWIW, the webhook URL that is used is this:
https://[REDACTED].visualstudio.com/_apis/public/hooks/externalEvents?publisherId=bitbucket&channelId=[REDACTED]&api-version=5.1-preview
As you can see, we are kind of in an understandable Catch-22 here, because we could conceivably create the pipeline and get that channelId to use to manually create the webhook in Bitbucket, but can't even SAVE a pipeline without repo Admin rights, so we can't get the channelId.
I wish there was a way to disable the webhook creation so we could manually create it on the Bitbucket side.
I know that this has been a long time since it was asked, but recently I was faced with the exact same issue and I thought I should add this here for anyone struggling to find out where these URLs are coming from.
I was seeing in Bitbucket two webhooks in the format https://dev.azure.com/[myorganization]/_apis/public/hooks/externalEvents?publisherId=... and I was trying to figure out how these were created in the first place.
As it turns out, when you create a new Bitbucket Pipeline in Azure and you select a repository for this pipeline, Azure automatically creates these webhooks for us in Bitbucket! In other words, it doesn't seem to be a way to deduce these URLs from anywhere, but rather they are created by Azure upon creation of the Pipeline, as well as they are deleted by Azure once you delete the Pipeline from Azure!.
I am developing a project in laravel 5.4. I have repository on Bitbucket. Now I want to setup Bitbucket Pipelines so I can test when anybody commit. I think I need a suitable Docker Image for laravel, I tried some images but they generate errors. Also I want to setup SSH key agent so Whenever I commit in production branch it deploys on server.
I searched a lot on internet to do these things but I could not find anything, If you share any detailed tutorial or something like this it will be helpful.
Thanks in advance.
I have been trying to trigger a build on TC on PR but the refs I have access to TC doesnt include refs/pull or refs/pull-request. Is this a Bitbucket cloud thing? Given that being the case how do I trigger build specifically on pull request?
There is a Bitbucket PR plugin for TeamCity: https://github.com/ArcBees/teamcity-plugins/wiki/Configuring-Bitbucket-Pull-Requests-Plugin
Bitbucket doesn't seem to offer access to pull requests the same way github does, but the plugin does the trick for us.
I need to configure CI pipeline in my TFS with source repo in GitLab, I have updated the Trigger section as below and checked in the code, but the build was not triggered, is there any configuration required in the GitLab repo? Please advice hot to achieve this.
I would troubleshoot your problem by checking the following in this order:
when triggering the build manually, does the source code downloading from the GitLab repository successfully work?
if yes, then:
did you created and pushed the develop branch on the repository?
You need to publish your locally created 'develop' branch on the remote repository, e.g. >git push -u origin develop
if no, then there are issues on the "Services" entry you created on TFS for accessing your GitLab repository:
check whether you are using HTTPS in the URL;
to enable HTTPS access to your repository, remember to set a password on your GitLab account, then use that password along with your username (email address) on the "Services" endpoint set up on TFS;
p.s. also, check which 'Connection' is selected in the Repository section of your build definition: it should be the one pointing to your GitLab repo :-)
I have changed the Poling interval to 180 seconds and it worked.