Class: AWSCDK::CodeBuild::CodeCommitSourceProps

Inherits:
SourceProps
  • Object
show all
Defined in:
code_build/code_commit_source_props.rb

Overview

Construction properties for CodeCommitSource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier: nil, repository:, branch_or_ref: nil, clone_depth: nil, fetch_submodules: nil) ⇒ CodeCommitSourceProps

Returns a new instance of CodeCommitSourceProps.

Parameters:

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

    The source identifier.

  • repository (AWSCDK::Codecommit::IRepository)
  • branch_or_ref (String, nil) (defaults to: nil)

    The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

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

    The depth of history to download.

  • fetch_submodules (Boolean, nil) (defaults to: nil)

    Whether to fetch submodules while cloning git repo.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'code_build/code_commit_source_props.rb', line 12

def initialize(identifier: nil, repository:, branch_or_ref: nil, clone_depth: nil, fetch_submodules: nil)
  @identifier = identifier
  Jsii::Type.check_type(@identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identifier") unless @identifier.nil?
  @repository = repository
  Jsii::Type.check_type(@repository, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWNvbW1pdC5JUmVwb3NpdG9yeSJ9")), "repository")
  @branch_or_ref = branch_or_ref
  Jsii::Type.check_type(@branch_or_ref, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchOrRef") unless @branch_or_ref.nil?
  @clone_depth = clone_depth
  Jsii::Type.check_type(@clone_depth, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cloneDepth") unless @clone_depth.nil?
  @fetch_submodules = fetch_submodules
  Jsii::Type.check_type(@fetch_submodules, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "fetchSubmodules") unless @fetch_submodules.nil?
end

Instance Attribute Details

#branch_or_refString? (readonly)

Note:

Default: the default branch's HEAD commit ID is used

The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

Examples:

"mybranch"

Returns:

  • (String, nil)


39
40
41
# File 'code_build/code_commit_source_props.rb', line 39

def branch_or_ref
  @branch_or_ref
end

#clone_depthNumeric? (readonly)

The depth of history to download.

Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build of the project.

Returns:

  • (Numeric, nil)


47
48
49
# File 'code_build/code_commit_source_props.rb', line 47

def clone_depth
  @clone_depth
end

#fetch_submodulesBoolean? (readonly)

Note:

Default: false

Whether to fetch submodules while cloning git repo.

Returns:

  • (Boolean, nil)


52
53
54
# File 'code_build/code_commit_source_props.rb', line 52

def fetch_submodules
  @fetch_submodules
end

#identifierString? (readonly)

The source identifier.

This property is required on secondary sources.

Returns:

  • (String, nil)


30
31
32
# File 'code_build/code_commit_source_props.rb', line 30

def identifier
  @identifier
end

#repositoryAWSCDK::Codecommit::IRepository (readonly)



32
33
34
# File 'code_build/code_commit_source_props.rb', line 32

def repository
  @repository
end

Class Method Details

.jsii_propertiesObject



54
55
56
57
58
59
60
61
62
# File 'code_build/code_commit_source_props.rb', line 54

def self.jsii_properties
  {
    :identifier => "identifier",
    :repository => "repository",
    :branch_or_ref => "branchOrRef",
    :clone_depth => "cloneDepth",
    :fetch_submodules => "fetchSubmodules",
  }
end

Instance Method Details

#to_jsiiObject



64
65
66
67
68
69
70
71
72
73
74
75
# File 'code_build/code_commit_source_props.rb', line 64

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "identifier" => @identifier,
    "repository" => @repository,
    "branchOrRef" => @branch_or_ref,
    "cloneDepth" => @clone_depth,
    "fetchSubmodules" => @fetch_submodules,
  })
  result.compact
end