Updated on 2023-06-25 GMT+08:00

Managing Pipelines

One-click deployment can be achieved through pipeline. In this way, the entire process of source code pull, compilation, packaging, archiving, and deployment is automatically implemented. This unifies the integration environment and standardizes the delivery process.

In the new pipeline, the "phase/task" model is optimized to the "build/environment" model. Each pipeline includes a group of build jobs and one or more groups of environment (such as development environment, production-like environment, and production environment) tasks, each group of environment tasks contains one or more subtasks (such as deployment and test tasks) and provides templates.

Creating a Pipeline

  1. Log in to ServiceStage, choose Continuous Delivery > Pipeline, and click Create Pipeline.
  2. Enter the basic pipeline information.

    1. Enter a pipeline name.
    2. (Optional) Enter Description.

  3. Select a pipeline template.

    ServiceStage provides built-in pipeline templates in typical scenarios. After you select a pipeline template, the Build/Environment model is automatically generated. You can directly use the model.
    Table 1 Template description

    Template

    Description

    Operation Description

    Empty template

    You need to add the build/environment model.

    Set this parameter as required. For details, see 3.a to 3.c.

    Simple template

    The "build" model is automatically added to compile and build the source code of the code library.

    For details, see 3.a.

    Common template

    The "build/environment" model is automatically added to compile and build the source code in the code library, and the generated software package or image is continuously released to the production environment.

    For details, see 3.a to 3.c.

    1. Add a build job.

      Click Select Build Job, select a created build job, and click OK.

      Repeat this step to add more build jobs.

    2. Add a deploy job.

      Click Add Environment and enter an environment name. Select a deployed application component.

      If no application component is available, create and deploy an application component. For details, see Deploying a Component.

      Select the build job added in 3.a from the Select Build Job drop-down list box.

      Select build output.

      Repeat this step to add more environments.

    3. Set pipeline approval.

      Click in the environment area to set the approval mode and approver.

      • Approval Mode: By all and By one person are now supported.
      • Approved By: You can select multiple accounts as approvers. The system automatically loads all subaccounts of the account.

  4. Click Create and Start to start the pipeline.

    Click Create to save the settings and do not execute the pipeline.

Configuring the Pipeline Triggering Policy

Choose Continuous Delivery > Pipeline. On the Pipeline page that is displayed, set the pipeline triggering policy as follows.

Table 2 Triggering policies

Policy

Mode

Description

Manual

-

Select the pipeline task to be triggered and click Start to manually start the pipeline.

Automatic

-

Set the code source, corresponding namespace, repository name, and branch. When code is submitted to the corresponding branch of the source code repository, the pipeline is automatically triggered.

You can set a maximum of eight trigger sources.

The procedure is as follows:

  1. Select a pipeline and choose More > Triggering Policy.
  2. Set Type to Automatic.
  3. Select Source Code Repository to push the code to the selected source code repository.
  4. Click OK.

Scheduled

Single-time

Set the triggering time to trigger a single-time pipeline.

The procedure is as follows:

  1. Select a pipeline and choose More > Triggering Policy.
  2. Set Type to Scheduled.
  3. Specify Triggered.
  4. Click OK.

Periodic

Set the triggering time segment, interval, and period to implement periodic pipeline triggering.

The procedure is as follows:

  1. Select a pipeline and choose More > Triggering Policy.
  2. Set Type to Scheduled.
  3. Enable Periodic Triggering.
  4. Specify Period, Triggered, Effective Time, and Period.
  5. Click OK.

Cloning a Pipeline

You can clone a pipeline to generate a new pipeline based on the existing pipeline configuration.

  1. Log in to ServiceStage and choose Continuous Delivery > Pipeline.
  2. Select a pipeline and choose More > Clone.
  3. ServiceStage automatically loads the configuration information. Modify the configuration parameters as required by referring to Creating a Pipeline.
  4. Click Create and Start to start the pipeline.

    Click Create to save the settings and do not execute the pipeline.

Related Operations

After the pipeline is started, you can build and deploy applications in one-click mode. For details about maintenance operations after application components are deployed, see Application O&M.