Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts Check/ Best Practices/ Checking Code with Custom Executors

Checking Code with Custom Executors

Updated on 2025-06-11 GMT+08:00

Scenario

You can register your own executors with CodeArts Check to schedule and execute check tasks. This section describes how to use a custom executor to check code from CodeArts Repo.

This practice depends on CodeArts Repo to store the code.

Constraints

Resource and Cost Planning

In this practice, you need to purchase an ECS as a custom executor. For details about the price of an ECS, see Price Calculator.

Prerequisites

  • You have purchased an ECS.
    NOTE:

    Only EulerOS 2.5 is supported for custom executors.

  • You have installed Git-LFS on the custom executor. If not, install it by referring to the following command-based example.
    Run the following commands on the executor:
    # Download
    wget -O  git-lfs.tar.gz https://github.com/git-lfs/git-lfs/releases/download/v3.4.1/git-lfs-linux-amd64-v3.4.1.tar.gz
    # Decompress the package
    tar -zxvf git-lfs.tar.gz
    # Open the directory generated after the decompression
    cd  git-lfs-3.4.1
    # Run the installation script
    sh install.sh
    # Verify
    git lfs version
  • You have attached an EVS disk.

Procedure

Table 1 Steps

Step

Description

Creating a Project

Create a project.

Creating an Agent Pool

Create a pool of custom executors (agent pool).

Creating a CodeArts Repo Repository

Create a repository to store code.

Configuring and Executing a Check Task

Configure the task to use the custom executor.

Viewing Check Results

View the check logs to verify the executor used for the task.

Creating a Project

  1. Log in to the Huawei Cloud console.
  2. Click in the upper left corner and choose Developer Services > CodeArts from the service list.
  3. Click Access Service. The homepage of CodeArts is displayed.
  4. Click Create Project, and select the Scrum template.
  5. Set the project name to check-bestpractice and keep the default values for other parameters.
  6. Click OK to access the project.

Creating an Agent Pool

  1. On the navigation bar, click the username and choose All Account Settings.
  2. Choose Agent Management > Agent Pool.
  3. Click Create Pool. In the displayed dialog box, set parameters according to Table 2 and click Save.

    Table 2 Agent pool configuration

    Parameter

    Description

    Pool Name

    Assign a custom name to the pool, for example, custom_pool.

    Pool Type

    Select LINUX_DOCKER. When a task is initiated, a Linux Docker container will be started to run the task.

    Description

    (Optional) Enter additional information to describe the pool.

    This pool can be used by all users of the current account.

    (Optional) Selecting this option allows all users within the current account to use the pool.

  4. Click the name of the new pool (custom_pool is used in this practice). The pool configuration page is displayed.
  5. Click Create Agent. In the displayed dialog box, configure the agent according to Table 3 and leave the other parameters as default.

    Table 3 Parameters for creating an agent

    Parameter

    Description

    Install Docker

    Selecting this option mandates Docker installation.

    Install Docker automatically

    Toggling on the switch will automatically install Docker.

    AK

    Obtain an AK.

    SK

    Obtain an SK.

    Agent Name

    Assign a custom name to the agent, for example, agent_test_custom.

    Agent Workspace

    Enter an agent workspace that follows the standard Linux directory structure. For example, /opt/agent_test_custom.

  6. Select the check box to confirm that you have read and accept the agreements. Then click Generate Command and Copy Command. Click Close.

    Figure 1 Creating an agent

  7. Go to the ECS list page, find the row of the ECS purchased to meet prerequisites, click Remote Login, and run the command copied in 6, as instructed by Step 3.
  8. On the agent list page, click Refresh List. After the information is automatically synchronized in the background, a new item will be added to the list. The agent alias is agent_test_custom-mwlye1NlLG.

Creating a CodeArts Repo Repository

  1. On the navigation bar, choose Services > Repo. The CodeArts Repo homepage is displayed.
  2. Click New Repository. On the displayed page, expand the Project drop-down list and select the project name you specify when creating a project. Then, select Template as the repository type. Click Next.
  3. On the template selection page, select the Java Maven Demo template and click Next.
  4. On the displayed page, set Repository Name to custom_repo, select Automatically create Check task, and leave the other parameters as default. Click OK.

    Figure 2 shows the directory that stores files of the code repository.

    Figure 2 Directory that stores files of the code repository

Configuring and Executing a Check Task

  1. In the navigation pane, choose Code > Check. The task is displayed on the task list page, because you have selected Automatically create Check task when creating a cloud repository in CodeArts Repo.
  2. Click the task name. On the displayed page, choose Settings > Custom Environment.
  3. In the Execution Host area, select Self-Hosted.
  4. Expand the drop-down list and select custom_pool you created in Creating an Agent Pool.
  5. Click Save and click Start Check.

Viewing Check Results

Click the task name. On the displayed task details page, click Logs. If the logs contain "Find available executor node:agent_test_custom-mwlye1NlLG," the task is executed by a custom executor. agent_test_custom-mwlye1NlLG is the agent alias mentioned in 8.

Related Operations

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback