Manage build nodes (Jenkins)
Build nodes are used to extend the types and versions of build languages. The platform provides build nodes for developers to compile code in different languages, such as Java, Golang, and Python. You can customize and add build nodes to meet your specific needs.
View build node details
-
In the left navigation bar, click DevOps Toolchain > Instances.
-
Click the instance name.
-
In the Build Node tab, view the build nodes.
-
In the Platform Built-in area, the build nodes provided by the platform by default are displayed. You can click on the build node card to view the configuration details of the default platform build node.
Tip:
-
The base node of the default platform build node contains two containers: the jnlp container and the tools container.
-
The jnlp container is responsible for connecting the Jenkins slave to the Jenkins Master.
-
The tools container contains basic tools used in the pipeline template, such as yq, jq, git, kubectl, docker, helm, etc.
-
-
Other default platform build language nodes inherit the base node by default, which means they have all the functions of the two containers in the base node.
-
If Jenkins is a brand new deployment, it will only contain build nodes of the latest versions of various programming languages (except for Java. Currently, it will carry two versions of Java 8 and Java 21).
-
If Jenkins is upgraded from a previous version, then in addition to the build nodes of the latest versions of various programming languages, it will also retain the build nodes of various programming languages carried in the previous version of Jenkins. The build nodes carried by Jenkins previously will no longer be maintained in the future.
-
-
In the Custom area, the build nodes you have customized and added are displayed. You can click on the build node card to view the configuration details of the custom build node.
Tip: Other custom build language nodes inherit the base node by default, which means they have all the functionalities of the two containers in the base node.
-
Add custom build nodes
-
Click Add Build Node in the Custom area, and configure the relevant parameters in the Add custom build node dialog box according to the following instructions.
-
Name: Enter the name of the build node. When creating a pipeline, you can select the name of the Build Node that has been created in the Pipeline Global Settings or Env Settings area.
-
Add one or multiple build node containers in the Containers area.
-
Container name: The name of the Already Integrated or Input container. The container name you enter will match the container name of the build node in the cluster resources, so that the corresponding container can be scheduled when you use the relevant language to build.
-
Image Address: Manually enter the image address used by the build node.
-
Resources: The resources required when creating the build node. Please refer to the following table for form filling.
Configuration Parameter Parameter Description CPU Resource Request Resource Request: The minimum resources occupied by the tool at runtime.
Resource Limitations: The maximum resources that can be consumed by the tool during runtime.
CPU: cores, m (millicores), 1 core = 1000 m.
Memory: Mi (1 MiB = 220 bytes), Gi (1 GiB = 230 bytes), 1 Gi = 210 Mi.CPU Resource Limitations Memory Resource Requests Memory Resource Limitations
-
-
Secrets: Select one or multiple created secret dictionaries. If there are no available secret dictionaries in the list, click Add Secret to create a Docker Registry type secret dictionary, refer to Creating Credentials .
-
Node Selector: Select labels for the host. Node Selector can be used to filter and select hosts that contain all selected labels. You can select multiple host labels by clicking the dropdown selection box, and you can also perform a fuzzy search for host labels by entering the label name in the dropdown box.
Tip:
-
-
When selecting host tags, the dropdown menu will provide real-time suggestions below, displaying the number of hosts that meet the requirements.
-
For tags with the same key, only one can be selected (if multiple are selected, there will be no hosts that meet the criteria).
-
Build cache: Adding a build cache can reuse the downloaded dependency packages during the build process, reducing build time. After clicking Add, fill out the following form.
-
Storage: Supports selecting Persistent Volume Claim and Host Path Volume.
If you choose Persistent Volume Claim, you must also select an existing PVC Name in the PVC Name field.
If you choose Host Path Volume, you must also select an existing Host Path in the Host Path field. -
Mount Path: Supports selecting Maven Cache, Go Caching, and Custom.
If you choose Maven Cache or Go Caching, the path will be the default value and cannot be modified.
If you choose Custom, you must fill in the Mount Path in the right-hand box.
-
-
Environment variables: Set environment variables for the build node to use during the build process. Click the Add button and enter the key-value pairs for the environment variables.
-
Mount file: Add one or more files to be mounted in the container of the build node. Any pipeline using this build node will be able to access the files you added.
-
Type: Supports selecting npm, maven, and other file types.
-
Path: Fill in the path for mounting the file according to the selected type.
Tip: The paths for mounting different files cannot be duplicated, and the mounted directory will become read-only. It is recommended not to mount the directory in special directories such as the root directory.
-
File name: The name of the mounted file.
-
Content: The content of the mounted file.
-
-
- Click Add to complete adding a custom build node.
Update the build node
-
In the Build Node section of the Jenkins deployment details page, click the card of the build node to be updated to enter the Build node detail page.
-
On the Build node detail page, click the Update Build node button to enter the update build node page.
-
On the update build node page, fill in the form. Please refer to Add custom build node for the form parameters.
-
Click Update to complete updating the build node.
Delete the build node
Caution: The platform default build nodes do not support deletion.
-
In the Customize build node area of the Jenkins deployment details page, click the card of the custom build node to be deleted to enter the Build node detail page.
-
On the Build node detail page, click the Delete build node button in the lower left corner.
-
Click Confirm.
FAQ
-
How to configure npm build cache for nodejs build nodes in Jenkins?
-
How to configure Maven build cache and dependency repository for Java build nodes in Jenkins?