Help Center> CodeArts Pipeline> User Guide> Changes> Managing Change-triggered Pipelines
Updated on 2024-05-29 GMT+08:00

Managing Change-triggered Pipelines

In microservices, you can create change-triggered pipelines to associate them with change resources. A change-triggered pipeline has the following features:

  • A microservice can have only one change-triggered pipeline.
  • An integration branch is automatically created during the execution of the change-triggered pipeline. After successful execution, the branch content is merged to the master branch.
  • After successful execution, the change status is automatically updated.
  • Only one pipeline instance can run at one time.
  • The change-triggered pipeline cannot be triggered by an event or at a specified time.

Creating a Change-triggered Pipeline

  1. Access the microservice.
  2. In the microservice list page, click a microservice name. The Overview page is displayed.
  3. Switch to the Pipelines tab.
  4. Click Create Pipeline. On the displayed page, set basic information. For details, see Table 1.
    Table 1 Parameter description

    Parameter

    Description

    Project

    Project to which the microservice belongs. The project cannot be changed.

    Name

    Pipeline name, which is generated based on the current time by default.

    Pipeline Source

    Only Repo is supported.

    Repository

    Name of the repository associated with the microservice. The repository cannot be changed.

    Default Branch

    The default branch associated with the microservice. The default branch cannot be changed.

    Repo HTTPS Authorization

    Configure endpoints to elevate permissions on repository operation. Endpoints are used for change-triggered pipelines and repository operation extensions.

    Alias

    If an alias is set, the system parameters are generated for the repository (you can view the parameters on the parameter configuration page).

    Change-based Trigger

    If Change-based Trigger is enabled for a pipeline, this pipeline is marked with .

    NOTE:

    A microservice can have only one change-triggered pipeline.

    Description

    Description of the pipeline.

  5. After setting all parameters, click Next. On the displayed page, select a template or select Blank Template.
  6. Click OK, and then click Save.

Executing a Change-triggered Pipeline

  1. Access the microservice.
  2. In the microservice list page, click a microservice name. The Overview page is displayed.
  3. Switch to the Pipelines tab page.
  4. Locate the change-triggered pipeline and click its name. The pipeline details page is displayed.
  5. Click Run in the upper right corner. In the displayed Execution Configuration dialog box, configure the following parameters:

    • Changes: Changes in To be released or Releasing stage are displayed. Select one or more changes.
    • Runtime Parameters: Set runtime parameters as needed and then save them. For details, see Using Parameters.
    • Execution Stages: Select one or more jobs to execute. By default, all jobs are executed.
    • Description: Enter the debugging information about the execution.
  6. After the configuration is complete, click Run. The pipeline details page is displayed.

    When the change-triggered pipeline is running, the MergeReleaseBranch and MergeDefaultBranch stages are added by default.

    • MergeReleaseBranch: The change-triggered pipeline automatically pulls a new branch from the default branch and integrates all feature branches of the change into the new branch.
    • MergeDefaultBranch: The integration branch is merged to the default branch.

Viewing the Result

After the execution is complete, you can view the execution result.

After the pipeline is successfully executed, the status of all selected changes is changed to Released.

  • Click a pipeline name to go to its details page.
    • Click View More on the pipeline source card. In the displayed dialog box, view the selected changes.
    • Click a change name to go to the change details page.
  • Click the Releases tab.
    • All changes in the To be released and Releasing stages are displayed.
    • You can enter a keyword in the search box to search for a change.
    • Click in the Operation column. In the displayed dialog box, click OK. The change status changes back to Developing.

    For a change in the Releasing stage, if the change-triggered pipeline is running, you can exit the release only after the pipeline run is complete or stopped.