Class: AWSCDK::CodeBuild::CodeCommitSourceProps
- Inherits:
-
SourceProps
- Object
- SourceProps
- AWSCDK::CodeBuild::CodeCommitSourceProps
- Defined in:
- code_build/code_commit_source_props.rb
Overview
Construction properties for CodeCommitSource.
Instance Attribute Summary collapse
-
#branch_or_ref ⇒ String?
readonly
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?
readonly
The depth of history to download.
-
#fetch_submodules ⇒ Boolean?
readonly
Whether to fetch submodules while cloning git repo.
-
#identifier ⇒ String?
readonly
The source identifier.
- #repository ⇒ AWSCDK::Codecommit::IRepository readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identifier: nil, repository:, branch_or_ref: nil, clone_depth: nil, fetch_submodules: nil) ⇒ CodeCommitSourceProps
constructor
A new instance of CodeCommitSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(identifier: nil, repository:, branch_or_ref: nil, clone_depth: nil, fetch_submodules: nil) ⇒ CodeCommitSourceProps
Returns a new instance of CodeCommitSourceProps.
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_ref ⇒ String? (readonly)
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.
39 40 41 |
# File 'code_build/code_commit_source_props.rb', line 39 def branch_or_ref @branch_or_ref end |
#clone_depth ⇒ Numeric? (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.
47 48 49 |
# File 'code_build/code_commit_source_props.rb', line 47 def clone_depth @clone_depth end |
#fetch_submodules ⇒ Boolean? (readonly)
Default: false
Whether to fetch submodules while cloning git repo.
52 53 54 |
# File 'code_build/code_commit_source_props.rb', line 52 def fetch_submodules @fetch_submodules end |
#identifier ⇒ String? (readonly)
The source identifier.
This property is required on secondary sources.
30 31 32 |
# File 'code_build/code_commit_source_props.rb', line 30 def identifier @identifier end |
#repository ⇒ AWSCDK::Codecommit::IRepository (readonly)
32 33 34 |
# File 'code_build/code_commit_source_props.rb', line 32 def repository @repository end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |