Built-in CI/CD Service
1. Default Built-in CI/CD Service Description
Version: v1.4.10 and later (including this version), the CI/CD service in the cluster version supports automatic installation by default, without the need for separate installation as before. Previous versions require obtaining upgrade packages or the command-line tool wedaCli first, then proceed according to the instructions below.
2. Prerequisites
During deployment, you need to set up a dedicated fixed node for CI/CD, that is, add a node specifically for deployment, and preferably not deploy it on the same node as other Weda services. We use nodeSelector to determine the node selector, which needs to be set on the k8s node in advance. If not set, the deployment will automatically select a suitable node based on resource availability. After setting nodeSelector, you need to create a directory for CI/CD data persistence on the corresponding node (i.e., the value of hostPath).
- If
nodeSelectorsettings andhostPathare not on the same node, it will cause the CI/CD service to report errors and fail to start normally - If
nodeSelectorandhostPathare not set, CI/CD data cannot be persisted, and build history will not be viewable
Operation steps are as follows:
2.1 Set Label (Node Selector)
kubectl label nodes <node> weda-gitness=service
<node> is the node name in k8s
2.2 Create Directory on the Node with Label
mkdir -p /data1/gitness
- The directory
/data1/gitnessis an example, please adjust according to actual circumstances - If there are multiple disks or in a production environment, it is strongly recommended to place the
/data1/gitnessdata directory on an independent, large-capacity disk to avoid service exceptions caused by system disk being full
3. Configuration
internalBuild:
## Internal CI/CD service, true to enable (will auto-deploy), false to disable (will not auto-deploy)
## internalBuild and build are both CI/CD services, the difference:
## - internalBuild: deployed inside the cluster
## - build: deployed externally
## However, at least one must be enabled. When both are enabled, the CI/CD service inside the cluster will be deployed by default
enabled: true
## Node selector label
nodeSelector:
## weda-gitness: service
## Create directory on the node with the node selector label, for example: /data1/gitness
hostPath: ""
Configuration Description:
| Configuration Item | Description | Example Value |
|---|---|---|
enabled | Whether to enable internal CI/CD service | true / false |
nodeSelector | Node selector label | weda-gitness: service |
hostPath | Data persistence directory path | /data1/gitness |
- At least one of
internalBuildandbuildmust be enabled - When both are enabled simultaneously, the internal cluster CI/CD service (
internalBuild) is used by default