MCPcopy
hub / github.com/iterative/cml / registerRunner

Method registerRunner

src/drivers/gitlab.js:164–180  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

162 }
163
164 async registerRunner(opts = {}) {
165 const { tags, name } = opts;
166
167 const endpoint = `/runners`;
168 const body = new URLSearchParams();
169 body.append('description', name);
170 body.append('tag_list', tags);
171 body.append('locked', 'true');
172 body.append('run_untagged', 'true');
173 body.append('access_level', 'not_protected');
174
175 const token = await this.runnerToken(new URLSearchParams(body));
176 if (token.startsWith('glrt-')) return { token };
177
178 body.append('token', token);
179 return await this.request({ endpoint, method: 'POST', body });
180 }
181
182 async unregisterRunner(opts = {}) {
183 const { runnerId } = opts;

Callers 1

startRunnerMethod · 0.95

Calls 2

runnerTokenMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected