@itentialopensource/adapter-jenkins 0.1.7 → 0.3.0

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.
Files changed (59) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +199 -0
  4. package/CHANGELOG.md +32 -20
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +235 -576
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +381 -262
  14. package/adapterBase.js +854 -408
  15. package/changelogs/changelog.md +60 -0
  16. package/entities/.generic/action.json +105 -0
  17. package/entities/.generic/schema.json +6 -1
  18. package/error.json +6 -0
  19. package/metadata.json +49 -0
  20. package/package.json +27 -22
  21. package/pronghorn.json +691 -88
  22. package/propertiesDecorators.json +14 -0
  23. package/propertiesSchema.json +827 -6
  24. package/refs?service=git-upload-pack +0 -0
  25. package/report/adapter-openapi.json +283 -0
  26. package/report/adapter-openapi.yaml +199 -0
  27. package/report/adapterInfo.json +10 -0
  28. package/report/updateReport1653183591077.json +120 -0
  29. package/report/updateReport1691507745232.json +120 -0
  30. package/report/updateReport1692202738085.json +120 -0
  31. package/report/updateReport1694455436235.json +120 -0
  32. package/report/updateReport1694457490029.json +120 -0
  33. package/report/updateReport1694463089408.json +120 -0
  34. package/report/updateReport1698421354015.json +120 -0
  35. package/sampleProperties.json +153 -3
  36. package/test/integration/adapterTestBasicGet.js +3 -5
  37. package/test/integration/adapterTestConnectivity.js +91 -42
  38. package/test/integration/adapterTestIntegration.js +155 -103
  39. package/test/unit/adapterBaseTestUnit.js +388 -308
  40. package/test/unit/adapterTestUnit.js +479 -241
  41. package/utils/adapterInfo.js +206 -0
  42. package/utils/addAuth.js +94 -0
  43. package/utils/artifactize.js +1 -1
  44. package/utils/basicGet.js +1 -14
  45. package/utils/checkMigrate.js +1 -1
  46. package/utils/entitiesToDB.js +179 -0
  47. package/utils/findPath.js +1 -1
  48. package/utils/methodDocumentor.js +273 -0
  49. package/utils/modify.js +14 -16
  50. package/utils/packModificationScript.js +1 -1
  51. package/utils/patches2bundledDeps.js +90 -0
  52. package/utils/pre-commit.sh +5 -0
  53. package/utils/removeHooks.js +20 -0
  54. package/utils/taskMover.js +309 -0
  55. package/utils/tbScript.js +129 -53
  56. package/utils/tbUtils.js +125 -25
  57. package/utils/testRunner.js +17 -17
  58. package/utils/troubleshootingAdapter.js +10 -31
  59. package/workflows/README.md +0 -3
@@ -0,0 +1,60 @@
1
+
2
+ ## 0.2.0 [05-22-2022]
3
+
4
+ * Migration to the latest Adapter Foundation
5
+
6
+ See merge request itentialopensource/adapters/devops-netops/adapter-jenkins!5
7
+
8
+ ---
9
+
10
+ ## 0.1.7 [08-04-2021]
11
+
12
+ - Redo the add of generic path vars
13
+
14
+ See merge request itentialopensource/adapters/devops-netops/adapter-jenkins!4
15
+
16
+ ---
17
+
18
+ ## 0.1.6 [08-04-2021]
19
+
20
+ - Add more path variables on generic requests
21
+
22
+ See merge request itentialopensource/adapters/devops-netops/adapter-jenkins!3
23
+
24
+ ---
25
+
26
+ ## 0.1.5 [03-07-2021]
27
+
28
+ - Migration to bring up to the latest foundation
29
+ - Change to .eslintignore (adapter_modification directory)
30
+ - Change to README.md (new properties, new scripts, new processes)
31
+ - Changes to adapterBase.js (new methods)
32
+ - Changes to package.json (new scripts, dependencies)
33
+ - Changes to propertiesSchema.json (new properties and changes to existing)
34
+ - Changes to the Unit test
35
+ - Adding several test files, utils files and .generic entity
36
+ - Fix order of scripts and dependencies in package.json
37
+ - Fix order of properties in propertiesSchema.json
38
+ - Update sampleProperties, unit and integration tests to have all new properties.
39
+ - Add all new calls to adapter.js and pronghorn.json
40
+ - Add suspend piece to older methods
41
+
42
+ See merge request itentialopensource/adapters/devops-netops/adapter-jenkins!2
43
+
44
+ ---
45
+
46
+ ## 0.1.4 [07-08-2020]
47
+
48
+ - Update to the latest adapter foundation
49
+
50
+ See merge request itentialopensource/adapters/devops-netops/adapter-jenkins!1
51
+
52
+ ---
53
+
54
+ ## 0.1.3 [01-09-2020] & 0.1.2 [11-22-2019] & 0.1.1 [11-22-2019]
55
+
56
+ - Initial Commit
57
+
58
+ See commit 13722dd
59
+
60
+ ---
@@ -104,6 +104,111 @@
104
104
  "mockFile": ""
105
105
  }
106
106
  ]
107
+ },
108
+ {
109
+ "name": "getGenericsNoBase",
110
+ "protocol": "REST",
111
+ "method": "GET",
112
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
113
+ "requestSchema": "schema.json",
114
+ "responseSchema": "schema.json",
115
+ "timeout": 0,
116
+ "sendEmpty": false,
117
+ "sendGetBody": false,
118
+ "requestDatatype": "JSON",
119
+ "responseDatatype": "JSON",
120
+ "headers": {},
121
+ "responseObjects": [
122
+ {
123
+ "type": "default",
124
+ "key": "",
125
+ "mockFile": ""
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "name": "createGenericNoBase",
131
+ "protocol": "REST",
132
+ "method": "POST",
133
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
134
+ "requestSchema": "schema.json",
135
+ "responseSchema": "schema.json",
136
+ "timeout": 0,
137
+ "sendEmpty": false,
138
+ "sendGetBody": false,
139
+ "requestDatatype": "JSON",
140
+ "responseDatatype": "JSON",
141
+ "headers": {},
142
+ "responseObjects": [
143
+ {
144
+ "type": "default",
145
+ "key": "",
146
+ "mockFile": ""
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "name": "updateGenericNoBase",
152
+ "protocol": "REST",
153
+ "method": "PUT",
154
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
155
+ "requestSchema": "schema.json",
156
+ "responseSchema": "schema.json",
157
+ "timeout": 0,
158
+ "sendEmpty": false,
159
+ "sendGetBody": false,
160
+ "requestDatatype": "JSON",
161
+ "responseDatatype": "JSON",
162
+ "headers": {},
163
+ "responseObjects": [
164
+ {
165
+ "type": "default",
166
+ "key": "",
167
+ "mockFile": ""
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "name": "patchGenericNoBase",
173
+ "protocol": "REST",
174
+ "method": "PATCH",
175
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
176
+ "requestSchema": "schema.json",
177
+ "responseSchema": "schema.json",
178
+ "timeout": 0,
179
+ "sendEmpty": false,
180
+ "sendGetBody": false,
181
+ "requestDatatype": "JSON",
182
+ "responseDatatype": "JSON",
183
+ "headers": {},
184
+ "responseObjects": [
185
+ {
186
+ "type": "default",
187
+ "key": "",
188
+ "mockFile": ""
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ "name": "deleteGenericNoBase",
194
+ "protocol": "REST",
195
+ "method": "DELETE",
196
+ "entitypath": "/{pathv1}/{pathv2}/{pathv3}/{pathv4}/{pathv5}/{pathv6}/{pathv7}/{pathv8}/{pathv9}/{pathv10}/{pathv11}/{pathv12}/{pathv13}/{pathv14}/{pathv15}/{pathv16}/{pathv17}/{pathv18}/{pathv19}/{pathv20}?{query}",
197
+ "requestSchema": "schema.json",
198
+ "responseSchema": "schema.json",
199
+ "timeout": 0,
200
+ "sendEmpty": false,
201
+ "sendGetBody": false,
202
+ "requestDatatype": "JSON",
203
+ "responseDatatype": "JSON",
204
+ "headers": {},
205
+ "responseObjects": [
206
+ {
207
+ "type": "default",
208
+ "key": "",
209
+ "mockFile": ""
210
+ }
211
+ ]
107
212
  }
108
213
  ]
109
214
  }
@@ -14,7 +14,12 @@
14
14
  "createGeneric",
15
15
  "updateGeneric",
16
16
  "patchGeneric",
17
- "deleteGeneric"
17
+ "deleteGeneric",
18
+ "getGenericsNoBase",
19
+ "createGenericNoBase",
20
+ "updateGenericNoBase",
21
+ "patchGenericNoBase",
22
+ "deleteGenericNoBase"
18
23
  ],
19
24
  "external_name": "ph_request_type"
20
25
  }
package/error.json CHANGED
@@ -96,6 +96,12 @@
96
96
  "displayString": "Invalid properties: $VARIABLE$",
97
97
  "recommendation": "Verify the properties for the adapter"
98
98
  },
99
+ {
100
+ "key": "Missing Properties",
101
+ "icode": "AD.306",
102
+ "displayString": "Property $VARIABLE$ is required",
103
+ "recommendation": "Please provide the required property"
104
+ },
99
105
  {
100
106
  "key": "Query Not Translated",
101
107
  "icode": "AD.310",
package/metadata.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "adapter-jenkins",
3
+ "webName": "Adapter for Integration to Jenkins",
4
+ "vendor": "Jenkins",
5
+ "product": "Jenkins",
6
+ "osVersion": [],
7
+ "apiVersions": [],
8
+ "iapVersions": [
9
+ "2021.1.x",
10
+ "2021.2.x",
11
+ "2022.1.x",
12
+ "2023.1.x"
13
+ ],
14
+ "method": "REST",
15
+ "type": "Adapter",
16
+ "domains": [
17
+ "CI/CD"
18
+ ],
19
+ "tags": [],
20
+ "useCases": [],
21
+ "deprecated": {
22
+ "isDeprecated": false
23
+ },
24
+ "brokerSince": "",
25
+ "documentation": {
26
+ "storeLink": "",
27
+ "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-jenkins",
28
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-jenkins",
29
+ "docLink": "https://docs.itential.com/opensource/docs/jenkins",
30
+ "demoLinks": [],
31
+ "trainingLinks": [],
32
+ "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
33
+ "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
34
+ "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
35
+ "webLink": "https://www.itential.com/adapters/jenkins/",
36
+ "vendorLink": "",
37
+ "productLink": "",
38
+ "apiLinks": []
39
+ },
40
+ "assets": [],
41
+ "relatedItems": {
42
+ "adapters": [],
43
+ "integrations": [],
44
+ "ecosystemApplications": [],
45
+ "workflowProjects": [],
46
+ "transformationProjects": [],
47
+ "exampleProjects": []
48
+ }
49
+ }
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-jenkins",
3
- "version": "0.1.7",
3
+ "version": "0.3.0",
4
4
  "description": "This adapter integrates with system described as: jenkins.",
5
5
  "main": "adapter.js",
6
- "wizardVersion": "2.44.0",
7
- "engineVersion": "1.59.30",
6
+ "wizardVersion": "2.44.7",
7
+ "engineVersion": "1.67.14",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
11
11
  "preinstall": "node utils/setup.js",
12
+ "deinstall": "node utils/removeHooks.js",
12
13
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
13
14
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
14
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -16,17 +17,17 @@
16
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
17
18
  "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
18
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
19
- "adapter:install": "node utils/tbScript.js install",
20
+ "adapter:install": "npm i && node utils/tbScript.js install",
20
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
21
22
  "adapter:findPath": "node utils/findPath.js",
22
23
  "adapter:migrate": "node utils/modify.js -m",
23
24
  "adapter:update": "node utils/modify.js -u",
24
25
  "adapter:revert": "node utils/modify.js -r",
25
- "troubleshoot": "node utils/tbScript.js",
26
+ "troubleshoot": "node utils/tbScript.js troubleshoot",
26
27
  "healthcheck": "node utils/tbScript.js healthcheck",
27
28
  "basicget": "node utils/tbScript.js basicget",
28
29
  "connectivity": "node utils/tbScript.js connectivity",
29
- "deploy": "npm publish --registry=http://registry.npmjs.org --access=public",
30
+ "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
30
31
  "build": "npm run deploy"
31
32
  },
32
33
  "keywords": [
@@ -53,27 +54,31 @@
53
54
  "author": "Itential",
54
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-jenkins#readme",
55
56
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^4.44.2",
57
- "ajv": "^6.12.0",
58
- "axios": "^0.21.0",
59
- "commander": "^2.20.0",
60
- "fs-extra": "^8.1.0",
61
- "mocha": "^9.0.1",
57
+ "@itentialopensource/adapter-utils": "^5.3.0",
58
+ "acorn": "^8.10.0",
59
+ "ajv": "^8.12.0",
60
+ "axios": "^1.6.3",
61
+ "commander": "^11.0.0",
62
+ "dns-lookup-promise": "^1.0.4",
63
+ "fs-extra": "^11.1.1",
64
+ "json-query": "^2.2.2",
65
+ "mocha": "^10.2.0",
62
66
  "mocha-param": "^2.0.1",
63
- "network-diagnostics": "^0.5.3",
67
+ "mongodb": "^4.16.0",
64
68
  "nyc": "^15.1.0",
69
+ "ping": "^0.4.4",
70
+ "prompts": "^2.4.2",
65
71
  "readline-sync": "^1.4.10",
66
- "semver": "^7.3.2",
67
- "winston": "^3.3.3"
72
+ "semver": "^7.5.3",
73
+ "winston": "^3.9.0"
68
74
  },
69
75
  "devDependencies": {
70
- "chai": "^4.3.4",
71
- "eslint": "^7.29.0",
72
- "eslint-config-airbnb-base": "^14.2.1",
73
- "eslint-plugin-import": "^2.23.4",
74
- "eslint-plugin-json": "^3.0.0",
75
- "package-json-validator": "^0.6.3",
76
- "testdouble": "^3.16.1"
76
+ "chai": "^4.3.7",
77
+ "eslint": "^8.44.0",
78
+ "eslint-config-airbnb-base": "^15.0.0",
79
+ "eslint-plugin-import": "^2.27.5",
80
+ "eslint-plugin-json": "^3.1.0",
81
+ "testdouble": "^3.18.0"
77
82
  },
78
83
  "private": false
79
84
  }