@itentialopensource/adapter-jenkins 0.4.1 → 0.4.3
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/AUTH.md +1 -1
- package/CHANGELOG.md +16 -0
- package/TAB2.md +4 -4
- package/metadata.json +7 -4
- package/package.json +6 -6
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/sampleProperties.json +6 -6
- package/test/integration/adapterTestConnectivity.js +0 -24
- package/test/integration/adapterTestIntegration.js +11 -7
- package/test/unit/adapterTestUnit.js +15 -11
package/AUTH.md
CHANGED
|
@@ -13,7 +13,7 @@ STEPS
|
|
|
13
13
|
3. Use the properties below for the ```properties.authentication``` field
|
|
14
14
|
```json
|
|
15
15
|
"authentication": {
|
|
16
|
-
"auth_method": "
|
|
16
|
+
"auth_method": "static_token",
|
|
17
17
|
"token": "statictoken",
|
|
18
18
|
"token_timeout": 1800000,
|
|
19
19
|
"token_cache": "local",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 0.4.3 [08-28-2024]
|
|
3
|
+
|
|
4
|
+
* update dependencies and metadata
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapters/adapter-jenkins!13
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0.4.2 [08-14-2024]
|
|
11
|
+
|
|
12
|
+
* Changes made at 2024.08.14_19:28PM
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/adapter-jenkins!12
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 0.4.1 [08-07-2024]
|
|
3
19
|
|
|
4
20
|
* Changes made at 2024.08.06_21:31PM
|
package/TAB2.md
CHANGED
|
@@ -24,7 +24,7 @@ STEPS
|
|
|
24
24
|
3. Use the properties below for the ```properties.authentication``` field
|
|
25
25
|
```json
|
|
26
26
|
"authentication": {
|
|
27
|
-
"auth_method": "
|
|
27
|
+
"auth_method": "static_token",
|
|
28
28
|
"token": "statictoken",
|
|
29
29
|
"token_timeout": 1800000,
|
|
30
30
|
"token_cache": "local",
|
|
@@ -54,7 +54,7 @@ Sample Properties can be used to help you configure the adapter in the Itential
|
|
|
54
54
|
|
|
55
55
|
```json
|
|
56
56
|
"properties": {
|
|
57
|
-
"host": "
|
|
57
|
+
"host": "localhost",
|
|
58
58
|
"port": 443,
|
|
59
59
|
"choosepath": "",
|
|
60
60
|
"base_path": "/",
|
|
@@ -66,10 +66,10 @@ Sample Properties can be used to help you configure the adapter in the Itential
|
|
|
66
66
|
"stub": true,
|
|
67
67
|
"protocol": "https",
|
|
68
68
|
"authentication": {
|
|
69
|
-
"auth_method": "
|
|
69
|
+
"auth_method": "static_token",
|
|
70
70
|
"username": "username",
|
|
71
71
|
"password": "password",
|
|
72
|
-
"token": "
|
|
72
|
+
"token": "token",
|
|
73
73
|
"token_timeout": 1800000,
|
|
74
74
|
"token_cache": "local",
|
|
75
75
|
"invalid_token_error": 401,
|
package/metadata.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapter-jenkins",
|
|
3
3
|
"webName": "Adapter for Integration to Jenkins",
|
|
4
|
+
"supportLevel": "community",
|
|
4
5
|
"vendor": "Jenkins",
|
|
5
6
|
"product": "Jenkins",
|
|
7
|
+
"techAlliance": false,
|
|
6
8
|
"osVersion": [],
|
|
7
9
|
"apiVersions": [],
|
|
8
10
|
"iapVersions": [
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"storeLink": "",
|
|
37
39
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-jenkins",
|
|
38
40
|
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-jenkins",
|
|
39
|
-
"docLink": "https://
|
|
41
|
+
"docLink": "https://gitlab.com/itentialopensource/adapters/adapter-jenkins/-/blob/master/README.md?ref_type=heads",
|
|
40
42
|
"demoLinks": [],
|
|
41
43
|
"trainingLinks": [
|
|
42
44
|
{
|
|
@@ -56,7 +58,9 @@
|
|
|
56
58
|
"link": "https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API",
|
|
57
59
|
"public": true
|
|
58
60
|
}
|
|
59
|
-
]
|
|
61
|
+
],
|
|
62
|
+
"workshopLinks": [],
|
|
63
|
+
"workshopHomePage": "https://www.itential.com/get-started/"
|
|
60
64
|
},
|
|
61
65
|
"assets": [],
|
|
62
66
|
"relatedItems": {
|
|
@@ -66,6 +70,5 @@
|
|
|
66
70
|
"workflowProjects": [],
|
|
67
71
|
"transformationProjects": [],
|
|
68
72
|
"exampleProjects": []
|
|
69
|
-
}
|
|
70
|
-
"supportLevel": "community"
|
|
73
|
+
}
|
|
71
74
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-jenkins",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "This adapter integrates with system described as: jenkins.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.
|
|
7
|
+
"engineVersion": "1.68.2",
|
|
8
8
|
"adapterType": "http",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
"author": "Itential",
|
|
54
54
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-jenkins#readme",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
56
|
+
"@itentialopensource/adapter-utils": "^5.7.0",
|
|
57
57
|
"acorn": "^8.12.1",
|
|
58
58
|
"ajv": "^8.17.1",
|
|
59
|
-
"axios": "^1.7.
|
|
59
|
+
"axios": "^1.7.4",
|
|
60
60
|
"commander": "^11.0.0",
|
|
61
61
|
"dns-lookup-promise": "^1.0.4",
|
|
62
62
|
"fs-extra": "^11.2.0",
|
|
63
63
|
"json-query": "^2.2.2",
|
|
64
|
-
"mocha": "^10.7.
|
|
64
|
+
"mocha": "^10.7.3",
|
|
65
65
|
"mocha-param": "^2.0.1",
|
|
66
66
|
"mongodb": "^4.16.0",
|
|
67
67
|
"ping": "^0.4.4",
|
|
68
68
|
"prompts": "^2.4.2",
|
|
69
69
|
"readline-sync": "^1.4.10",
|
|
70
70
|
"semver": "^7.6.3",
|
|
71
|
-
"winston": "^3.
|
|
71
|
+
"winston": "^3.14.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"chai": "^4.3.7",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.4.2",
|
|
3
3
|
"configLines": 3050,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 2506,
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
6
|
+
"testLines": 3509,
|
|
7
|
+
"testCases": 162,
|
|
8
|
+
"totalCodeLines": 7798,
|
|
9
9
|
"wfTasks": 30
|
|
10
10
|
}
|
package/sampleProperties.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "Adapter-jenkins",
|
|
3
3
|
"properties": {
|
|
4
|
-
"host": "
|
|
4
|
+
"host": "localhost",
|
|
5
5
|
"port": 443,
|
|
6
6
|
"choosepath": "",
|
|
7
7
|
"base_path": "/",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"stub": true,
|
|
14
14
|
"protocol": "https",
|
|
15
15
|
"authentication": {
|
|
16
|
-
"auth_method": "
|
|
16
|
+
"auth_method": "static_token",
|
|
17
17
|
"username": "username",
|
|
18
18
|
"password": "password",
|
|
19
|
-
"token": "
|
|
19
|
+
"token": "token",
|
|
20
20
|
"token_timeout": 1800000,
|
|
21
21
|
"token_cache": "local",
|
|
22
22
|
"invalid_token_error": 401,
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"ostypePrefix": "meraki-",
|
|
133
133
|
"port": "{port}",
|
|
134
134
|
"ipaddress": "{ip_addr}",
|
|
135
|
-
"serial"
|
|
135
|
+
"serial": "{serial}"
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
],
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"ostypePrefix": "meraki-",
|
|
159
159
|
"port": "{port}",
|
|
160
160
|
"ipaddress": "{ip_addr}",
|
|
161
|
-
"serial"
|
|
161
|
+
"serial": "{serial}",
|
|
162
162
|
"id": "{myid}"
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
"ostypePrefix": "meraki-",
|
|
243
243
|
"port": "{port}",
|
|
244
244
|
"ipaddress": "{ip_addr}",
|
|
245
|
-
"serial"
|
|
245
|
+
"serial": "{serial}",
|
|
246
246
|
"id": "{myid}"
|
|
247
247
|
}
|
|
248
248
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
/* eslint no-unused-vars: warn */
|
|
5
5
|
|
|
6
6
|
const assert = require('assert');
|
|
7
|
-
const http = require('http');
|
|
8
7
|
const https = require('https');
|
|
9
8
|
const mocha = require('mocha');
|
|
10
9
|
const ping = require('ping');
|
|
@@ -53,29 +52,6 @@ describe('[integration] Adapter Test', () => {
|
|
|
53
52
|
});
|
|
54
53
|
});
|
|
55
54
|
|
|
56
|
-
it('Support HTTP on port 80', (done) => {
|
|
57
|
-
const requestOptions = {
|
|
58
|
-
host,
|
|
59
|
-
port: 80,
|
|
60
|
-
method: 'HEAD'
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const req = http.request(requestOptions, (res) => {
|
|
64
|
-
try {
|
|
65
|
-
assert.ok(res.statusCode >= 200 && res.statusCode < 400);
|
|
66
|
-
done();
|
|
67
|
-
} catch (error) {
|
|
68
|
-
done(error);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
req.on('error', (err) => {
|
|
73
|
-
done(err);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
req.end();
|
|
77
|
-
});
|
|
78
|
-
|
|
79
55
|
it('Support HTTPS on port 443', (done) => {
|
|
80
56
|
const requestOptions = {
|
|
81
57
|
host,
|
|
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
|
36
36
|
// these variables can be changed to run in integrated mode so easier to set them here
|
|
37
37
|
// always check these in with bogus data!!!
|
|
38
38
|
samProps.stub = true;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
samProps.
|
|
42
|
-
samProps.
|
|
43
|
-
samProps.
|
|
44
|
-
samProps.
|
|
45
|
-
samProps.
|
|
39
|
+
|
|
40
|
+
// uncomment if connecting
|
|
41
|
+
// samProps.host = 'replace.hostorip.here';
|
|
42
|
+
// samProps.authentication.username = 'username';
|
|
43
|
+
// samProps.authentication.password = 'password';
|
|
44
|
+
// samProps.authentication.token = 'password';
|
|
45
|
+
// samProps.protocol = 'http';
|
|
46
|
+
// samProps.port = 80;
|
|
47
|
+
// samProps.ssl.enabled = false;
|
|
48
|
+
// samProps.ssl.accept_invalid_cert = false;
|
|
49
|
+
|
|
46
50
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
51
|
samProps.request.attempt_timeout = 30000;
|
|
48
52
|
}
|
|
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
|
36
36
|
// these variables can be changed to run in integrated mode so easier to set them here
|
|
37
37
|
// always check these in with bogus data!!!
|
|
38
38
|
samProps.stub = true;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
samProps.
|
|
42
|
-
samProps.
|
|
43
|
-
samProps.
|
|
44
|
-
samProps.
|
|
45
|
-
samProps.
|
|
39
|
+
|
|
40
|
+
// uncomment if connecting
|
|
41
|
+
// samProps.host = 'replace.hostorip.here';
|
|
42
|
+
// samProps.authentication.username = 'username';
|
|
43
|
+
// samProps.authentication.password = 'password';
|
|
44
|
+
// samProps.authentication.token = 'password';
|
|
45
|
+
// samProps.protocol = 'http';
|
|
46
|
+
// samProps.port = 80;
|
|
47
|
+
// samProps.ssl.enabled = false;
|
|
48
|
+
// samProps.ssl.accept_invalid_cert = false;
|
|
49
|
+
|
|
46
50
|
samProps.request.attempt_timeout = 1200000;
|
|
47
51
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
48
52
|
const { stub } = samProps;
|
|
@@ -315,15 +319,15 @@ describe('[unit] Jenkins Adapter Test', () => {
|
|
|
315
319
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
316
320
|
assert.notEqual('', packageDotJson.dependencies);
|
|
317
321
|
assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
|
|
318
|
-
assert.equal('^1.7.
|
|
322
|
+
assert.equal('^1.7.4', packageDotJson.dependencies.axios);
|
|
319
323
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
320
324
|
assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
|
|
321
|
-
assert.equal('^10.7.
|
|
325
|
+
assert.equal('^10.7.3', packageDotJson.dependencies.mocha);
|
|
322
326
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
323
327
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
324
328
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
325
329
|
assert.equal('^7.6.3', packageDotJson.dependencies.semver);
|
|
326
|
-
assert.equal('^3.
|
|
330
|
+
assert.equal('^3.14.2', packageDotJson.dependencies.winston);
|
|
327
331
|
done();
|
|
328
332
|
} catch (error) {
|
|
329
333
|
log.error(`Test Failure: ${error}`);
|
|
@@ -561,7 +565,7 @@ describe('[unit] Jenkins Adapter Test', () => {
|
|
|
561
565
|
log.error(`Adapter Exception: ${error}`);
|
|
562
566
|
done(error);
|
|
563
567
|
}
|
|
564
|
-
});
|
|
568
|
+
}).timeout(attemptTimeout);
|
|
565
569
|
});
|
|
566
570
|
|
|
567
571
|
describe('propertiesSchema.json', () => {
|