You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+33-68Lines changed: 33 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,85 +52,50 @@ update the spec in the same commit.
52
52
socket support), prefer deleting the fork-local copy and documenting
53
53
the change.
54
54
55
-
## Creating a Build
55
+
## AI Workspace Required
56
56
57
-
This project ships as an RPM package (Build System name: `node_exporter`). Builds are submitted to the CloudLinux Build System via its CLI.
57
+
Both the local-test and Build System workflows below assume you are inside an [AI Workspace](https://gitlab.corp.cloudlinux.com/clos/ci-tools/cl-aiworkspaces) VM at `/root/ai-workspace/`. They depend on:
58
58
59
-
### Step 1 — Generate the build plan
59
+
- the workspace's CloudLinux OS toolchain and any project-specific runtime (Python venv, Node, Docker, …) — needed by the local-build and unit-test targets;
60
+
- the workspace's `mcp-cli-wrapper.sh` and provisioned Build System / Jenkins tokens — needed by the BS payload helper.
60
61
61
-
```bash
62
-
cd /root/ai-workspace/node_exporter
63
-
git checkout <branch-or-tag># branch, tag, or detached HEAD
64
-
uv run /root/ai-workspace/cl-aiworkspaces/workspace-side/scripts/build-plan.py
65
-
```
62
+
Outside an AI Workspace these commands will not work as documented. Spin up a workspace via `cl-aiworkspaces` first.
66
63
67
-
The script reads `cl-aiworkspaces/.agents/skills/build-create/projects-catalog.yaml` to map this workspace directory to its Build System name(s) and emits a JSON plan on stdout (warnings/errors on stderr; exit 1 on fatal errors such as uncommitted changes).
Run from the repo root (`/root/ai-workspace/node_exporter/`):
75
67
76
-
### Step 2 — Filter the plan to this project only
68
+
| Command | What it does |
69
+
| --- | --- |
70
+
|`make build`| Build the `node_exporter` binary |
71
+
|`make test`| Run the upstream Go unit-test suite |
72
+
|`make test-e2e`| Run the e2e harness (downloads collector fixtures on first run) |
73
+
|`make checkmetrics && make checkrules`| Validate metric and rule schemas |
77
74
78
-
The plan may include unrelated workspace projects. **Strip all entries from `projects` except `node_exporter`**, and keep only the Jenkins jobs relevant to it. One project per build — do not submit a multi-project payload.
75
+
## Build System
79
76
80
-
### Step 3 — Submit the build
77
+
This repo ships as an RPM/DEB package: `node_exporter`. **Use the `/build-create` skill to submit builds** — it runs `build-plan.py` and submits the payload via the Build System CLI. The tables below are the project-specific overrides on top of that generic flow.
|`build_flavors`|`alt-php-els` (id `68b1ad89aa0264b2618434c8`) |
89
+
|`target_channel`|`beta`|
90
+
|`build_ref.name`|**Branch (or tag) to build.**`build-plan.py` reads this from the current `git` checkout in the workspace — confirm you are on the intended branch (your feature branch, not `master`) before generating the plan. |
91
+
|`build_ref.type`|`git_branch` or `git_tag`. |
92
+
|`testing.qa_ref` (per project) and top-level `qa_ref`|**Branch checked out in the QA repo for Jenkins jobs.**`build-plan.py` defaults both to `"master"` regardless of `build_ref.name` — override to your feature branch if the QA side has matching changes. |
105
93
106
-
`build_ref.type` options: `git_branch`, `git_tag`, or `gerrit_change` (for `refs/changes/XX/NNNNN/PS` refs — the `qa_ref` should then be `NNNNN/PS`).
94
+
### Jenkins jobs (node_exporter-relevant)
107
95
108
-
The CLI returns a build ID. Build URL: `https://build.cloudlinux.com/#/build/<build_id>`.
96
+
`build-plan.py` emits the workspace-wide plan covering every project in the workspace. For a `node_exporter`-only build, filter `projects[]` down to `node_exporter` and keep **only** these jobs in `jenkins_jobs[]`:
0 commit comments