首页 > 解决方案 > 您如何检测哪个 sourceAction 触发了 CodePipeline 执行

问题描述

我有一个具有两个S3SourceAction 的 AWS CodePipeline。

目前,在 SourceActionTwo 我有 trigger: codepipeline_actions.S3Trigger.NONE所以这个动作不会触发管道执行。

我真正想做的是确定 SourceActionTwo 是否触发了管道,在这种情况下,我想跳过管道的 DEPLOY 阶段。我只需要确定哪个源实际触发了执行。

有人做过这个吗??

const builderSourceOutput = new codepipeline.Artifact();
const builderSourceAction = new S3SourceAction({
    actionName: `SourceActionTwo`,
    bucket: artifactBucket,
    bucketKey: 'location.zip'
    output: builderSourceOutput,
    trigger: codepipeline_actions.S3Trigger.NONE //Rather not do this
  });

标签: aws-cdkaws-codepipelineaws-codebuild

解决方案


推荐阅读