Defining a Build Task on GUI
CodeArts Build provides a graphical user interface (GUI) where you can configure build tools and parameters.
Constraints
To enhance the security of your local code repository while using CodeArts Build, you can add the following IP addresses to your repository server's whitelist. This ensures that only CodeArts Build can access your repository.
- AP-Singapore: 114.119.185.21
- AF-Cairo: 101.46.68.29
- LA-Santiago: 119.8.154.190
- AF-Johannesburg: 182.160.17.185
- ME-Riyadh: 101.46.48.183
- LA-Mexico City2: 122.8.183.54 and 110.238.80.148
- Brazil: 119.8.85.121
- TR-Istanbul: 101.44.33.34, 101.44.34.216, and 101.44.36.238
Preparations
- To use CodeArts Repo repositories, you must have the operation permissions on CodeArts Repo.
- Create a CodeArts project by referring to CodeArts User Guide > "Preparations" > "Creating a Project".
If you already have a project available, skip this step.
- Create a repository by referring to CodeArts Repo User Guide > "Creating a CodeArts Repo Repository".
If you already have a CodeArts Repo repository or are using a third-party repository, skip this step.
Creating a Build Task with GUI
- Access the CodeArts Build homepage from the project list.
- Click Create Task. On the displayed page, configure the basic information of the build task by referring to Table 1. Click Next. The page for selecting a build template is displayed.
Table 1 Basic information Parameter
Description
Name
Assign a custom name to the build task.
- Letters, digits, underscores (_), and hyphens (-) allowed.
- 1 to 115 characters.
Project
Select the project to which the build task belongs.
- This parameter is autofilled when you access CodeArts Build through the project list, so you can leave it as default.
- When accessing the service through the service homepage, select the project created in preparations.
Code Source
Select the source from where the code to be compiled is pulled.- Repo: Code is pulled from CodeArts Repo for your build.
- Other Repo: Code is pulled from CodeArts Repo repositories of other projects for your build. Select a project, and then select a code repository and a default branch.
- Pipeline: If Pipeline is selected as a code source, the build tasks can be executed only by running the corresponding pipeline and cannot be executed independently.
The following code repositories are provided by third-party sources and not by CodeArts.- GitHub: Code is pulled from GitHub for your build.
- Git: Code is pulled from other services for your build.
Service Endpoint
Optional. You need to set this parameter when the Code Source is set to a third-party code repository. If you are using a third-party code repository for the first time, you will need to create a service endpoint. For details, see Creating a Service Endpoint.
Repository
Select the repository from where the code to be compiled is pulled.
Default Branch
Select a default branch.
Description
Optional. Enter additional information to describe the build task. Max. 512 characters.
- CodeArts Build has more than 30 built-in build templates. You can select a template that suits your requirements and click OK to create the build task. For details about templates, see Table 2.
- You can also select Blank Template and add desired build actions when configuring a build task.
- If preset templates do not meet your needs, you can also customize a template.
Table 2 System template description Template
Description
Language
Stage
Maven
Build a Java project with Apache Maven.
Java
Configure the build environment, download code, build with Maven, and upload the software package to a release repo.
QuickApp
Build a quick app with npm.
JavaScript
Configure the build environment, download code, build an Android quick app, and upload the software package to a release repo.
Django
Build a Django project.
Python
Configure the build environment, download code, build with Setuptools, and upload the software package to a release repo.
Ionic Android App
Develop an Android app with Ionic, an HTML5 mobile app development framework.
Java
Configure the build environment, download code, build an Android app with Ionic, and upload the software package to a release repo.
Ant
Apache Ant is a tool used to compile and deploy Java projects.
Java
Configure the build environment, download code, build with Ant, and upload the software package to a release repo.
CMake
Build a cross-platform project with CMake.
C/C++
Configure the build environment, download code, build with CMake, and upload the software package to a release repo.
Grails
Build a Web application with Grails, a Web application development framework.
Groovy
Configure the build environment, download code, build with Grails, and upload the software package to a release repo.
Grunt
Build a JavaScript project and run the project with Grunt.
JavaScript
Configure the build environment, download code, build with Grunt, and upload the software package to a release repo.
gulp
Use gulp to build an automation workflow and a frontend IDE.
JavaScript
Configure the build environment, download code, build with gulp, and upload the software package to a release repo.
Go
Build a Go project.
Go
Configure the build environment, download code, build with Go, and upload the software package to a release repo.
mono-linux
Compile a project with MSBuild and .NET on Mono Linux (x86 and Arm).
JavaScript
Configure the build environment, download code, build on Mono Linux, and upload the software package to a release repo.
Maven-Container
Use Apache Maven to build a Java project, create an image from Dockerfile, and push the image to SWR.
Java
Configure the build environment, download code, Build with Maven, create an image, and push the image to SWR.
ServiceStage-Maven-Image Build
Use Apache Maven to build a Java project, create an image from Dockerfile, and push the image to SWR.
Java
Configure the build environment, download code, Build with Maven, create an image, push the image to SWR, run shell commands, and upload the software package to a release repo.
servicestage-npm-war
Build a WAR package with npm and upload the package to a release repo.
JavaScript
Configure the build environment, download code, Build with npm, run shell commands, Build with Ant, and upload the software package to a release repo.
Release Maven Private Package
To build a Java project with Maven using private dependency packages, you must first upload these packages to a self-hosted Maven repo in CodeArts Release.
Java
Configure the build environment, download code, and Build with Maven.
PHP
Declare, install, and package the PHP libraries your project depends on by using the PHP runtime environment and Composer.
PHP
Configure the build environment, download code, build in PHP, and upload the software package to a release repo.
Bazel
Build a project with Bazel.
Java
Configure the build environment, download code, build with Bazel, and upload the software package to a release repo.
Shell
Run shell commands.
N/A
Configure the build environment, download code, and run shell commands.
sbt
Build a Scala or Java project with sbt.
Scala
Configure the build environment, download code, build with sbt, and upload the software package to a release repo.
npm
Build Vue and Webpack projects with npm.
JavaScript
Configure the build environment, download code, build with npm, and upload the software package to a release repo.
Android APK
The Android build system compiles application resources and source code, and then packages them into APKs that can be deployed, signed, and distributed.
Java
Configure the build environment, download code, build with Android, and upload the software package to a release repo.
Gradle
Build a Java, Groovy, or Scala project with Gradle.
Java
Configure the build environment, download code, build with Gradle, and upload the software package to a release repo.
serverless-npm
Build Vue and Webpack projects with npm.
JavaScript
Configure the build environment, download code, build with npm, and upload the software package to a release repo.
DevStar-Maven-Container Build
Use Apache Maven to build a Java project, create an image from Dockerfile, and push the image to SWR.
Java
Configure the build environment, download code, Build with Maven, create an image, and push the image to SWR.
DevStar-npm-Container Build
Use npm to build a JavaScript project, create an image from Dockerfile, and push the image to SWR.
JavaScript
Configure the build environment, download code, Build with npm, create an image, and push the image to SWR.
DevStar-Python-Container Build
Build a Python project, create an image from Dockerfile, and push the image to SWR.
Python
Configure the build environment, download code, Build with Setuptools, create an image, and push the image to SWR.
Yarn
Build a JavaScript project with Yarn.
JavaScript
Configure the build environment, download code, build with Yarn, and upload the software package to a release repo.
buildImage
Build an image with a Dockerfile and push the image to SWR.
Java
Configure the build environment, download code, create an image, and push the image to SWR.
PyInstaller
Use the PyInstaller tool to compress the Python file into an executable program.
Python
Configure the build environment, download code, build with PyInstaller, and upload the software package to a release repo.
Setuptools
Build a Python project with Setuptools.
Python
Configure the build environment, download code, build with Setuptools, and upload the software package to a release repo.
Build with Ark Compiler
Build an application with Ark Compiler on Ubuntu.
Java
Configure the build environment, download code, build with Ark Compiler, and upload the software package to a release repo.
GNU-ARM
Design, develop, and use an Arm simulator with the GNU Arm toolchain.
C
Configure the build environment, download code, build with GNU Arm, and upload the software package to a release repo.
- On the displayed Build Actions page, click Save. The build task is created. The new task appears in the build task list.
You can continue to configure this build task by referring to Configuring a Build Task.
Turning a Task Into a Template
- You can save the current build task as a template for later build task creation. The procedure is as follows:
- On the Build History page, click
in the upper right corner and select Make Template from the drop-down list.
- Enter the template name and description, and click Save.
- Click the username, and select from the drop-down list.
- In the navigation pane, choose . The saved template is displayed in the list.
- On the Build History page, click
The following table lists what you can do straight from the build templates.
Note that template edits and deletions are locked down to the template creator and the tenant account.
Operation |
Description |
---|---|
Search for a template |
Enter a keyword in the search box to search for a template. |
Favorite a template |
Locate the desired template and click |
Delete a template |
Locate the desired template, click |
Creating a Service Endpoint
When you select any third-party repository on the Basic Information page, the Endpoint is a mandatory setting.
Service endpoints are extensions or plug-ins of CodeArts and provide the capability of connecting to third-party services.
By default, CodeArts Build pulls code from CodeArts Repo for your build. CodeArts Build also uses service endpoints to connect to third-party repositories to obtain project source code.

- The network may be unstable or other problems may occur when a third-party repository is used.
- Use the code import function of CodeArts Repo for secure, stable, and efficient download and build.
GitHub
To restrict CodeArts Build from accessing the GitHub repository, you can use OAuth or access token for authentication, as long as the code can still be pulled to complete the build.
You can also delete connections or withdraw authorization at any time to prevent password leakage.
- Click Create next to Service Endpoint.
- In the displayed dialog box, configure the following parameters.
Parameter
Description
Service Endpoint Name
Assign a custom name to the service endpoint. Enter a maximum of 256 characters, including letters, digits, hyphens (-), underscores (_), periods (.), and spaces.
Authentication Mode
- OAuth: You need to log in to GitHub for manual authorization.
- Access token: If you select Access token as the authentication mode, you need to enter a GitHub access token. You can obtain the access token as follows:
- Log in to GitHub and open the configuration page.
- Click Developer settings.
- Choose .
- Verify the login account.
- Enter the token description, select permissions, select the private repository access permission, and click Generate token.
- Copy the generated token.
NOTE:
- Save the token once it is generated. The token is invisible after you refresh the page. You can only generate a new token.
- Enter a valid token description so that it can be easily identified. If the token is deleted by mistake, the building will fail.
- Delete the token when it is no longer used to prevent information leakage.
- After the authorization is successful, return to the page for creating the build task.
Git
- Click Create next to Service Endpoint.
- In the displayed dialog box, configure the following parameters.
Parameter
Description
Service Endpoint Name
Assign a custom name to the service endpoint. Enter a maximum of 256 characters, including letters, digits, hyphens (-), underscores (_), periods (.), and spaces.
Git Repository URL
Enter the HTTPS address of the target Git repository.
Username
Optional. Enter the username of the target Git repository. Max. 300 characters.
Password or Access Token
Optional. Enter the password of the target Git repository. Max. 300 characters.
- Click Confirm.
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