Skip to content
v2.273.0

JenkinsProvider ​

A class representing Jenkins providers.

Example ​

ts
const jenkinsProvider = new codepipeline_actions.JenkinsProvider(this, 'JenkinsProvider', {
  providerName: 'MyJenkinsProvider',
  serverUrl: 'http://my-jenkins.com:8080',
  version: '2', // optional, default: '1'
});
python
jenkins_provider = codepipeline_actions.JenkinsProvider(self, "JenkinsProvider",
    provider_name="MyJenkinsProvider",
    server_url="http://my-jenkins.com:8080",
    version="2"
)
java
JenkinsProvider jenkinsProvider = JenkinsProvider.Builder.create(this, "JenkinsProvider")
        .providerName("MyJenkinsProvider")
        .serverUrl("http://my-jenkins.com:8080")
        .version("2")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var jenkinsProvider = new JenkinsProvider(this, "JenkinsProvider", new JenkinsProviderProps {
    ProviderName = "MyJenkinsProvider",
    ServerUrl = "http://my-jenkins.com:8080",
    Version = "2"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
jenkinsProvider := codepipeline_actions.NewJenkinsProvider(this, jsii.String("JenkinsProvider"), &JenkinsProviderProps{
	ProviderName: jsii.String("MyJenkinsProvider"),
	ServerUrl: jsii.String("http://my-jenkins.com:8080"),
	Version: jsii.String("2"),
})

Initializer ​

ts
new JenkinsProvider(scope: Construct, id: string, props: JenkinsProviderProps)
python
JenkinsProvider(scope: Construct, id: str, props: JenkinsProviderProps)
java
new JenkinsProvider(Construct scope, String id, JenkinsProviderProps props)
csharp
new JenkinsProvider(Construct scope, string id, JenkinsProviderProps props)
go
NewJenkinsProvider(Scope Construct, Id *string, Props JenkinsProviderProps)

Construct Props ​

forBuildbooleanfor_buildboolforBuildBooleanForBuildboolForBuild*bool= false#
Whether to immediately register a Jenkins Provider for the build category.

The Provider will always be registered if you create a JenkinsAction.

forTestbooleanfor_testboolforTestBooleanForTestboolForTest*bool= false#
Whether to immediately register a Jenkins Provider for the test category.

The Provider will always be registered if you create a JenkinsTestAction.

providerNamestringprovider_namestrproviderNameStringProviderNamestringProviderName*stringrequired#
The name of the Jenkins provider that you set in the AWS CodePipeline plugin configuration of your Jenkins project.
example
ts
'MyJenkinsProvider'
serverUrlstringserver_urlstrserverUrlStringServerUrlstringServerUrl*stringrequired#
The base URL of your Jenkins server.
example
ts
'http://myjenkins.com:8080'
versionstringversionstrversionStringVersionstringVersion*string= '1'#
The version of your provider.

Properties ​

nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
providerNamestringprovider_namestrproviderNameStringProviderNamestringProviderName*stringrequired#
serverUrlstringserver_urlstrserverUrlStringServerUrlstringServerUrl*stringrequired#
versionstringversionstrversionStringVersionstringVersion*stringrequired#

Methods ​

fromJenkinsProviderAttributes(scope: Construct, id: string, attrs: JenkinsProviderAttributes): IJenkinsProvider@staticmethod def from_jenkins_provider_attributes(scope: Construct, id: str, attrs: JenkinsProviderAttributes) -> IJenkinsProviderpublic static IJenkinsProvider fromJenkinsProviderAttributes(Construct scope, String id, JenkinsProviderAttributes attrs)public static IJenkinsProvider FromJenkinsProviderAttributes(Construct scope, string id, JenkinsProviderAttributes attrs)func FromJenkinsProviderAttributes(Scope Construct, Id *string, Attrs JenkinsProviderAttributes) IJenkinsProviderstatic#
Import a Jenkins provider registered either outside the CDK, or in a different CDK Stack.
3 parameters · returns

Parameters

  • scopescopescopescopeScope — the parent Construct for the new provider.
  • ididididId — the identifier of the new provider Construct.
  • attrsattrsattrsattrsAttrs — the properties used to identify the existing provider.

Returns: a new Construct representing a reference to an existing Jenkins provider

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

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.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining