@rishibhushan/jenkins-mcp-server 1.1.14 → 1.1.16
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/bin/jenkins-mcp.js +18 -6
- package/package.json +1 -1
package/bin/jenkins-mcp.js
CHANGED
|
@@ -50,16 +50,28 @@ function run(cmd, args, cwd) {
|
|
|
50
50
|
async function ensureVenv() {
|
|
51
51
|
if (!fs.existsSync(pythonPath)) {
|
|
52
52
|
console.error("[jenkins-mcp] Python venv not found, creating...");
|
|
53
|
-
|
|
53
|
+
const venvPython = IS_WINDOWS ? "python" : "python3";
|
|
54
|
+
await run(venvPython, ["-m", "venv", ".venv"], PACKAGE_ROOT);
|
|
54
55
|
} else {
|
|
55
56
|
console.error("[jenkins-mcp] Python venv exists, ensuring dependencies...");
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
const pipArgs = ["-m", "pip", "install", "-r", "requirements.txt"];
|
|
60
|
+
|
|
61
|
+
// Optional enterprise / proxy support
|
|
62
|
+
if (process.env.PIP_INDEX_URL) {
|
|
63
|
+
pipArgs.push("--index-url", process.env.PIP_INDEX_URL);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (process.env.PIP_EXTRA_INDEX_URL) {
|
|
67
|
+
pipArgs.push("--extra-index-url", process.env.PIP_EXTRA_INDEX_URL);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (process.env.PIP_TRUSTED_HOST) {
|
|
71
|
+
pipArgs.push("--trusted-host", process.env.PIP_TRUSTED_HOST);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
await run(pythonPath, pipArgs, PACKAGE_ROOT);
|
|
63
75
|
|
|
64
76
|
console.error("[jenkins-mcp] Python environment ready");
|
|
65
77
|
}
|