Configuring CI/CD Rule for BitBucket Pipeline

This article is intended for users who want to configure a CI/CD Rule in QTM4J using BitBucket Pipeline (Cloud). Refer to the following steps to set up the CI/CD Rule:

Steps:

  1. In QTM4J, go to the Automation module.

  2. Open the CI/CD Rules section.

  3. Click on the Create New Rule button on the right screen.

  4. Enter the below parameters to configure an automation job to be triggered in the CI/CD tool.

Parameter

Description

Parameter

Description

Name

Enter your preferred name of the rule.

Webhook URL

Enter the API URL. For Bitbucket Pipeline, refer to the following link: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#trigger-a-pipeline-for-a-commit-on-a-branch-or-tag

Headers and Value

Enter Headers and values. For Bitbucket Pipeline, refer to the following link: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#trigger-a-pipeline-for-a-commit-on-a-branch-or-tag

After entering Headers and Values, click on the Add button after entering Header and its Value. The entered details will be displayed below the fields.

HTTP-Method

Select HTTP-method from POST.

Webhook Body

Select the JSON option from the drop-down and enter the Webhook Data or request body in the field accordingly.

  1. Click Create to save the configuration.

 

The following is an example of configuring a CI/CD Rule for the BitBucket pipeline (build without params):

image-20240103-105057.png
image-20240103-105227.png

You can execute the List Pipelines BitBucket Open API to fetch the necessary pipeline details to be provided in the “Webhook Body” while configuring the CI/CD Rule.


Once the CI/CD Rule is configured, you can:


Note: QTM4J only facilitates triggering builds to the CI/CD tools. The resultant action or outcome of triggering the build, including the import of test results back to QTM4J, is not part of the feature or indicated in the app. We recommend testing your Pipeline APIs in the Postman app to verify the provided parameter values and request payload. Though you can import the results back to QTM4J using multiple methods when configured as part of the Job.

For any further queries related to QTM4J, please contact QMetry Support.