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
질문됨 일 년 전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
답변함 일 년 전
profile picture
전문가
검토됨 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠