我创建了一个堆栈,其中有用于创建管道的资源,每次在“master”分支上进行推送时都会启动管道:
CodeCommitBranch:
Type: String
Description: branch name
Default: master
AllowedValues:
- develop
- release
- master
CodePipeline:
Type: 'AWS::CodePipeline::Pipeline'
Properties:
Name: !Sub '${Constructor}-${ApplicationID}-codepipeline'
ArtifactStore:
Location: !Ref CodePipelineS3BucketName
Type: S3
RestartExecutionOnUpdate: true
RoleArn: !Sub 'arn:aws:iam::${AWS::AccountId}:role/${CodePipelineRoleName}'
Stages:
- Name: Source
Actions:
- Name: Source
ActionTypeId:
Category: Source
Owner: AWS
Provider: CodeCommit
Version: 1
RunOrder: 1
OutputArtifacts:
- Name: SourceArtifact
Configuration:
BranchName: !Ref CodeCommitRepoBranch
PollForSourceChanges: false
RepositoryName: !GetAtt
- CodeCommitRepo
- Name
- Name: Deploy-Dev
Actions:
- Name: Deploy-Dev
ActionTypeId:
Category: Build
Owner: AWS
Provider: CodeBuild
Version: 1
RunOrder: 2
InputArtifacts:
- Name: SourceArtifact
OutputArtifacts:
- Name: DeployArtifactDev
Configuration:
ProjectName: !Ref CodeDeployDev
- Name: Deploy-Int
Actions:
- Name: IntPromotionApproval
ActionTypeId:
Category: Approval
Owner: AWS
Provider: Manual
Version: 1
RunOrder: 3
- Name: Deploy-Int
ActionTypeId:
Category: Build
Owner: AWS
Provider: CodeBuild
Version: 1
RunOrder: 31
InputArtifacts:
- Name: SourceArtifact
OutputArtifacts:
- Name: DeployArtifactInt
Configuration:
ProjectName: !Ref CodeDeployInt
我想知道是否可以在“开发”分支上发生推送时在启动同一管道的同一资源中添加一个操作。因此,最终管道在“master”和“develop”被推动时开始。