Back to QMetry All Products Help Page
Circle CI Configuration
Pre-requisites
CircleCi should have been integrated with GitHub. Refer to https://circleci.com/docs/introduction-to-yaml-configurations/ for more details.
The config.yml file should have been created in circleci > main branch in GitHub. The file should have been granted the “Read and write permissions” under Settings in GitHub.
→ Steps to set circleci/config.yml file in CircleCI:
Generate tokens for Pipeline triggers
Follow the steps mentioned below to generate a token in CircleCI. Refer to https://circleci.com/docs/managing-api-tokens/#creating-a-personal-api-token for more details.
Steps:
1. Log into CircleCI.
2. Go to User Settings > Personal API Tokens.
3. Click on the Create New Token button.
4. Give the Token Name and click on the Add API Token button.
The API Token is generated. Copy it.
Construct URL
The following is an example of constructing the URL to trigger a build in CircleCI. Refer to https://circleci.com/docs/api-intro/ for more details.
https://circleci.com/api/v2/project/{project_slug}/pipeline
Where, the Project Slug is <vcs_type>/<org_name>/<repo_name>
The values of the placeholders above:
The vcs_type is “gh”
The organization name that is created in GitHub and selected in the CircleCI while integration is “qtm4j”
The project/repository name that is set as the project while integration is “circleci”
If we replace the placeholders with relevant values for this example, the Project Slug is formed as gh/qtm4j/circleci
Hence, the URL would be -
https://circleci.com/api/v2/project/gh/qtm4j/circleci/pipeline
CI/CD Rule Configuration in QTM4J
CI/CD Rule Without Parameters
CI/CD Rule With JSON Parameters
After creating the CI/CD rule in QTM4J, you can trigger a pipeline job in CircleCI.
The pipeline gets triggered successfully.
Back to QMetry All Products Help Page