Skip to content

Commit 36a4637

Browse files
authored
Merge pull request #7 from rkoliada-cl/docs/add-build-instructions
docs: add build instructions to CLAUDE.md
2 parents cf95498 + 064875d commit 36a4637

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,51 @@ update the spec in the same commit.
5151
specs; if upstream has reimplemented something equivalent (e.g. unix
5252
socket support), prefer deleting the fork-local copy and documenting
5353
the change.
54+
55+
## AI Workspace Required
56+
57+
Both the local-test and Build System workflows below assume you are inside an [AI Workspace](https://gitlab.corp.cloudlinux.com/primeos/cl-aiworkspaces) VM at `/root/ai-workspace/`. They depend on:
58+
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.
61+
62+
Outside an AI Workspace these commands will not work as documented. Spin up a workspace via `cl-aiworkspaces` first.
63+
64+
## Local Tests
65+
66+
Run from the repo root (`/root/ai-workspace/node_exporter/`):
67+
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 |
74+
75+
## Build System
76+
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.
78+
79+
### Parameters
80+
81+
Most fields come from `build-plan.py`; the table records what should end up in the final payload for a `node_exporter`-only build.
82+
83+
| Field | Value |
84+
| --- | --- |
85+
| BS project name | `node_exporter` |
86+
| `build_type_id` | `5ac2787bdf7e526d4a5f0259` (CloudLinux OS packages) |
87+
| `build_platforms` | `CL7`, `CL8`, `CL9`, `CL10`, `ubuntu22_04_ext_cpanel` |
88+
| `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. |
93+
94+
### Jenkins jobs (node_exporter-relevant)
95+
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[]`:
97+
98+
| Job name | Build System `_id` |
99+
| --- | --- |
100+
| `CMT-end-server-tools` | `635b962c2afd3e1feec603bd` |
101+
| `clpro-ubuntu-tests` | `677e40a2f1b69faa0d69baf6` |

0 commit comments

Comments
 (0)