JenkinsProvider

class aws_cdk.aws_codepipeline_actions.JenkinsProvider(scope, id, *, provider_name, server_url, for_build=None, for_test=None, version=None)

Bases: BaseJenkinsProvider

A 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 a JenkinsAction. Default: false

  • for_test (Optional[bool]) – Whether to immediately register a Jenkins Provider for the test category. The Provider will always be registered if you create a JenkinsTestAction. Default: false

  • version (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:

IJenkinsProvider

Returns:

a new Construct representing a reference to an existing Jenkins provider

classmethod is_construct(x)

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.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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