Class: AWSCDK::CodeBuild::BitBucketSourceProps
- Inherits:
-
SourceProps
- Object
- SourceProps
- AWSCDK::CodeBuild::BitBucketSourceProps
- Defined in:
- code_build/bit_bucket_source_props.rb
Overview
Construction properties for BitBucketSource.
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.
-
#build_status_name ⇒ String?
readonly
This parameter is used for the
nameparameter in the Bitbucket commit status. -
#build_status_url ⇒ String?
readonly
The URL that the build will report back to the source provider.
-
#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.
-
#owner ⇒ String
readonly
The BitBucket account/user that owns the repo.
-
#repo ⇒ String
readonly
The name of the repo (without the username).
-
#report_build_status ⇒ Boolean?
readonly
Whether to send notifications on your build's start and end.
-
#webhook ⇒ Boolean?
readonly
Whether to create a webhook that will trigger a build every time an event happens in the repository.
-
#webhook_filters ⇒ Array<AWSCDK::CodeBuild::FilterGroup>?
readonly
A list of webhook filters that can constraint what events in the repository will trigger a build.
-
#webhook_triggers_batch_build ⇒ Boolean?
readonly
Trigger a batch build from a webhook instead of a standard one.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identifier: nil, owner:, repo:, branch_or_ref: nil, build_status_name: nil, build_status_url: nil, clone_depth: nil, fetch_submodules: nil, report_build_status: nil, webhook: nil, webhook_filters: nil, webhook_triggers_batch_build: nil) ⇒ BitBucketSourceProps
constructor
A new instance of BitBucketSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(identifier: nil, owner:, repo:, branch_or_ref: nil, build_status_name: nil, build_status_url: nil, clone_depth: nil, fetch_submodules: nil, report_build_status: nil, webhook: nil, webhook_filters: nil, webhook_triggers_batch_build: nil) ⇒ BitBucketSourceProps
Returns a new instance of BitBucketSourceProps.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'code_build/bit_bucket_source_props.rb', line 19 def initialize(identifier: nil, owner:, repo:, branch_or_ref: nil, build_status_name: nil, build_status_url: nil, clone_depth: nil, fetch_submodules: nil, report_build_status: nil, webhook: nil, webhook_filters: nil, webhook_triggers_batch_build: nil) @identifier = identifier Jsii::Type.check_type(@identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identifier") unless @identifier.nil? @owner = owner Jsii::Type.check_type(@owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "owner") @repo = repo Jsii::Type.check_type(@repo, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repo") @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? @build_status_name = build_status_name Jsii::Type.check_type(@build_status_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buildStatusName") unless @build_status_name.nil? @build_status_url = build_status_url Jsii::Type.check_type(@build_status_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buildStatusUrl") unless @build_status_url.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? @report_build_status = report_build_status Jsii::Type.check_type(@report_build_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "reportBuildStatus") unless @report_build_status.nil? @webhook = webhook Jsii::Type.check_type(@webhook, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "webhook") unless @webhook.nil? @webhook_filters = webhook_filters Jsii::Type.check_type(@webhook_filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlYnVpbGQuRmlsdGVyR3JvdXAifSwia2luZCI6ImFycmF5In19")), "webhookFilters") unless @webhook_filters.nil? @webhook_triggers_batch_build = webhook_triggers_batch_build Jsii::Type.check_type(@webhook_triggers_batch_build, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "webhookTriggersBatchBuild") unless @webhook_triggers_batch_build.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.
70 71 72 |
# File 'code_build/bit_bucket_source_props.rb', line 70 def branch_or_ref @branch_or_ref end |
#build_status_name ⇒ String? (readonly)
Default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)"
This parameter is used for the name parameter in the Bitbucket commit status.
Can use built-in CodeBuild variables, like $AWS_REGION.
80 81 82 |
# File 'code_build/bit_bucket_source_props.rb', line 80 def build_status_name @build_status_name end |
#build_status_url ⇒ String? (readonly)
Default: - link to the AWS Console for CodeBuild to a particular build execution
The URL that the build will report back to the source provider.
Can use built-in CodeBuild variables, like $AWS_REGION.
90 91 92 |
# File 'code_build/bit_bucket_source_props.rb', line 90 def build_status_url @build_status_url 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.
98 99 100 |
# File 'code_build/bit_bucket_source_props.rb', line 98 def clone_depth @clone_depth end |
#fetch_submodules ⇒ Boolean? (readonly)
Default: false
Whether to fetch submodules while cloning git repo.
103 104 105 |
# File 'code_build/bit_bucket_source_props.rb', line 103 def fetch_submodules @fetch_submodules end |
#identifier ⇒ String? (readonly)
The source identifier.
This property is required on secondary sources.
51 52 53 |
# File 'code_build/bit_bucket_source_props.rb', line 51 def identifier @identifier end |
#owner ⇒ String (readonly)
The BitBucket account/user that owns the repo.
57 58 59 |
# File 'code_build/bit_bucket_source_props.rb', line 57 def owner @owner end |
#repo ⇒ String (readonly)
The name of the repo (without the username).
63 64 65 |
# File 'code_build/bit_bucket_source_props.rb', line 63 def repo @repo end |
#report_build_status ⇒ Boolean? (readonly)
Default: true
Whether to send notifications on your build's start and end.
108 109 110 |
# File 'code_build/bit_bucket_source_props.rb', line 108 def report_build_status @report_build_status end |
#webhook ⇒ Boolean? (readonly)
Default: true if any webhookFilters were provided, false otherwise
Whether to create a webhook that will trigger a build every time an event happens in the repository.
113 114 115 |
# File 'code_build/bit_bucket_source_props.rb', line 113 def webhook @webhook end |
#webhook_filters ⇒ Array<AWSCDK::CodeBuild::FilterGroup>? (readonly)
Default: every push and every Pull Request (create or update) triggers a build
A list of webhook filters that can constraint what events in the repository will trigger a build.
A build is triggered if any of the provided filter groups match.
Only valid if webhook was not provided as false.
121 122 123 |
# File 'code_build/bit_bucket_source_props.rb', line 121 def webhook_filters @webhook_filters end |
#webhook_triggers_batch_build ⇒ Boolean? (readonly)
Default: false
Trigger a batch build from a webhook instead of a standard one.
Enabling this will enable batch builds on the CodeBuild project.
128 129 130 |
# File 'code_build/bit_bucket_source_props.rb', line 128 def webhook_triggers_batch_build @webhook_triggers_batch_build end |
Class Method Details
.jsii_properties ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'code_build/bit_bucket_source_props.rb', line 130 def self.jsii_properties { :identifier => "identifier", :owner => "owner", :repo => "repo", :branch_or_ref => "branchOrRef", :build_status_name => "buildStatusName", :build_status_url => "buildStatusUrl", :clone_depth => "cloneDepth", :fetch_submodules => "fetchSubmodules", :report_build_status => "reportBuildStatus", :webhook => "webhook", :webhook_filters => "webhookFilters", :webhook_triggers_batch_build => "webhookTriggersBatchBuild", } end |
Instance Method Details
#to_jsii ⇒ Object
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'code_build/bit_bucket_source_props.rb', line 147 def to_jsii result = {} result.merge!(super) result.merge!({ "identifier" => @identifier, "owner" => @owner, "repo" => @repo, "branchOrRef" => @branch_or_ref, "buildStatusName" => @build_status_name, "buildStatusUrl" => @build_status_url, "cloneDepth" => @clone_depth, "fetchSubmodules" => @fetch_submodules, "reportBuildStatus" => @report_build_status, "webhook" => @webhook, "webhookFilters" => @webhook_filters, "webhookTriggersBatchBuild" => @webhook_triggers_batch_build, }) result.compact end |