A jenkins instance.
import { Jenkins } from 'cdk8s-jenkins'
new Jenkins(scope: Construct, id: string, props?: JenkinsProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
JenkinsProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: JenkinsProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addBasePlugins |
Add base plugins to jenkins instance. |
addPlugins |
Add custom plugins to jenkins instance. |
addSeedJobs |
Add seed jobs to jenkins instance. |
public toString(): string
Returns a string representation of this construct.
public addBasePlugins(basePlugins: ...Plugin[]): void
Add base plugins to jenkins instance.
- Type: ...Plugin[]
List of base plugins.
public addPlugins(plugins: ...Plugin[]): void
Add custom plugins to jenkins instance.
- Type: ...Plugin[]
List of custom plugins.
public addSeedJobs(seedJobs: ...SeedJob[]): void
Add seed jobs to jenkins instance.
- Type: ...SeedJob[]
List of seed jobs.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { Jenkins } from 'cdk8s-jenkins'
Jenkins.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
Props for Jenkins
.
import { JenkinsProps } from 'cdk8s-jenkins'
const jenkinsProps: JenkinsProps = { ... }
Name | Type | Description |
---|---|---|
basePlugins |
Plugin[] |
List of plugins required by Jenkins operator. |
disableCsrfProtection |
boolean |
Toggle for CSRF Protection on Jenkins resource. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata associated with Jenkins resource. |
plugins |
Plugin[] |
List of custom plugins applied to Jenkins resource. |
seedJobs |
SeedJob[] |
List of seed job configuration for Jenkins resource. |
public readonly basePlugins: Plugin[];
- Type: Plugin[]
- Default: Default base plugins: { name: 'kubernetes', version: '1.31.3' }, { name: 'workflow-job', version: '1145.v7f2433caa07f' }, { name: 'workflow-aggregator', version: '2.6' }, { name: 'git', version: '4.10.3' }, { name: 'job-dsl', version: '1.78.1' }, { name: 'configuration-as-code', version: '1414.v878271fc496f' }, { name: 'kubernetes-credentials-provider', version: '0.20' }
List of plugins required by Jenkins operator.
public readonly disableCsrfProtection: boolean;
- Type: boolean
- Default: false
Toggle for CSRF Protection on Jenkins resource.
public readonly metadata: ApiObjectMetadata;
- Type: cdk8s.ApiObjectMetadata
- Default: : Default metadata values: { name: An app-unique name generated by the chart, annotations: No annotations, labels: { app: 'jenkins' }, namespace: default, finalizers: No finalizers, ownerReferences: Automatically set by Kubernetes }
Metadata associated with Jenkins resource.
public readonly plugins: Plugin[];
- Type: Plugin[]
- Default: []
List of custom plugins applied to Jenkins resource.
public readonly seedJobs: SeedJob[];
- Type: SeedJob[]
- Default: No seed jobs
List of seed job configuration for Jenkins resource.
For more information about seed jobs, please take a look at {
[https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL Jenkins Seed Jobs Documentation }.](https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL Jenkins Seed Jobs Documentation }.)
Jenkins plugin.
import { Plugin } from 'cdk8s-jenkins'
const plugin: Plugin = { ... }
Name | Type | Description |
---|---|---|
name |
string |
The name of Jenkins plugin. |
version |
string |
The version of Jenkins plugin. |
downloadUrl |
string |
The url from where plugin has to be downloaded. |
public readonly name: string;
- Type: string
The name of Jenkins plugin.
public readonly version: string;
- Type: string
The version of Jenkins plugin.
public readonly downloadUrl: string;
- Type: string
- Default: Plugins are downloaded from Jenkins Update Centers.
The url from where plugin has to be downloaded.
Jenkins seed job.
import { SeedJob } from 'cdk8s-jenkins'
const seedJob: SeedJob = { ... }
Name | Type | Description |
---|---|---|
description |
string |
The description of the seed job. |
id |
string |
The unique name for the seed job. |
repositoryBranch |
string |
The repository branch where seed job definitions are present. |
repositoryUrl |
string |
The repository access URL. |
targets |
string |
The repository path where seed job definitions are present. |
public readonly description: string;
- Type: string
The description of the seed job.
public readonly id: string;
- Type: string
The unique name for the seed job.
public readonly repositoryBranch: string;
- Type: string
The repository branch where seed job definitions are present.
public readonly repositoryUrl: string;
- Type: string
The repository access URL.
Supports SSH and HTTPS.
public readonly targets: string;
- Type: string
The repository path where seed job definitions are present.