CodePipeline stage execution

1

I have a CodePipeline setup with the following workflow.

  1. Step 1: Source stage: Integrated with GitHub
  2. Step 2: Deploy stage: Integrated with EC2

The pipeline is triggered by GitHub source code changes (e.g code marge, push, etc). Once this action happens CodePipeline kicks off the stage executions, i.e grabs the code from GitHub branch and then moves to deploy (there's no build stage). This works perfectly when a single developeris working on the branch; My problem now is that if multiple developers push changes to the branch, the deploy stage fails if it had not finished executing the first action.

How do I deal with this scenario?

  • Could you please elaborate on this? What do you mean by "he first action"? Which stage, which execution? Or an action inside of the stage?

profile picture
質問済み 1年前389ビュー
1回答
1
承認された回答

By design, a pipeline stage processes only one execution at a time. To do this, a stage is locked while it processes an execution. Two pipeline executions can't occupy the same stage at the same time.

See more information here - https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works.html#how-it-works-inbound-executions

So in theory, code pipeline can handle multiple commits by developers in a linear order per stage. As long as you have the dependent actions in the same stage, there should be no overwrite and interference between two runs.

AWS
回答済み 1年前
profile picture
エキスパート
レビュー済み 6ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ