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
preguntada hace un año389 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
respondido hace un año
profile picture
EXPERTO
revisado hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas