Creating a Task
This section explains how to create individual or bulk check tasks from various code sources.
Prerequisites
- Create a project.
- (Optional) Create a code repository by referring to CodeArts Repo User Guide > "Creating a Repo".
- (Optional) Create a third-party code repository.
Constraints
- When the task to be deleted has a code repository with multiple branches, the deletion will be successful if there are fewer than 200 branches. Otherwise, the deletion will fail.
- The network may be unstable or other problems may occur when a third-party repository is used.
Creating a Task to Check Code from CodeArts Repo
If you select Automatically create check task when creating a code repository in CodeArts Repo, a code check task will be created synchronously. You can view the task in the task list of CodeArts Check.
If you do not select Automatically create check task when creating a code repository, perform these steps to create a task:
- Access CodeArts Check.
- Click Create Task and configure parameters by referring to Table 1.
Table 1 Task parameters Parameter
Description
Project
Project that the task belongs to.
- This parameter is set by default when you access CodeArts Check from the project entry.
- During access through the service entry, select the project created in Creating a Project based on the site requirements.
Code Source
Select the source of code.
- Select Repo to check code hosted on CodeArts Repo in the current project.
Name
Customize your task name.
- Letters, digits, periods (.), underscores (_), and hyphens (-) allowed.
- 3 to 128 characters.
Repository
Select the code repository to be checked.
Default Branch
Select the code branch to be checked.
Language
Select the code language to be checked. For details about the languages that can be checked, see Mainstream Programming Languages.
If the source is a CodeArts Repo repository, the languages are automatically detected from the repository. You can remove languages but not add new ones.
- Click Confirm. You can view the task on the task list page of CodeArts Check.
- To modify the task name and default branch, go to the task details page, choose Settings > Basic Info, and then modify the target task.
- To delete a task, go to the task details page, choose Settings > Basic Info, and then delete the target task. Alternatively, click
in the row where the target task is located, and choose Delete from the drop-down list.
When the task to be deleted has a code repository with multiple branches, the deletion will be successful if there are fewer than 200 branches. Otherwise, the deletion will fail.
Creating a Check Task from a Third-Party Code Repository
- The network may be unstable or other problems may occur when a third-party repository is used.
- It is advised to use the code import function of CodeArts Repo for secure, stable, and efficient download and build.
- Access CodeArts Check.
- Click Create Task and configure parameters by referring to Table 2.
Table 2 Parameters Parameter
Description
Project
Project that the task belongs to.
- This parameter is set by default when you access CodeArts Check from the project entry.
- During access through the service entry, select the project created in Creating a Project based on the site requirements.
Code Source
Select the source of code.
- Select Git. For code hosted on other services, use Git to pull the code.
Name
Customize your task name.
Service Endpoint
Select the service endpoint connected to the third-party repository. If no endpoint is available, create one by referring to Creating Service Endpoints.
Repository
Select the code repository to be checked.
Default Branch
Select the code branch to be checked.
Language
Select the code language to be checked. For details about the languages that can be checked, see Mainstream Programming Languages.
- Click Confirm. You can view the task on the task list page of CodeArts Check.
- To modify the task name and default branch, go to the task details page, choose Settings > Basic Info, and then modify the target task.
- To delete a task, go to the task details page, choose Settings > Basic Info, and then delete the target task. Alternatively, click
in the row where the target task is located, and choose Delete from the drop-down list.
When the task to be deleted has a code repository with multiple branches, the deletion will be successful if there are fewer than 200 branches. Otherwise, the deletion will fail.
Related Operations
- For details about the APIs related to creating a task, see Creating a Check Task.
- For details about the APIs related to task management, see Task Management.
- For details about best practices, see CodeArts Check Best Practices.
- For details about subsequent operations, see Configuring a Task.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot