@rishibhushan/jenkins-mcp-server 1.0.5 → 1.0.6
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 +50 -56
- package/package.json +2 -1
package/bin/jenkins-mcp.js
CHANGED
|
@@ -162,81 +162,75 @@ function dependenciesInstalled(pipPath) {
|
|
|
162
162
|
*/
|
|
163
163
|
function installDependencies(venvPath) {
|
|
164
164
|
const { pip } = getVenvPaths(venvPath);
|
|
165
|
+
const wheelsPath = path.join(projectRoot, 'wheels');
|
|
165
166
|
const requirementsPath = path.join(projectRoot, 'requirements.txt');
|
|
166
167
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
//
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
'--trusted-host', 'files.pythonhosted.org'
|
|
184
|
-
];
|
|
185
|
-
|
|
186
|
-
// Add proxy if environment variable is set
|
|
187
|
-
const proxy = process.env.HTTP_PROXY || process.env.http_proxy ||
|
|
188
|
-
process.env.HTTPS_PROXY || process.env.https_proxy;
|
|
189
|
-
|
|
190
|
-
if (proxy) {
|
|
191
|
-
log(`Using proxy: ${proxy}`, 'blue');
|
|
192
|
-
pipArgs.push('--proxy', proxy);
|
|
193
|
-
}
|
|
168
|
+
console.error('Installing Python dependencies...');
|
|
169
|
+
|
|
170
|
+
// Check if wheels directory exists (pre-packaged wheels)
|
|
171
|
+
if (fs.existsSync(wheelsPath)) {
|
|
172
|
+
console.error('Using pre-packaged wheels (no internet required)...');
|
|
173
|
+
|
|
174
|
+
// Install from local wheels (fast, no network needed)
|
|
175
|
+
const installReqs = spawnSync(pip, [
|
|
176
|
+
'install',
|
|
177
|
+
'--no-index', // Don't use PyPI
|
|
178
|
+
'--find-links', wheelsPath, // Use local wheels
|
|
179
|
+
'-r', requirementsPath
|
|
180
|
+
], {
|
|
181
|
+
cwd: projectRoot,
|
|
182
|
+
stdio: 'inherit'
|
|
183
|
+
});
|
|
194
184
|
|
|
195
|
-
|
|
196
|
-
|
|
185
|
+
if (installReqs.status !== 0) {
|
|
186
|
+
error('Failed to install from wheels');
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
} else {
|
|
190
|
+
// Fallback to normal install with proxy support
|
|
191
|
+
console.error('Downloading from PyPI...');
|
|
192
|
+
const pipArgs = ['install', '-r', requirementsPath];
|
|
193
|
+
|
|
194
|
+
const proxyFriendlyArgs = [
|
|
195
|
+
'--trusted-host', 'pypi.org',
|
|
196
|
+
'--trusted-host', 'pypi.python.org',
|
|
197
|
+
'--trusted-host', 'files.pythonhosted.org'
|
|
198
|
+
];
|
|
199
|
+
|
|
200
|
+
const proxy = process.env.HTTP_PROXY || process.env.http_proxy;
|
|
201
|
+
if (proxy) {
|
|
202
|
+
pipArgs.push('--proxy', proxy);
|
|
203
|
+
}
|
|
204
|
+
pipArgs.push(...proxyFriendlyArgs);
|
|
197
205
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
});
|
|
206
|
+
const installReqs = spawnSync(pip, pipArgs, {
|
|
207
|
+
cwd: projectRoot,
|
|
208
|
+
stdio: 'inherit'
|
|
209
|
+
});
|
|
203
210
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
console.error(' 2. If behind a proxy, set HTTP_PROXY/HTTPS_PROXY env vars');
|
|
209
|
-
console.error(' 3. Try manually: .venv/bin/pip install -r requirements.txt');
|
|
210
|
-
process.exit(1);
|
|
211
|
+
if (installReqs.status !== 0) {
|
|
212
|
+
error('Failed to install dependencies');
|
|
213
|
+
process.exit(1);
|
|
214
|
+
}
|
|
211
215
|
}
|
|
212
216
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
// Install the package itself in editable mode
|
|
216
|
-
log('Installing jenkins-mcp-server package...', 'yellow');
|
|
217
|
+
console.error('✓ Requirements installed');
|
|
217
218
|
|
|
219
|
+
// Install package itself
|
|
220
|
+
console.error('Installing jenkins-mcp-server package...');
|
|
218
221
|
const packageArgs = ['install', '-e', '.'];
|
|
219
222
|
|
|
220
|
-
// Add same proxy-friendly options
|
|
221
|
-
if (proxy) {
|
|
222
|
-
packageArgs.push('--proxy', proxy);
|
|
223
|
-
}
|
|
224
|
-
packageArgs.push(...proxyFriendlyArgs);
|
|
225
|
-
|
|
226
223
|
const installPkg = spawnSync(pip, packageArgs, {
|
|
227
224
|
cwd: projectRoot,
|
|
228
225
|
stdio: 'inherit'
|
|
229
226
|
});
|
|
230
227
|
|
|
231
228
|
if (installPkg.status !== 0) {
|
|
232
|
-
error('Failed to install
|
|
233
|
-
console.error('\nTroubleshooting:');
|
|
234
|
-
console.error(' 1. Ensure pyproject.toml or setup.py exists');
|
|
235
|
-
console.error(' 2. Try manually: .venv/bin/pip install -e .');
|
|
229
|
+
error('Failed to install package');
|
|
236
230
|
process.exit(1);
|
|
237
231
|
}
|
|
238
232
|
|
|
239
|
-
|
|
233
|
+
console.error('✓ Package installed');
|
|
240
234
|
}
|
|
241
235
|
|
|
242
236
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rishibhushan/jenkins-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "AI-enabled Jenkins automation via Model Context Protocol (MCP)",
|
|
5
5
|
"main": "bin/jenkins-mcp.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"bin/",
|
|
16
16
|
"src/",
|
|
17
17
|
"requirements.txt",
|
|
18
|
+
"wheels/",
|
|
18
19
|
"README.md",
|
|
19
20
|
"LICENSE"
|
|
20
21
|
],
|