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

Building an Application Component

Before deploying ServiceStage, you need to build the software package into an image or build the source code into a software package. Therefore, after you set the application source when creating an application component, ServiceStage generates a build job for the application component.

Components whose runtime system is Docker cannot be built.

Viewing Application Component Building

  1. Log in to ServiceStage, choose Application Management > Application List, and click an application to go to the Overview page.
  2. On the Component List tab, click a component to go to the Overview page.
  3. Click the Build Job tab to view the status of the application component build job.

Maintaining a Build Job

Table 1 Maintenance

Operation

Operation Description

Edit

Click Edit to go to the build job configuration page. For details, see Editing a Package Build Job or Editing a Source Code Job.

Build Now

Click Build Now to start a build job.

Query details/build history

  • Click View Other Build Records and view the build history.
  • Click Logs to view the build log.
  • Click Code Check to view the code check overview and details.
    Currently, the following code check plug-ins are supported: Checkstyle, FindBugs, and PMD.
    NOTE:

    Only the Maven build project supports code check.

Editing a Package Build Job

  1. Log in to ServiceStage, choose Application Management > Application List, and click an application to go to the Overview page.
  2. On the Component List tab, click a component to go to the Overview page.
  3. Click the Build Job tab and click Edit. The build job configuration page is displayed.
  4. (Optional) Set Description.
  5. 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.

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

  7. Set Archived Image Address.
  8. Select Cluster.
  9. (Optional) Specify Node Label to deliver the build job to a fixed node based on the node label.
  10. 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, choose Application Management > Application List, and click an application to go to the Overview page.
  2. On the Component List tab, click a component to go to the Overview page.
  3. Click the Build Job tab and click Edit. The build job configuration page is displayed.

    1. (Optional) Set Description.
    2. Select Cluster.
    3. (Optional) Specify Node Label to deliver the build job to a fixed node based on the node label.
    4. Click Next.

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

    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.

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

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