JenkinsProvider
- class aws_cdk.aws_codepipeline_actions.JenkinsProvider(scope, id, *, provider_name, server_url, for_build=None, for_test=None, version=None)
Bases:
BaseJenkinsProviderA class representing Jenkins providers.
- See:
#import
- ExampleMetadata:
infused
Example:
jenkins_provider = codepipeline_actions.JenkinsProvider(self, "JenkinsProvider", provider_name="MyJenkinsProvider", server_url="http://my-jenkins.com:8080", version="2" )
- Parameters:
scope (
Construct)id (
str)provider_name (
str) – The name of the Jenkins provider that you set in the AWS CodePipeline plugin configuration of your Jenkins project.server_url (
str) – The base URL of your Jenkins server.for_build (
Optional[bool]) – Whether to immediately register a Jenkins Provider for the build category. The Provider will always be registered if you create aJenkinsAction. Default: falsefor_test (
Optional[bool]) – Whether to immediately register a Jenkins Provider for the test category. The Provider will always be registered if you create aJenkinsTestAction. Default: falseversion (
Optional[str]) – The version of your provider. Default: ‘1’
Methods
- to_string()
Returns a string representation of this construct.
- Return type:
str
Attributes
- node
The tree node.
- provider_name
- server_url
- version
Static Methods
- classmethod from_jenkins_provider_attributes(scope, id, *, provider_name, server_url, version=None)
Import a Jenkins provider registered either outside the CDK, or in a different CDK Stack.
- Parameters:
scope (
Construct) – the parent Construct for the new provider.id (
str) – the identifier of the new provider Construct.provider_name (
str) – The name of the Jenkins provider that you set in the AWS CodePipeline plugin configuration of your Jenkins project.server_url (
str) – The base URL of your Jenkins server.version (
Optional[str]) – The version of your provider. Default: ‘1’
- Return type:
- Returns:
a new Construct representing a reference to an existing Jenkins provider
- classmethod is_construct(x)
Checks if
xis a construct.Use this method instead of
instanceofto properly detectConstructinstances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the classConstructin each copy of theconstructslibrary is seen as a different class, and an instance of one class will not test asinstanceofthe other class.npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructslibrary can be accidentally installed, andinstanceofwill behave unpredictably. It is safest to avoid usinginstanceof, and using this type-testing method instead.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsConstruct.