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
demandé il y a un an389 vues
1 réponse
1
Réponse acceptée

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
répondu il y a un an
profile picture
EXPERT
vérifié il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions