Class: AWSCDK::CodePipelineActions::JenkinsActionProps

Inherits:
AWSCDK::Codepipeline::CommonActionProps
  • Object
show all
Defined in:
code_pipeline_actions/jenkins_action_props.rb

Overview

Construction properties of JenkinsAction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name:, run_order: nil, variables_namespace: nil, jenkins_provider:, project_name:, type:, inputs: nil, outputs: nil) ⇒ JenkinsActionProps

Returns a new instance of JenkinsActionProps.

Parameters:

  • action_name (String)

    The physical, human-readable name of the Action.

  • run_order (Numeric, nil) (defaults to: nil)

    The runOrder property for this Action.

  • variables_namespace (String, nil) (defaults to: nil)

    The name of the namespace to use for variables emitted by this action.

  • jenkins_provider (AWSCDK::CodePipelineActions::IJenkinsProvider)

    The Jenkins Provider for this Action.

  • project_name (String)

    The name of the project (sometimes also called job, or task) on your Jenkins installation that will be invoked by this Action.

  • type (AWSCDK::CodePipelineActions::JenkinsActionType)

    The type of the Action - Build, or Test.

  • inputs (Array<AWSCDK::Codepipeline::Artifact>, nil) (defaults to: nil)

    The source to use as input for this build.

  • outputs (Array<AWSCDK::Codepipeline::Artifact>, nil) (defaults to: nil)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'code_pipeline_actions/jenkins_action_props.rb', line 15

def initialize(action_name:, run_order: nil, variables_namespace: nil, jenkins_provider:, project_name:, type:, inputs: nil, outputs: nil)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
  @run_order = run_order
  Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil?
  @variables_namespace = variables_namespace
  Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil?
  @jenkins_provider = jenkins_provider
  Jsii::Type.check_type(@jenkins_provider, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuSUplbmtpbnNQcm92aWRlciJ9")), "jenkinsProvider")
  @project_name = project_name
  Jsii::Type.check_type(@project_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "projectName")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuSmVua2luc0FjdGlvblR5cGUifQ==")), "type")
  @inputs = inputs
  Jsii::Type.check_type(@inputs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQXJ0aWZhY3QifSwia2luZCI6ImFycmF5In19")), "inputs") unless @inputs.nil?
  @outputs = outputs
  Jsii::Type.check_type(@outputs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQXJ0aWZhY3QifSwia2luZCI6ImFycmF5In19")), "outputs") unless @outputs.nil?
end

Instance Attribute Details

#action_nameString (readonly)

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

Returns:

  • (String)


39
40
41
# File 'code_pipeline_actions/jenkins_action_props.rb', line 39

def action_name
  @action_name
end

#inputsArray<AWSCDK::Codepipeline::Artifact>? (readonly)

The source to use as input for this build.

Returns:



70
71
72
# File 'code_pipeline_actions/jenkins_action_props.rb', line 70

def inputs
  @inputs
end

#jenkins_providerAWSCDK::CodePipelineActions::IJenkinsProvider (readonly)

The Jenkins Provider for this Action.



56
57
58
# File 'code_pipeline_actions/jenkins_action_props.rb', line 56

def jenkins_provider
  @jenkins_provider
end

#outputsArray<AWSCDK::Codepipeline::Artifact>? (readonly)

Returns:



72
73
74
# File 'code_pipeline_actions/jenkins_action_props.rb', line 72

def outputs
  @outputs
end

#project_nameString (readonly)

The name of the project (sometimes also called job, or task) on your Jenkins installation that will be invoked by this Action.

Examples:

"MyJob"

Returns:

  • (String)


62
63
64
# File 'code_pipeline_actions/jenkins_action_props.rb', line 62

def project_name
  @project_name
end

#run_orderNumeric? (readonly)

Note:

Default: 1

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.



47
48
49
# File 'code_pipeline_actions/jenkins_action_props.rb', line 47

def run_order
  @run_order
end

#typeAWSCDK::CodePipelineActions::JenkinsActionType (readonly)

The type of the Action - Build, or Test.



66
67
68
# File 'code_pipeline_actions/jenkins_action_props.rb', line 66

def type
  @type
end

#variables_namespaceString? (readonly)

Note:

Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set

The name of the namespace to use for variables emitted by this action.

Returns:

  • (String, nil)


52
53
54
# File 'code_pipeline_actions/jenkins_action_props.rb', line 52

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'code_pipeline_actions/jenkins_action_props.rb', line 74

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :jenkins_provider => "jenkinsProvider",
    :project_name => "projectName",
    :type => "type",
    :inputs => "inputs",
    :outputs => "outputs",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'code_pipeline_actions/jenkins_action_props.rb', line 87

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "jenkinsProvider" => @jenkins_provider,
    "projectName" => @project_name,
    "type" => @type,
    "inputs" => @inputs,
    "outputs" => @outputs,
  })
  result.compact
end