From Bitbucket events

thatSuppose users want to trigger a pipeline or release on successful Pull request merge on Bitbucket or when a code is pushed to a particular branch, they can create a webhook using the webhook type as Bitbucket.

Steps to create a Bitbucket Webhook for release

Pre-requisites:

  • An active Bitbucket account with repositories needs to have the PAT which can be entered while creating Bitbucket integrations

  • An Active cluster

  • A Release that has been created from the Release Templates section

Steps

  1. On click of the create webhook button, a modal window appears in which we can enter the details for webhook creation

  1. Now we need to select the Webhook Type as Bitbucket from the Webhook Type dropdown

  1. After selecting the webhook type as Bitbucket, a dropdown will be shown to select the repository for which the webhook needs to be created

  1. Once the repository has been selected, users have the option to select the event for which they want the pipeline or release to be triggered Ozone offers 2 events for which webhooks can be created:

    • Push branch - whenever code is pushed to the specified branch the webhook is triggered

    • Pull request - whenever a pull request is merged at that point the webhook will be triggered

  1. After selecting the event, users are provided an option to select the branch for the repository for which they want the webhook to be triggered

  1. since the branch has been selected, the next option which is provided for the users to select is whether they want to trigger a release or a pipeline on the successful happening of the event that they had selected

Here we will select the option of Release

  1. After this users can select the release which they want to be triggered

  1. Once every option have been selected the map parameters option will be enabled and users can click on it to move to the next step

  1. After going to the second step users can choose the input run parameters, once all these options have been selected, users can click on the save button to create the webhook

  1. Once the webhook has been created, it will be shown in the tabular list view

The newly created webhooks are shown at the top of the list, as we can see the webhook type as Bitbucket, and the last triggered time is also shown. Users can also enable/disable the webhook from the toggle window, as well as click on the edit icon to edit the webhook.

Steps to create webhook for pipeline

Pre-requisites:

  • An Active cluster

  • A microservice

Follow the same steps until Step 5 of Creating Webhooks for release Steps:

  1. Once the repository name and the branches have been selected select the trigger type as Pipeline

  1. Once the Trigger type has been selected, now select the pipeline that needs to be triggered

  1. After selecting the pipeline, select the environment in which the webhook needs to be created Remember to select the environment the same in which the cluster has been created

  1. Once the cluster has been selected, select the microservice

  1. Once the cluster has been selected, select the microservice

  1. After selecting the microservice, users can move to the Map parameters step, to select the run parameters for the pipeline

  1. In Map parameters, users can select all the options as they desire.

  1. Once all this is done, users can click on the Save button to create the webhook for the pipeline.

  1. The created webhook will be shown in the webhook list view

The last triggered time is also mentioned, along with this the webhook type is mentioned as Bitbucket. Users can click on the edit button to edit the webhook, click on the toggle button to enable/disable the webhook.

Last updated