Configure and run a pipeline

To deploy generated images and software packages to the development, testing, or production environments, you must first create application groups and applications as described in Application management.

  1. On the top navigation bar, click Business Apps.

  1. From the left navigation pane, select Delivery Center > Continuous Delivery.

  1. On the Pipelines page, click Create Pipeline.

  1. Select a scenario template as needed.

The PaaS platform provides the following templates:

Tasks involved: build > deploy & upgrade.

Tasks involved: review codes > build > deploy to test environment > perform integration testing > deliver to production environment.

Tasks involved: review codes > build > deploy to development environment > perform integration testing > deploy to test environment > perform automation testing > approve > deliver to production environment.

  1. Click Next to orchestrate the pipeline. To add a new task, click the  icon.

Orchestrate the pipeline:

Task type

Description

Initial settings

Configure build parameters and trigger mode for the pipeline.

  • Listener Settings—Specify the trigger mode for the pipeline. Options include the following:

  • Manual: Manually determine when the pipeline is triggered.

  • Code Repository Change (Gitlab)—Automatic trigger mode. The system can simultaneously monitor the push, tag, and merge request actions of the code repository. The pipeline is triggered when any action occurs. You can filter the actions by branch/label name or keyword. The pipeline is triggered only when actions matching the branch/label occur.

  • Scheduled Trigger—Triggers the pipeline at the specified time period of the specified day in a week. This mode is applicable to scenarios that require frequent deliveries.

  • Build Parameter: Complete the parameters configured in "Configure a build task." You can also configure the build parameters when you run the pipeline.

Code review

Use the task you created in "Create a code review task."

  • Start Mode: Select whether to automatically or manually run the task.

  • Automatic: The task is automatically started after the previous task is finished.

  • Manual: The pipeline is suspended after the previous task is finished. You must click Continue on the running history page of the pipeline to start the task and resume the pipeline.

  • Task Name: Specify the task name.

  • Scheduled Task: Select an existing build task.

  • Parameters: Limit the review results. If result is not in the specified range, the task fails and the pipeline stops. If you do not configure this field, the review results are not limited. Metrics include the number of bugs, the number of vulnerabilities, the number of code smells, code duplication rate (%), the number of new bugs, the number of new vulnerabilities, and the number of new code smells.

Build

Use the task you created in "Configure a build task."

Start Mode: Select whether to automatically or manually run the task.

Deploy to development/test/production environment

Deploy the generated image or software package to the development, test, or production environment.

  • Start Mode: Select whether to automatically or manually run the task.

  • Deploy to Application: Select the application to upgrade.

  • Deployment Policy: Rolling upgrade and grayscale upgrade are supported. If you select rolling upgrade, configure service access mode for the deployed application. If you select grayscale upgrade, configure domain name access mode for the deployed application and set the weight. For more information, see Configure application access modes.

  • In the current software version, Helm packages, Jar packages, and War packages deployed on VMs do not support grayscale upgrade.

  • Pipeline parallel upgrade of the same application is not supported.

  • Source: Select a software package.

  • Select from Builds: Select a software package generated from a build task. You need to select the build and software package name.

  • Select from Repository: Select a software package in the software center. You need to select the software package name and version.

TIP TIP:

When you select a software package in the software center, the software package version can be a variable, which must be declared in the pipeline initial settings.

Integration test

When the pipeline runs to this task, an approval process is initiated. The process and approvers are configured by the system administrator in the workflows. The pipeline can continue to run after being approved.

Automated API test

Use a created automated test.

  • Start Mode: Select whether to automatically or manually run the task.

  • Task Name: Specify the task name.

  • Scheduled Task: Select an existing automated test.

Manual approval

Initiate a manual approval process before deployment to ensure the security of the production environment.

When the pipeline runs to this task, an approval process is initiated. The process and approvers are configured by the system administrator in the workflows. The software package can be deployed to the production environment after being approved.

Custom task

Use the custom task you created in "Configure a custom task."

  1. Click OK.

  1. Click Run in the Actions column for the created pipeline, configure the run parameters, and then click Run.

The running log details page opens and displays the running information about the pipeline and all tasks in the pipeline.