CircleCI Configuration

Prerequisites

  • CircleCi must be integrated with GitHub. For setup details, see the CircleCI YAML configuration guide.

  • The config.yml file must exist in circleci > main branch in GitHub and must have Read and write permissions enabled under Settings in GitHub.

Set up the circleci/config.yml file in CircleCI:
  1. Log in to CircleCI with your GitHub account.

    CircleCI login page showing session expiration message and authentication options through email, GitHub, or Bitbucket.
  2. Select your organization. The list of organizations is populated from your GitHub account.

  3. After selecting the organization, set up the CircleCI project.

    CircleCI Projects page showing a list of repositories with options to set up new projects or follow existing ones for builds.
  4. Choose the existing config.yml file from the circleci > main branch repository.

    CircleCI dialog showing options to select or create a .circleci/config.yml file from the repository to set up the CI pipeline.
  5. Click Set Up Project to complete the configuration.

Generate tokens for Pipeline triggers

To generate a token in CircleCI, follow these steps (see Managing API tokens for reference):

Steps

  1. Log in to CircleCI.

  2. Open User Settings, and then select Personal API Tokens.

  3. Click Create New Token.

    CircleCI User Settings page showing the Personal API Tokens section with existing tokens listed and an option to create a new token using the Create New Token button.
  4. Enter a Token Name, and then click Add API Token.

  5. Copy the generated API Token and store it securely.

    CircleCI Personal API Tokens page showing a list of user-created tokens, including a newly added token highlighted under the API Tokens section.

Construct URL

Use the following format to construct the API URL for triggering a build in CircleCI (see CircleCI API introduction for details):

https://circleci.com/api/v2/project/{project_slug}/pipeline

Project Slug format: <vcs_type>/<org_name>/<repo_name>

The example values of the placeholders above:

  • vcs_type: gh

  • org_name: qtm (the organization name created in GitHub and linked in CircleCI)

  • repo_name: circleci (the project repository name)

If we replace the placeholders with relevant values for this example, the Project Slug is formed as gh/qtm/circleci.

Resulting URL:

https://circleci.com/api/v2/project/gh/qtm/circleci/pipeline

CI/CD Rule Configuration in QTM

CI/CD Rule Without Parameters

CI/CD rule configuration screen for “Circle CI QTM” displaying webhook URL, Circle-Token header, and POST method with JSON webhook body and an added branch parameter.

CI/CD Rule With JSON Parameters

After creating the CI/CD rule in QTM, you can trigger a pipeline job in CircleCI.

The pipeline gets triggered successfully.

CI/CD rule configuration screen showing setup for “Circle CI QTM with JSON Parameters,” including a webhook URL, HTTP method POST, JSON webhook body, and masked Circle-Token header field.
Publication date: