Help Center/ CodeArts Check/ User Guide/ Configuring a Task/ Configuring a Custom Environment
Updated on 2026-05-19 GMT+08:00

Configuring a Custom Environment

If a common build environment does not have the required dependency packages and tools when you use CodeArts Check, you can use the base image provided by a custom build environment to execute the code check task.

Prerequisite

You have pushed the custom environment to the image repository.

Configuring a Private Repository Endpoint

By default, CodeArts Check uses self-hosted repositories in CodeArts Artifact. In addition, private repositories can be configured as download sources. To connect the private repositories of a third-party service, configure a service endpoint to obtain data.

  1. Access CodeArts Check.
  2. Go to the task page. In the task list, click a task name.
  3. On the task details page, choose Settings > Custom Environment.
  4. In the Self-hosted Repo Endpoints area, click Manage Endpoint. For details, see Creating a Nexus Repository Service Endpoint.

  5. After the configuration is complete, select the created endpoint from the Endpoint drop-down list box.

    A maximum of seven endpoints can be added.

  6. Click Save.

Configuring Pre Commands

Before executing a check task, you can configure Pre Commands to set up a custom environment.

  1. In the Pre Commands area, enter pre commands.
  2. Click Save.

Custom Parameters

Before executing a task, you can configure custom parameters as environment variables, such as password and username, for script execution. They can be referenced in the format of ${Parameter name} by scripts in Configuring Pre Commands.

  1. In the Custom Parameters area, set parameters by referring to Table 1.

    Table 1 Custom parameter description

    Parameter

    Description

    Name

    1. Parameter name, which can be customized.
    2. Only letters, digits, periods (.), underscores (_), and hyphens (-) allowed.
    3. 1 to 128 characters.

    Value

    The value can contain 1 to 8,192 characters.

    Private

    1. The switch is disabled by default. Toggle on to enable the function. After you click Save, the value of the parameter is not displayed.
    2. If a parameter is private, the system encrypts it for storage and only decrypts it for usage. Private parameters are not displayed in run logs.

    Note: Once the settings are saved, private parameters cannot be changed to non-private, viewed or edited. They can only be deleted and reset.

    Click to delete a custom parameter.

    Click Create Parameter to add custom parameters. A maximum of 50 custom parameters can be added.

  2. Click Save.

Configuring an Execution Host

Configure the host for running code check tasks. Select your desired agent pool. Custom and dedicated agent pools include agents added by yourselves. For details, see Managing Agent Pools.

After selecting an agent pool by referring to Table 2, click Save.

Table 2 Execution host

Host Type

Description

Default

Predefined pools include executors provided by CodeArts Check with out-of-the-box availability. The default executor specification is 8 vCPUs, 16 GB.

Dedicated

Customized environment created and hosted by CodeArts with private VPC connectivity for secure task execution

Select an agent pool from the Agent resource pool drop-down list.

Custom

Custom pools include compute resources provided by users. They can be hosted in CodeArts Check after registration. CodeArts Check schedules these executors to execute build tasks. You can only configure the custom Linux and Linux_Docker agents in CodeArts Check.

Select an agent pool from the Agent resource pool drop-down list.

Configuring a Custom Image and the Location of the Custom Engine in the Image

The default executor does not support the configuration of the location of the custom engine in the image.

  1. In the Custom Image area, enter the content in the format of Domain name/Organization name/Image repository name:Tag name or an image link of SoftWare Repository for Container (SWR).
  2. In the Location of the custom engine in the image area, enter the directory where the third-party engine is located. This parameter is supported only when SonarQube is integrated.
  3. Click Save.

Related Documents