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
asked a year ago345 views
1 Answer
1
Accepted Answer

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
answered a year ago
profile picture
EXPERT
reviewed 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions