@andrian.yablonskyy/thub-agent 1.0.17 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.pdf +0 -0
- package/config.json +0 -1
- package/package.json +1 -1
- package/src/cli.js +7 -5
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Key options for `thub run`:
|
|
|
48
48
|
| `--type hw\|sw` | Required resource type. |
|
|
49
49
|
| `--board <name>` / `--label <l>` | Required labels (repeatable). |
|
|
50
50
|
| `--group <groupId>` | Restrict scheduling to resources that are members of this group. Falls back to `THUB_GROUP` / `thub config set group <id>`. |
|
|
51
|
+
| `--client <name\|id>` | Run on this specific Client (resource name or id) only; the job waits in that Client's queue even if other matching resources are idle. |
|
|
51
52
|
| `--user <name>` | Free-text job owner — a label, not an identity. Falls back to `THUB_USER` / `thub config set user <name>`. |
|
|
52
53
|
| `--image <url>` | Firmware/build image URL, fetched by the Client. |
|
|
53
54
|
| `--sha256 <hex>` | Expected sha256 of `--image`; the Client verifies it before flashing/running. |
|
|
@@ -56,7 +57,6 @@ Key options for `thub run`:
|
|
|
56
57
|
| `--timeout <dur>` | e.g. `30m`, default `30m`. |
|
|
57
58
|
| `--priority <n>` | 0–100; CI defaults to 50, CLI to 60 so a developer is not starved by a busy pipeline. |
|
|
58
59
|
| `--meta <key=value>` | Arbitrary metadata stored on the job (repeatable) — CI job ids, git coordinates, anything else worth attaching to the run. |
|
|
59
|
-
| `--source ci\|cli` | Override auto-detected job source (defaults to `ci` when `$GITHUB_ACTIONS=true`, else `cli`). |
|
|
60
60
|
| `--dry-run` | Exercise the full pipeline without the Client executing anything for real. |
|
|
61
61
|
| `--wait` | Do not detach on job end; exit with the job's verdict code (used in CI). |
|
|
62
62
|
| `--detach` | Print the job id and exit immediately. |
|
package/README.pdf
ADDED
|
Binary file
|
package/config.json
CHANGED
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -69,6 +69,11 @@ program
|
|
|
69
69
|
'Restrict scheduling to resources that are members of this group (§13.1). ' +
|
|
70
70
|
'Overrides THUB_GROUP / config file; leave unset for an unconstrained run.'
|
|
71
71
|
)
|
|
72
|
+
.option(
|
|
73
|
+
'--client <nameOrId>',
|
|
74
|
+
'Run on this specific Client (resource name or id) only; the job waits in that Client\'s queue ' +
|
|
75
|
+
'even if other matching resources are idle.'
|
|
76
|
+
)
|
|
72
77
|
.option(
|
|
73
78
|
'--user <name>',
|
|
74
79
|
'Free-text job owner, shown on the Client and the dashboard to tell whose job is whose ' +
|
|
@@ -91,7 +96,6 @@ program
|
|
|
91
96
|
collectRepeatable,
|
|
92
97
|
[]
|
|
93
98
|
)
|
|
94
|
-
.option('--source <ci|cli>', 'Override auto-detected job source')
|
|
95
99
|
.option(
|
|
96
100
|
'--dry-run',
|
|
97
101
|
'Exercise the full pipeline (schedule, accept, state transitions, logs, artifact, result) ' +
|
|
@@ -101,19 +105,17 @@ program
|
|
|
101
105
|
.action(async (opts) => {
|
|
102
106
|
try {
|
|
103
107
|
const c = client(),
|
|
104
|
-
source = opts.source || (process.env.GITHUB_ACTIONS === 'true' ? 'ci' : 'cli'),
|
|
105
108
|
labels = [...(opts.board ? [`board:${opts.board}`] : []), ...opts.label],
|
|
106
109
|
meta = Object.fromEntries(opts.meta.map((kv) => kv.split(/=(.*)/s).slice(0, 2))),
|
|
107
110
|
group = resolveGroup({ group: opts.group }),
|
|
108
111
|
user = resolveUser({ user: opts.user }),
|
|
109
112
|
|
|
110
113
|
spec = {
|
|
111
|
-
target: { type: opts.type, labels, ...(group ? { group } : {}) },
|
|
114
|
+
target: { type: opts.type, labels, ...(group ? { group } : {}), ...(opts.client ? { client: opts.client } : {}) },
|
|
112
115
|
firmware: { url: opts.image, ...(opts.sha256 ? { sha256: opts.sha256 } : {}) },
|
|
113
116
|
tests: { url: opts.tests, suite: opts.suite, args: opts.arg },
|
|
114
117
|
timeoutSec: parseDurationSec(opts.timeout),
|
|
115
|
-
|
|
116
|
-
source,
|
|
118
|
+
...(opts.priority !== undefined ? { priority: opts.priority } : {}),
|
|
117
119
|
...(user ? { user } : {}),
|
|
118
120
|
...(Object.keys(meta).length ? { meta } : {}),
|
|
119
121
|
...(opts.dryRun ? { dryRun: true } : {})
|