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

Creating a Package Job

The image package can be generated with a few clicks in a build job. In this way, the entire process of package obtainment, and image compilation and archiving is automatically implemented.

Prerequisites

  1. A cluster has been created. For details, see Creating a CCE Cluster.
    • The build job starts a build container on the cluster node to perform build-related operations. To ensure build security, you are advised to perform security hardening on CCE cluster nodes.
    • The build job depends on the JDK, Golang, Maven, Gradle, Ant, or Node.js compilation tool preconfigured in the build container.
    • Different IAM users under the same account can perform operations on the same cluster. To cancel the build permission from a specific IAM user, set the servicestage:assembling:create, servicestage:assembling:modify, and servicestage:assembling:delete permissions to Deny by referring to Creating a Custom Policy.
  2. An EIP has been bound to the build node. For details, see Assigning an EIP and Binding It to an ECS.

Procedure

  1. Log in to ServiceStage, choose Continuous Delivery > Build, and click Create Package Job.
  2. Enter Job Name.
  3. Enter Enterprise Project.

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

    It is available after you create an enterprise project.

  4. (Optional) Enter Description.
  5. Set Package Source.

    The following upload modes are supported:

    • Select the corresponding software package from OBS. Upload the software package to the OBS bucket in advance. For details, see Uploading a File.

    Click Select Software Package and select the corresponding software package.

  6. Select a build type.

    • System default
      1. Select a basic image, which must be the same as the software package compilation language selected in 5.
      2. Set Basic Image Tag.
    • Custom Dockerfile
      Enter custom commands in the compilation box.

      Exercise caution when inputting sensitive information in the echo, cat, or debug command, or encrypt sensitive information to avoid information leakage.

    • Image

      Select a basic image, which must be the same as the software package compilation language selected in 5.

  7. 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.

  8. Set Archived Image Address.
  9. Select Cluster.

    If you use the selected cluster to perform a build job, you can deliver the build job to a fixed node through node labels. For details about how to add a label, see Adding a Node Label.

  10. Click Build Now to start the build.

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

Follow-Up Operations

After an application component is successfully built, you can manage it on ServiceStage. For details, see Deploying a Component.