cdk8s-jenkins 0.0.1 → 0.0.4

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/.gitattributes CHANGED
@@ -4,6 +4,7 @@
4
4
  /.eslintrc.json linguist-generated
5
5
  /.gitattributes linguist-generated
6
6
  /.github/pull_request_template.md linguist-generated
7
+ /.github/workflows/auto-approve.yml linguist-generated
7
8
  /.github/workflows/build.yml linguist-generated
8
9
  /.github/workflows/pull-request-lint.yml linguist-generated
9
10
  /.github/workflows/release.yml linguist-generated
package/.jsii CHANGED
@@ -67,7 +67,7 @@
67
67
  "stability": "stable"
68
68
  },
69
69
  "homepage": "https://github.com/cdk8s-team/cdk8s-jenkins",
70
- "jsiiVersion": "1.59.0 (build eb02c92)",
70
+ "jsiiVersion": "1.62.0 (build 293ac17)",
71
71
  "keywords": [
72
72
  "cdk"
73
73
  ],
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "name": "cdk8s-jenkins",
84
84
  "readme": {
85
- "markdown": "# This library is currently under development. Stay tuned!"
85
+ "markdown": "# cdk8s-jenkins\n`cdk8s-jenkins` is a library that lets you easily define a manifest for deploying a Jenkins instance to your Kubernetes cluster.\n\n## Prerequisites\nThis library uses a Custom Resource Definition provided by jenkins, and thus requires both the CRD and the operator to be installed on the cluster.\nYou can set this up by,\n1. Apply the Custom Resource Definition(CRD) for jenkins on your Kubernetes cluster.\n```\nkubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml\n```\n2. Install the Jenkins Operator on your Kubernetes cluster.\n```\nkubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml\n```\n\n> For more information regarding applying jenkins crd and installing jenkins operator, please refer [jenkins official documentaion](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/installing-the-operator/).\n\n## Usage\nThe library provides a high level `Jenkins` construct to provision a Jenkins instance.\nYou can just instantiate the Jenkins instance and that would add a Jenkins resource to the kubernetes manifest.\n\nThe library provide a set of defaults, so provisioning a basic Jenkins instance requires no configuration:\n\n```ts\nimport { Jenkins } from 'cdk8s-jenkins';\n\n// inside your chart:\nconst jenkins = new Jenkins(this, 'my-jenkins');\n```\n\nThe library also enables configuring the following parmeters for the Jenkins instance:\n### metadata\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins', {\n metadata: {\n namespace: 'jenkins-namespace',\n labels: { customApp: 'my-jenkins' },\n },\n});\n```\n### disableCsrfProtection\nThis allows you to toggle CSRF Protection for Jenkins.\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins', {\n disableCsrfProtection: true,\n});\n```\n### basePlugins\nThese are the plugins required by the jenkins operator.\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins', {\n basePlugins: [{\n name: 'configuration-as-code',\n version: '1.55',\n }],\n});\n\n```\n\nYou can also utilize `addBasePlugins` function to add base plugins to jenkins configuration after initialization.\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins');\njenkins.addBasePlugins([{\n name: 'workflow-api',\n version: '2.76',\n}]);\n```\n\n### plugins\nThese are the plugins that you can add to your jenkins instance.\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins', {\n plugins: [{\n name: 'simple-theme-plugin',\n version: '0.7',\n }],\n});\n```\nYou can also utilize `addPlugins` function to add plugins to jenkins configuration after initialization.\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins');\njenkins.addPlugins([{\n name: 'simple-theme-plugin',\n version: '0.7',\n}]);\n```\n\n### seedJobs\nYou can define list of jenkins seed job configurations here. For more info you can take look at [jenkins documentation](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/).\n\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins', {\n seedJobs: [{\n id: 'jenkins-operator',\n targets: 'cicd/jobs/*.jenkins',\n description: 'Jenkins Operator repository',\n repositoryBranch: 'master',\n repositoryUrl: 'https://github.com/jenkinsci/kubernetes-operator.git',\n }],\n});\n```\nYou can also utilize `addSeedJobs` function to add seed jobs to jenkins configuration after initialization.\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins');\njenkins.addSeedJobs([{\n id: 'jenkins-operator',\n targets: 'cicd/jobs/*.jenkins',\n description: 'Jenkins Operator repository',\n repositoryBranch: 'master',\n repositoryUrl: 'https://github.com/jenkinsci/kubernetes-operator.git',\n}]);\n```\n\n## Using escape hatches\n\nYou can utilize escape hatches to make changes to the configurations that are not yet exposed by the library.\n\nFor instance, if you would like to update the version of a base plugin:\n\n```ts\nconst jenkins = new Jenkins(this, 'my-jenkins');\nconst jenkinsApiObject = ApiObject.of(jenkins);\njenkinsApiObject.addJsonPatch(JsonPatch.replace('/spec/master/basePlugins/1', {\n name: 'workflow-job',\n version: '3.00',\n}));\n```\n\nFor more information regarding escape hatches, take a look at [cdk8s documentation](https://cdk8s.io/docs/latest/concepts/escape-hatches/).\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more\ninformation.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n"
86
86
  },
87
87
  "repository": {
88
88
  "type": "git",
@@ -110,43 +110,419 @@
110
110
  }
111
111
  },
112
112
  "types": {
113
- "cdk8s-jenkins.Hello": {
113
+ "cdk8s-jenkins.Jenkins": {
114
114
  "assembly": "cdk8s-jenkins",
115
+ "base": "constructs.Construct",
115
116
  "docs": {
116
- "stability": "stable"
117
+ "stability": "stable",
118
+ "summary": "A jenkins instance."
117
119
  },
118
- "fqn": "cdk8s-jenkins.Hello",
120
+ "fqn": "cdk8s-jenkins.Jenkins",
119
121
  "initializer": {
120
122
  "docs": {
121
123
  "stability": "stable"
122
- }
124
+ },
125
+ "locationInModule": {
126
+ "filename": "src/jenkins.ts",
127
+ "line": 118
128
+ },
129
+ "parameters": [
130
+ {
131
+ "name": "scope",
132
+ "type": {
133
+ "fqn": "constructs.Construct"
134
+ }
135
+ },
136
+ {
137
+ "name": "id",
138
+ "type": {
139
+ "primitive": "string"
140
+ }
141
+ },
142
+ {
143
+ "name": "props",
144
+ "optional": true,
145
+ "type": {
146
+ "fqn": "cdk8s-jenkins.JenkinsProps"
147
+ }
148
+ }
149
+ ]
123
150
  },
124
151
  "kind": "class",
125
152
  "locationInModule": {
126
- "filename": "src/index.ts",
127
- "line": 1
153
+ "filename": "src/jenkins.ts",
154
+ "line": 113
128
155
  },
129
156
  "methods": [
130
157
  {
131
158
  "docs": {
132
- "stability": "stable"
159
+ "stability": "stable",
160
+ "summary": "Add base plugins to jenkins instance."
133
161
  },
134
162
  "locationInModule": {
135
- "filename": "src/index.ts",
136
- "line": 2
163
+ "filename": "src/jenkins.ts",
164
+ "line": 211
137
165
  },
138
- "name": "sayHello",
139
- "returns": {
140
- "type": {
141
- "primitive": "string"
166
+ "name": "addBasePlugins",
167
+ "parameters": [
168
+ {
169
+ "docs": {
170
+ "summary": "List of base plugins."
171
+ },
172
+ "name": "basePlugins",
173
+ "type": {
174
+ "fqn": "cdk8s-jenkins.Plugin"
175
+ },
176
+ "variadic": true
177
+ }
178
+ ],
179
+ "variadic": true
180
+ },
181
+ {
182
+ "docs": {
183
+ "stability": "stable",
184
+ "summary": "Add custom plugins to jenkins instance."
185
+ },
186
+ "locationInModule": {
187
+ "filename": "src/jenkins.ts",
188
+ "line": 221
189
+ },
190
+ "name": "addPlugins",
191
+ "parameters": [
192
+ {
193
+ "docs": {
194
+ "summary": "List of custom plugins."
195
+ },
196
+ "name": "plugins",
197
+ "type": {
198
+ "fqn": "cdk8s-jenkins.Plugin"
199
+ },
200
+ "variadic": true
201
+ }
202
+ ],
203
+ "variadic": true
204
+ },
205
+ {
206
+ "docs": {
207
+ "stability": "stable",
208
+ "summary": "Add seed jobs to jenkins instance."
209
+ },
210
+ "locationInModule": {
211
+ "filename": "src/jenkins.ts",
212
+ "line": 229
213
+ },
214
+ "name": "addSeedJobs",
215
+ "parameters": [
216
+ {
217
+ "docs": {
218
+ "summary": "List of seed jobs."
219
+ },
220
+ "name": "seedJobs",
221
+ "type": {
222
+ "fqn": "cdk8s-jenkins.SeedJob"
223
+ },
224
+ "variadic": true
225
+ }
226
+ ],
227
+ "variadic": true
228
+ }
229
+ ],
230
+ "name": "Jenkins",
231
+ "symbolId": "src/jenkins:Jenkins"
232
+ },
233
+ "cdk8s-jenkins.JenkinsProps": {
234
+ "assembly": "cdk8s-jenkins",
235
+ "datatype": true,
236
+ "docs": {
237
+ "stability": "stable",
238
+ "summary": "Props for `Jenkins`."
239
+ },
240
+ "fqn": "cdk8s-jenkins.JenkinsProps",
241
+ "kind": "interface",
242
+ "locationInModule": {
243
+ "filename": "src/jenkins.ts",
244
+ "line": 60
245
+ },
246
+ "name": "JenkinsProps",
247
+ "properties": [
248
+ {
249
+ "abstract": true,
250
+ "docs": {
251
+ "default": "- Default base plugins:\n\n { name: 'kubernetes', version: '1.31.3' },\n { name: 'workflow-job', version: '1145.v7f2433caa07f' },\n { name: 'workflow-aggregator', version: '2.6' },\n { name: 'git', version: '4.10.3' },\n { name: 'job-dsl', version: '1.78.1' },\n { name: 'configuration-as-code', version: '1414.v878271fc496f' },\n { name: 'kubernetes-credentials-provider', version: '0.20' }",
252
+ "stability": "stable",
253
+ "summary": "List of plugins required by Jenkins operator."
254
+ },
255
+ "immutable": true,
256
+ "locationInModule": {
257
+ "filename": "src/jenkins.ts",
258
+ "line": 94
259
+ },
260
+ "name": "basePlugins",
261
+ "optional": true,
262
+ "type": {
263
+ "collection": {
264
+ "elementtype": {
265
+ "fqn": "cdk8s-jenkins.Plugin"
266
+ },
267
+ "kind": "array"
268
+ }
269
+ }
270
+ },
271
+ {
272
+ "abstract": true,
273
+ "docs": {
274
+ "default": "- false",
275
+ "stability": "stable",
276
+ "summary": "Toggle for CSRF Protection on Jenkins resource."
277
+ },
278
+ "immutable": true,
279
+ "locationInModule": {
280
+ "filename": "src/jenkins.ts",
281
+ "line": 80
282
+ },
283
+ "name": "disableCsrfProtection",
284
+ "optional": true,
285
+ "type": {
286
+ "primitive": "boolean"
287
+ }
288
+ },
289
+ {
290
+ "abstract": true,
291
+ "docs": {
292
+ "default": ": Default metadata values:\n {\n name: An app-unique name generated by the chart,\n annotations: No annotations,\n labels: { app: 'jenkins' },\n namespace: default,\n finalizers: No finalizers,\n ownerReferences: Automatically set by Kubernetes\n }",
293
+ "stability": "stable",
294
+ "summary": "Metadata associated with Jenkins resource."
295
+ },
296
+ "immutable": true,
297
+ "locationInModule": {
298
+ "filename": "src/jenkins.ts",
299
+ "line": 74
300
+ },
301
+ "name": "metadata",
302
+ "optional": true,
303
+ "type": {
304
+ "fqn": "cdk8s.ApiObjectMetadata"
305
+ }
306
+ },
307
+ {
308
+ "abstract": true,
309
+ "docs": {
310
+ "default": "- []",
311
+ "stability": "stable",
312
+ "summary": "List of custom plugins applied to Jenkins resource."
313
+ },
314
+ "immutable": true,
315
+ "locationInModule": {
316
+ "filename": "src/jenkins.ts",
317
+ "line": 100
318
+ },
319
+ "name": "plugins",
320
+ "optional": true,
321
+ "type": {
322
+ "collection": {
323
+ "elementtype": {
324
+ "fqn": "cdk8s-jenkins.Plugin"
325
+ },
326
+ "kind": "array"
142
327
  }
143
328
  }
329
+ },
330
+ {
331
+ "abstract": true,
332
+ "docs": {
333
+ "default": "- No seed jobs",
334
+ "remarks": "For more information about seed jobs, please take a look at { @link https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL Jenkins Seed Jobs Documentation }.",
335
+ "stability": "stable",
336
+ "summary": "List of seed job configuration for Jenkins resource."
337
+ },
338
+ "immutable": true,
339
+ "locationInModule": {
340
+ "filename": "src/jenkins.ts",
341
+ "line": 107
342
+ },
343
+ "name": "seedJobs",
344
+ "optional": true,
345
+ "type": {
346
+ "collection": {
347
+ "elementtype": {
348
+ "fqn": "cdk8s-jenkins.SeedJob"
349
+ },
350
+ "kind": "array"
351
+ }
352
+ }
353
+ }
354
+ ],
355
+ "symbolId": "src/jenkins:JenkinsProps"
356
+ },
357
+ "cdk8s-jenkins.Plugin": {
358
+ "assembly": "cdk8s-jenkins",
359
+ "datatype": true,
360
+ "docs": {
361
+ "stability": "stable",
362
+ "summary": "Jenkins plugin."
363
+ },
364
+ "fqn": "cdk8s-jenkins.Plugin",
365
+ "kind": "interface",
366
+ "locationInModule": {
367
+ "filename": "src/jenkins.ts",
368
+ "line": 8
369
+ },
370
+ "name": "Plugin",
371
+ "properties": [
372
+ {
373
+ "abstract": true,
374
+ "docs": {
375
+ "stability": "stable",
376
+ "summary": "The name of Jenkins plugin."
377
+ },
378
+ "immutable": true,
379
+ "locationInModule": {
380
+ "filename": "src/jenkins.ts",
381
+ "line": 19
382
+ },
383
+ "name": "name",
384
+ "type": {
385
+ "primitive": "string"
386
+ }
387
+ },
388
+ {
389
+ "abstract": true,
390
+ "docs": {
391
+ "stability": "stable",
392
+ "summary": "The version of Jenkins plugin."
393
+ },
394
+ "immutable": true,
395
+ "locationInModule": {
396
+ "filename": "src/jenkins.ts",
397
+ "line": 24
398
+ },
399
+ "name": "version",
400
+ "type": {
401
+ "primitive": "string"
402
+ }
403
+ },
404
+ {
405
+ "abstract": true,
406
+ "docs": {
407
+ "default": "- Plugins are downloaded from Jenkins Update Centers.",
408
+ "see": "https://github.com/jenkinsci/kubernetes-operator/blob/master/pkg/configuration/base/resources/scripts_configmap.go#L121-L124",
409
+ "stability": "stable",
410
+ "summary": "The url from where plugin has to be downloaded."
411
+ },
412
+ "immutable": true,
413
+ "locationInModule": {
414
+ "filename": "src/jenkins.ts",
415
+ "line": 14
416
+ },
417
+ "name": "downloadUrl",
418
+ "optional": true,
419
+ "type": {
420
+ "primitive": "string"
421
+ }
422
+ }
423
+ ],
424
+ "symbolId": "src/jenkins:Plugin"
425
+ },
426
+ "cdk8s-jenkins.SeedJob": {
427
+ "assembly": "cdk8s-jenkins",
428
+ "datatype": true,
429
+ "docs": {
430
+ "stability": "stable",
431
+ "summary": "Jenkins seed job."
432
+ },
433
+ "fqn": "cdk8s-jenkins.SeedJob",
434
+ "kind": "interface",
435
+ "locationInModule": {
436
+ "filename": "src/jenkins.ts",
437
+ "line": 30
438
+ },
439
+ "name": "SeedJob",
440
+ "properties": [
441
+ {
442
+ "abstract": true,
443
+ "docs": {
444
+ "stability": "stable",
445
+ "summary": "The description of the seed job."
446
+ },
447
+ "immutable": true,
448
+ "locationInModule": {
449
+ "filename": "src/jenkins.ts",
450
+ "line": 39
451
+ },
452
+ "name": "description",
453
+ "type": {
454
+ "primitive": "string"
455
+ }
456
+ },
457
+ {
458
+ "abstract": true,
459
+ "docs": {
460
+ "stability": "stable",
461
+ "summary": "The unique name for the seed job."
462
+ },
463
+ "immutable": true,
464
+ "locationInModule": {
465
+ "filename": "src/jenkins.ts",
466
+ "line": 34
467
+ },
468
+ "name": "id",
469
+ "type": {
470
+ "primitive": "string"
471
+ }
472
+ },
473
+ {
474
+ "abstract": true,
475
+ "docs": {
476
+ "stability": "stable",
477
+ "summary": "The repository branch where seed job definitions are present."
478
+ },
479
+ "immutable": true,
480
+ "locationInModule": {
481
+ "filename": "src/jenkins.ts",
482
+ "line": 44
483
+ },
484
+ "name": "repositoryBranch",
485
+ "type": {
486
+ "primitive": "string"
487
+ }
488
+ },
489
+ {
490
+ "abstract": true,
491
+ "docs": {
492
+ "remarks": "Supports SSH and HTTPS.",
493
+ "stability": "stable",
494
+ "summary": "The repository access URL."
495
+ },
496
+ "immutable": true,
497
+ "locationInModule": {
498
+ "filename": "src/jenkins.ts",
499
+ "line": 49
500
+ },
501
+ "name": "repositoryUrl",
502
+ "type": {
503
+ "primitive": "string"
504
+ }
505
+ },
506
+ {
507
+ "abstract": true,
508
+ "docs": {
509
+ "stability": "stable",
510
+ "summary": "The repository path where seed job definitions are present."
511
+ },
512
+ "immutable": true,
513
+ "locationInModule": {
514
+ "filename": "src/jenkins.ts",
515
+ "line": 54
516
+ },
517
+ "name": "targets",
518
+ "type": {
519
+ "primitive": "string"
520
+ }
144
521
  }
145
522
  ],
146
- "name": "Hello",
147
- "symbolId": "src/index:Hello"
523
+ "symbolId": "src/jenkins:SeedJob"
148
524
  }
149
525
  },
150
- "version": "0.0.1",
151
- "fingerprint": "TNmaCkrTSAtanW25anZNtB/kqGJMQwKnO+1vMxdyv8U="
152
- }
526
+ "version": "0.0.4",
527
+ "fingerprint": "yxyer1B8f3oH/s2yxlO8jA65lB7LAX7FVGRuGaZqvK0="
528
+ }