TriggerProps Struct
Properties of trigger.
| Source | aws-codepipeline/lib/trigger.ts |
|---|---|
| Type last changed |
Example
ts
declare const pipeline: codepipeline.Pipeline;
declare const sourceAction: codepipeline_actions.CodeStarConnectionsSourceAction;
pipeline.addTrigger({
providerType: codepipeline.ProviderType.CODE_STAR_SOURCE_CONNECTION,
gitConfiguration: {
sourceAction,
pushFilter: [{
tagsExcludes: ['exclude1', 'exclude2'],
tagsIncludes: ['include*'],
}],
},
});
python
# pipeline: codepipeline.Pipeline
# source_action: codepipeline_actions.CodeStarConnectionsSourceAction
pipeline.add_trigger(
provider_type=codepipeline.ProviderType.CODE_STAR_SOURCE_CONNECTION,
git_configuration=codepipeline.GitConfiguration(
source_action=source_action,
push_filter=[codepipeline.GitPushFilter(
tags_excludes=["exclude1", "exclude2"],
tags_includes=["include*"]
)]
)
)
java
Pipeline pipeline;
CodeStarConnectionsSourceAction sourceAction;
pipeline.addTrigger(TriggerProps.builder()
.providerType(ProviderType.CODE_STAR_SOURCE_CONNECTION)
.gitConfiguration(GitConfiguration.builder()
.sourceAction(sourceAction)
.pushFilter(List.of(GitPushFilter.builder()
.tagsExcludes(List.of("exclude1", "exclude2"))
.tagsIncludes(List.of("include*"))
.build()))
.build())
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
Pipeline pipeline;
CodeStarConnectionsSourceAction sourceAction;
pipeline.AddTrigger(new TriggerProps {
ProviderType = ProviderType.CODE_STAR_SOURCE_CONNECTION,
GitConfiguration = new GitConfiguration {
SourceAction = sourceAction,
PushFilter = new [] { new GitPushFilter {
TagsExcludes = new [] { "exclude1", "exclude2" },
TagsIncludes = new [] { "include*" }
} }
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var pipeline Pipeline
var sourceAction CodeStarConnectionsSourceAction
pipeline.AddTrigger(&TriggerProps{
ProviderType: codepipeline.ProviderType_CODE_STAR_SOURCE_CONNECTION,
GitConfiguration: &GitConfiguration{
SourceAction: *SourceAction,
PushFilter: []GitPushFilter{
&GitPushFilter{
TagsExcludes: []*string{
jsii.String("exclude1"),
jsii.String("exclude2"),
},
TagsIncludes: []*string{
jsii.String("include*"),
},
},
},
},
})
Properties
gitConfigurationoptionalGitConfigurationgit_configurationoptionalGitConfigurationgitConfigurationoptionalGitConfigurationGitConfigurationoptionalGitConfigurationGitConfigurationoptionalGitConfiguration #Provides the filter criteria and the source stage for the repository event that starts the pipeline, such as Git tags.
Default: no configuration.
providerTypeProviderTypeprovider_typeProviderTypeproviderTypeProviderTypeProviderTypeProviderTypeProviderTypeProviderType required #The source provider for the event, such as connections configured for a repository with Git tags, for the specified trigger configuration.