Updated on 2024-05-28 GMT+08:00

Maintaining Build Jobs

For components deployed in the Kubernetes environment, you can maintain build jobs in the build job list.

Maintenance Operations

Table 1 Maintenance operations

Operation

Description

Editing a Build Job

See Editing a Package Job or Editing a Source Code Job.

User-created jobs support this operation.

Starting a Build Job

See Starting a Build Job.

Viewing Details/Build History

See Viewing Build Jobs.

Branch/Tag

See Branch/Tag.

Source code jobs support this operation.

Deleting a Build Job

See Deleting a Build Job.

User-created jobs support this operation.

Editing a Package Job

  1. Log in to ServiceStage.
  2. Choose Continuous Delivery > Build.
  3. On the Build page, use either of the following methods to search for a build job:

    • Select User created and select the CCE cluster and build job status. Then, select the target build job in the build list.
    • Search for the build job created by the specified user in the search box.

  4. Click More > Edit. The build job configuration page is displayed.
  5. Enter a job name.
  6. (Optional) Enter the description.
  7. Set Package Source.

    The following upload modes are supported:

    • Select the corresponding software package from the SWR software repository. Upload the software package to the software repository. For details, see Uploading the Software Package.
    • Select the corresponding software package from OBS. Upload the software package to the OBS bucket in advance. For details, see Uploading an Object.

  8. Set Build Type.

    • System default
      1. Select the language of the basic image, which must be the same as that of the software package.
      2. Set Basic Image Tag.

        The build node can download basic images only when it can access the public network.

    • Custom Dockerfile

      Enter custom commands in the compilation box.

    • Image

      Set Basic Image.

  9. Set Image Class.

    • Public: This is a widely used standard image that contains an OS and pre-installed public applications and is visible to all users. You can configure the applications or software in the public image as needed.
    • Private: A private image contains an OS or service data, pre-installed public applications, and private applications. It is available only to the user who created it.

  10. Specify Archived Image Address.
  11. Select Cluster.
  12. (Optional) Specify Node Label to deliver the build job to a fixed node based on the node label.

    For details about how to add a label, see Adding a Node Label.

  13. Click Build Now to start the build.

    Click Save to save the settings (not to start the build).

Editing a Source Code Job

  1. Log in to ServiceStage.
  2. Choose Continuous Delivery > Build.
  3. On the Build page, use either of the following methods to search for a build job:

    • Select User created and select the CCE cluster and build job status. Then, select the target build job in the build list.
    • Search for the build job created by the specified user in the search box.

  4. Click More > Edit. The build job configuration page is displayed.
  5. Enter a name.
  6. (Optional) Enter the description.
  7. Click Modify and set Code Source.

    You need to create a repository authorization first. For details, see Authorizing a Repository.

  8. Select Cluster.

    1. (Optional) Specify Node Label to deliver the build job to a fixed node based on the node label. For details about how to add a label, see Adding a Node Label.
    2. Click Next.

  9. Set the environment.

    1. Edit a build template.

      Select Maven, Ant, Gradle, Go, Docker, or Build Common Cmd. You can compile and archive binary packages or Docker images at the same time.

      When using the Build Common Cmd template for build, enter a compilation command that contains up to 512 characters. If there are more than 512 characters, an error message is displayed, indicating that the task input parameter is incorrect. In this case, you can add multiple Build Common Cmd plug-ins to split the command.

    2. Select an archive mode.
      • Publish Build Artifact: Binary package archive plug-in, archived to the SWR software repository.
      • Publish Build Image: Image archive plug-in, archived to the SWR image repository.

  10. Click Build to save the settings and start the build.

    Click Save to save the settings (not to start the build).

Starting a Build Job

  1. Log in to ServiceStage.
  2. Choose Continuous Delivery > Build.
  3. On the Build page, use either of the following methods to search for a build job:

    • Select the CCE cluster where the component is deployed and the build job status, and select the specified build job in the build list.
    • Search for the build job in the search box.

  4. Click Build Now to start the build.

Branch/Tag

  1. Log in to ServiceStage.
  2. Choose Continuous Delivery > Build.
  3. On the Build page, use either of the following methods to search for a build job:

    • Select the CCE cluster where the component is deployed and the build job status, and select the specified build job in the build list.
    • Search for the build job in the search box.

  4. Click Branch/Tag and set build parameters.

    1. Select Branch/Tag.
    2. Select the corresponding branch or tag from the drop-down list.
    3. Specify Commit ID for the branch or tag.

  5. Click OK.

Deleting a Build Job

  1. Log in to ServiceStage.
  2. Choose Continuous Delivery > Build.
  3. On the Build page, use either of the following methods to search for a build job:

    • Select User created and select the CCE cluster and build job status. Then, select the target build job in the build list.
    • Search for the build job created by the specified user in the search box.

  4. Click More > Delete.
  5. Click OK.