Updated on 2024-12-16 GMT+08:00

Creating a Pipeline

This section describes how to create a pipeline.

Prerequisites

A build job has been created. For details, see Creating a Source Code Job or Creating a Package Job.

Creating a Pipeline

  1. Log in to ServiceStage.
  2. Choose Continuous Delivery > Pipeline.
  3. Click Create Pipeline and set basic pipeline information by referring to the following table. Parameters marked with an asterisk (*) are mandatory.

    Parameter

    Description

    *Pipeline

    Pipeline name.

    Enter 1 to 99 characters. Start with a letter. Only use letters, digits, periods (.), at signs (@), and hyphens (-).

    *Enterprise Project

    Enterprise projects let you manage cloud resources and users by project.

    It is available after you enable the enterprise project function.

    Description

    Pipeline description. Enter up to 255 characters.

  4. Click Back to Template, and select and configure a pipeline template by referring to the following table.

    ServiceStage provides built-in pipeline templates for typical scenarios. After a pipeline template is selected, a pipeline model is automatically generated.

    Template Name

    Description

    Empty Template

    You need to add a pipeline model.

    1. Click the Empty Template card.
    2. Add a build job to generate an image package.
      1. Click Select Build Job.
      2. Select a build job.

        If there is no build job, create one by referring to Creating a Source Code Job or Creating a Package Job.

      3. Click OK.

      Repeat this step to add more build jobs. The build job must belong to the enterprise project set in 3.

    3. Add a deployment environment to deploy the image package generated by build job to the environment.
      1. Click Add Environment.
      2. Click and enter an environment name.
      3. Select the deployed application component in the build job and click OK.

        If there is no application component in the environment, create and deploy one by referring to Creating and Deploying a Component Based on a Container Using UI Configurations and Creating and Deploying a Component Based on a Container Using YAML Configurations.

        Click Change Component to select another component.

      4. Select Build Job: Select the added build job for build.
      5. Build Output: Set the archive path of the image generated by the build job.
      6. Click OK.

      Repeat this step to add more deployment environments.

    4. Configure pipeline approval to determine whether to deploy the image package generated during build to the environment.
      1. Click on an environment card.
      2. Set Approval Mode.

        By all: The image package generated during build can be deployed in the environment only after all selected approvers approve the deployment.

        By one person: The image package generated during build can be deployed in the environment after any approver approves the deployment.

      3. Set Approved By.

        You can select multiple approvers. The system automatically loads all subaccounts of the account.

      4. Click OK.

    Simple Template

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

    1. Select Simple Template.
    2. Click Create.
    3. Add a build job to generate an image package.
      1. Click on a build job card.
      2. Select a build job.

        If there is no build job, create one by referring to Creating a Source Code Job or Creating a Package Job.

      3. Click OK.

        Click Select Build Job to add multiple build jobs. The build job must belong to the enterprise project set in 3.

    Common Template

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

    1. Select Common Template.
    2. Click Create.
    3. Add a build job to generate an image package.
      1. Click on a build job card.
      2. Select a build job.

        If there is no build job, create one by referring to Creating a Source Code Job or Creating a Package Job.

      3. Click OK.

        Click Select Build Job to add multiple build jobs. The build job must belong to the enterprise project set in 3.

    4. Add a deployment environment to deploy the image package generated by build job to the environment.
      1. Click Add Environment.
      2. Click on the empty environment card. The Add Environment dialog box is displayed.
      3. Click and enter an environment name.
      4. Click to save the environment name.
      5. Select the deployed application component in the build job and click OK.

        If there is no application component in the environment, create and deploy one by referring to Creating and Deploying a Component Based on a Container Using UI Configurations and Creating and Deploying a Component Based on a Container Using YAML Configurations.

        Click Change Component to select another component.

      6. Select Build Job: Select the added build job for build.
      7. Build Output: Set the archive path of the image generated by the build job.
      8. Click OK.

      Repeat this step to add more deployment environments.

    5. Configure pipeline approval to determine whether to deploy the image package generated during build to the environment.
      1. Click on an environment card.
      2. Set Approval Mode.

        By all: The image package generated during build can be deployed in the environment only after all selected approvers approve the deployment.

        By one person: The image package generated during build can be deployed in the environment after any approver approves the deployment.

      3. Set Approved By.

        You can select multiple approvers. The system automatically loads all subaccounts of the account.

      4. Click OK.

  5. Determine whether to start the pipeline:

    • If yes, click Create and Execute to save the settings and start the pipeline. After the pipeline is started, its status is Successful .

      If the pipeline need to be approved, it is in the To be confirmed state during component deployment. The pipeline can continue to run only after you notify the approvers for approval. For details, see Approving a Pipeline.

    • If no, click Create to save the settings only. After the pipeline is created, its status is Not executed.

    To view the pipeline, see Viewing Pipeline Details.