Class: AWSCDK::CodeBuild::FilterGroup
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CodeBuild::FilterGroup
- Defined in:
- code_build/filter_group.rb
Overview
An object that represents a group of filter conditions for a webhook.
Every condition in a given FilterGroup must be true in order for the whole group to be true.
You construct instances of it by calling the #inEventOf static factory method,
and then calling various and_xyz instance methods to create modified instances of it
(this class is immutable).
You pass instances of this class to the webhook_filters property when constructing a source.
Class Method Summary collapse
-
.in_event_of(*actions) ⇒ AWSCDK::CodeBuild::FilterGroup
Creates a new event FilterGroup that triggers on any of the provided actions.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#and_actor_account_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must match the given pattern.
-
#and_actor_account_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must not match the given pattern.
-
#and_base_branch_is(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given base branch.
-
#and_base_branch_is_not(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given base branch.
-
#and_base_ref_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given Git reference.
-
#and_base_ref_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given Git reference.
-
#and_branch_is(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect the given branch.
-
#and_branch_is_not(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect the given branch.
-
#and_commit_message_is(commit_message) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect a head commit with the given message.
-
#and_commit_message_is_not(commit_message) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect a head commit with the given message.
-
#and_file_path_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event must affect a file that matches the given pattern.
-
#and_file_path_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a file that matches the given pattern.
-
#and_head_ref_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect a Git reference (ie., a branch or a tag) that matches the given pattern.
-
#and_head_ref_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect a Git reference (ie., a branch or a tag) that matches the given pattern.
-
#and_repository_name_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event affect only a repository name that matches the given pattern.
-
#and_repository_name_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a repository name that matches the given pattern.
-
#and_tag_is(tag_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect the given tag.
-
#and_tag_is_not(tag_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect the given tag.
-
#initialize(*args) ⇒ FilterGroup
constructor
A new instance of FilterGroup.
Constructor Details
#initialize(*args) ⇒ FilterGroup
Returns a new instance of FilterGroup.
15 16 17 |
# File 'code_build/filter_group.rb', line 15 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_codebuild.FilterGroup does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.in_event_of(*actions) ⇒ AWSCDK::CodeBuild::FilterGroup
Creates a new event FilterGroup that triggers on any of the provided actions.
46 47 48 49 50 51 |
# File 'code_build/filter_group.rb', line 46 def self.in_event_of(*actions) actions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkV2ZW50QWN0aW9uIn0=")), "actions[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.FilterGroup", "inEventOf", [*actions]) end |
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'code_build/filter_group.rb', line 19 def self.jsii_overridable_methods { :and_actor_account_is => { kind: :method, name: "andActorAccountIs", is_optional: false }, :and_actor_account_is_not => { kind: :method, name: "andActorAccountIsNot", is_optional: false }, :and_base_branch_is => { kind: :method, name: "andBaseBranchIs", is_optional: false }, :and_base_branch_is_not => { kind: :method, name: "andBaseBranchIsNot", is_optional: false }, :and_base_ref_is => { kind: :method, name: "andBaseRefIs", is_optional: false }, :and_base_ref_is_not => { kind: :method, name: "andBaseRefIsNot", is_optional: false }, :and_branch_is => { kind: :method, name: "andBranchIs", is_optional: false }, :and_branch_is_not => { kind: :method, name: "andBranchIsNot", is_optional: false }, :and_commit_message_is => { kind: :method, name: "andCommitMessageIs", is_optional: false }, :and_commit_message_is_not => { kind: :method, name: "andCommitMessageIsNot", is_optional: false }, :and_file_path_is => { kind: :method, name: "andFilePathIs", is_optional: false }, :and_file_path_is_not => { kind: :method, name: "andFilePathIsNot", is_optional: false }, :and_head_ref_is => { kind: :method, name: "andHeadRefIs", is_optional: false }, :and_head_ref_is_not => { kind: :method, name: "andHeadRefIsNot", is_optional: false }, :and_repository_name_is => { kind: :method, name: "andRepositoryNameIs", is_optional: false }, :and_repository_name_is_not => { kind: :method, name: "andRepositoryNameIsNot", is_optional: false }, :and_tag_is => { kind: :method, name: "andTagIs", is_optional: false }, :and_tag_is_not => { kind: :method, name: "andTagIsNot", is_optional: false }, } end |
Instance Method Details
#and_actor_account_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must match the given pattern.
57 58 59 60 |
# File 'code_build/filter_group.rb', line 57 def and_actor_account_is(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andActorAccountIs", [pattern]) end |
#and_actor_account_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must not match the given pattern.
66 67 68 69 |
# File 'code_build/filter_group.rb', line 66 def and_actor_account_is_not(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andActorAccountIsNot", [pattern]) end |
#and_base_branch_is(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given base branch.
Note that you cannot use this method if this Group contains the PUSH event action.
77 78 79 80 |
# File 'code_build/filter_group.rb', line 77 def and_base_branch_is(branch_name) Jsii::Type.check_type(branch_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchName") jsii_call_method("andBaseBranchIs", [branch_name]) end |
#and_base_branch_is_not(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given base branch.
Note that you cannot use this method if this Group contains the PUSH event action.
88 89 90 91 |
# File 'code_build/filter_group.rb', line 88 def and_base_branch_is_not(branch_name) Jsii::Type.check_type(branch_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchName") jsii_call_method("andBaseBranchIsNot", [branch_name]) end |
#and_base_ref_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given Git reference.
Note that you cannot use this method if this Group contains the PUSH event action.
99 100 101 102 |
# File 'code_build/filter_group.rb', line 99 def and_base_ref_is(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andBaseRefIs", [pattern]) end |
#and_base_ref_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given Git reference.
Note that you cannot use this method if this Group contains the PUSH event action.
110 111 112 113 |
# File 'code_build/filter_group.rb', line 110 def and_base_ref_is_not(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andBaseRefIsNot", [pattern]) end |
#and_branch_is(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect the given branch.
119 120 121 122 |
# File 'code_build/filter_group.rb', line 119 def and_branch_is(branch_name) Jsii::Type.check_type(branch_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchName") jsii_call_method("andBranchIs", [branch_name]) end |
#and_branch_is_not(branch_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect the given branch.
128 129 130 131 |
# File 'code_build/filter_group.rb', line 128 def and_branch_is_not(branch_name) Jsii::Type.check_type(branch_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchName") jsii_call_method("andBranchIsNot", [branch_name]) end |
#and_commit_message_is(commit_message) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect a head commit with the given message.
137 138 139 140 |
# File 'code_build/filter_group.rb', line 137 def () Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "commitMessage") jsii_call_method("andCommitMessageIs", []) end |
#and_commit_message_is_not(commit_message) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect a head commit with the given message.
146 147 148 149 |
# File 'code_build/filter_group.rb', line 146 def () Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "commitMessage") jsii_call_method("andCommitMessageIsNot", []) end |
#and_file_path_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event must affect a file that matches the given pattern.
Note that you can only use this method if this Group contains only the PUSH event action,
and only for GitHub, Bitbucket and GitHubEnterprise sources.
158 159 160 161 |
# File 'code_build/filter_group.rb', line 158 def and_file_path_is(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andFilePathIs", [pattern]) end |
#and_file_path_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a file that matches the given pattern.
Note that you can only use this method if this Group contains only the PUSH event action,
and only for GitHub, Bitbucket and GitHubEnterprise sources.
170 171 172 173 |
# File 'code_build/filter_group.rb', line 170 def and_file_path_is_not(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andFilePathIsNot", [pattern]) end |
#and_head_ref_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect a Git reference (ie., a branch or a tag) that matches the given pattern.
179 180 181 182 |
# File 'code_build/filter_group.rb', line 179 def and_head_ref_is(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andHeadRefIs", [pattern]) end |
#and_head_ref_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect a Git reference (ie., a branch or a tag) that matches the given pattern.
188 189 190 191 |
# File 'code_build/filter_group.rb', line 188 def and_head_ref_is_not(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andHeadRefIsNot", [pattern]) end |
#and_repository_name_is(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event affect only a repository name that matches the given pattern.
Note that you can only use this method if this Group contains only the WORKFLOW_JOB_QUEUED event action,
only for GitHub sources and only for organization webhook.
200 201 202 203 |
# File 'code_build/filter_group.rb', line 200 def and_repository_name_is(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andRepositoryNameIs", [pattern]) end |
#and_repository_name_is_not(pattern) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a repository name that matches the given pattern.
Note that you can only use this method if this Group contains only the WORKFLOW_JOB_QUEUED event action,
only for GitHub sources and only for organization webhook.
212 213 214 215 |
# File 'code_build/filter_group.rb', line 212 def and_repository_name_is_not(pattern) Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") jsii_call_method("andRepositoryNameIsNot", [pattern]) end |
#and_tag_is(tag_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must affect the given tag.
221 222 223 224 |
# File 'code_build/filter_group.rb', line 221 def and_tag_is(tag_name) Jsii::Type.check_type(tag_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagName") jsii_call_method("andTagIs", [tag_name]) end |
#and_tag_is_not(tag_name) ⇒ AWSCDK::CodeBuild::FilterGroup
Create a new FilterGroup with an added condition: the event must not affect the given tag.
230 231 232 233 |
# File 'code_build/filter_group.rb', line 230 def and_tag_is_not(tag_name) Jsii::Type.check_type(tag_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagName") jsii_call_method("andTagIsNot", [tag_name]) end |