Passer au contenu

If I select the default branch (e.g., main) in CodePipeline but set the trigger filter to stage-*, which branch will the pipeline deploy—main or a stage-* branch?

0

Here, I'm using a code pipeline for the staging environment. Once the development environment is completed, a dynamic branch is created. The staging pipeline needs to use this dynamically created branch from development. When setting up the staging pipeline, I need to specify a default branch. However, at this point, the dynamic branch hasn't been created yet. So, I set the default branch to 'main' but configured the trigger to filter for branches following the 'stage-*'. My question is: which branch will the pipeline use for deployment – the default branch ('main') or the dynamically created 'stage-' branch?

demandé il y a un an286 vues
2 réponses
2
Réponse acceptée
  1. With Automatic Triggers: The pipeline will deploy the branch that matches stage-* and triggered the pipeline.
  2. With Manual Triggers: If manually triggered and no specific branch is provided, the pipeline will use the main branch by default.

Thus, in your case, when the stage-* branch is created and triggers the pipeline, the pipeline will deploy that stage-* branch, not the main branch.

AWS
EXPERT
répondu il y a un an
EXPERT
vérifié il y a un an
0

Thanks for the update

répondu il y a un an

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.