• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cliffano / mcp-jenkins / 17005061373

16 Aug 2025 05:57AM UTC coverage: 60.215% (-2.0%) from 62.234%
17005061373

push

github

cliffano
Extract MCP tools and Nestor to CLI.

5 of 5 branches covered (100.0%)

Branch coverage included in aggregate %.

5 of 13 new or added lines in 2 files covered. (38.46%)

107 of 181 relevant lines covered (59.12%)

1.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.86
/lib/cli.js
1
"use strict";
3✔
2
import bag from 'bagofcli';
3✔
3
import fs from 'fs';
3✔
4
import McpJenkins from './mcpJenkins.js';
3✔
5
import p from 'path';
3✔
6

3✔
7
import Nestor from "nestor";
3✔
8

3✔
9
import buildJenkinsJobWithNameTool from './tools/buildJenkinsJobWithName.js';
3✔
10
import checkJenkinsVersionTool from './tools/checkJenkinsVersion.js';
3✔
11

3✔
12
const APP_DIR = process.cwd(),
3✔
13
  DIRNAME = p.dirname(import.meta.url).replace('file://', '');
3✔
14

3✔
15
function _run(args) {
×
16

×
17
  const pkgFile = p.join(DIRNAME, '..', 'package.json');
×
18
  const pkg = JSON.parse(fs.readFileSync(pkgFile));
×
19

×
NEW
20
  const url = process.env.JENKINS_URL || 'http://localhost:8080';
×
21
  const opts = {
×
NEW
22
    nestor: new Nestor(url),
×
NEW
23
    tools: [
×
NEW
24
      buildJenkinsJobWithNameTool,
×
NEW
25
      checkJenkinsVersionTool
×
NEW
26
    ]
×
27
  };
×
28

×
29
  const mcpJenkins = new McpJenkins(pkg.name, pkg.version, opts);
×
30
  mcpJenkins.run();
×
31

×
32
}
×
33

3✔
34
/**
3✔
35
 * Execute MCP Jenkins.
3✔
36
 */
3✔
37
function exec() {
3✔
38

3✔
39
  const actions = {
3✔
40
    commands: {
3✔
41
      run : { action: _run }
3✔
42
    }
3✔
43
  };
3✔
44

3✔
45
  bag.command(DIRNAME, actions);
3✔
46
}
3✔
47

3✔
48
const exports = {
3✔
49
  exec: exec
3✔
50
};
3✔
51

3✔
52
export {
3✔
53
  exports as default
3✔
54
};
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc