CICD Production and testing enviroments to lightsail or EC2 instance

0

I am looking for a way to have a CICD pipeline from codecommit to EC2 instance or Lightsail, with different branches (Development, Testing, and Production ),

Can someone suggest to me a Best practice for this,

Sample Use Case

Jayanga
質問済み 6ヶ月前235ビュー
1回答
0

Hello.

I think the following documents will be helpful.
https://aws.amazon.com/jp/blogs/devops/multi-branch-codepipeline-strategy-with-event-driven-architecture/

With the current CodePipeline, it is not possible to manage multiple branches with one pipeline.
So you need to create a CodePipeline for each branch.
The above document explains how to automatically create a CodePipeline for each branch.

profile picture
エキスパート
回答済み 6ヶ月前
  • Thank you for the comment, I have already tried the LAMBDA Approcah in a similar way,But that does not meet the desired out put.

    Yes,,We can set multiple Pipeline for each branch,My question is how we target the correct folder for each branch, this is for a PHP environment, With mysql DB

  • How about editing the Appspec.yml file to change the destination folder for each branch?

  • Yes, that is something might work, can you recommend an article that i can have a look at and check,

  • No blogs were found that might be helpful. I thought it would be a good idea to create a script that retrieves the branch name from the environment variable "CODEBUILD_WEBHOOK_HEAD_REF" during the CodeBuild build phase and rewrites appspce.yml to match that branch. https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ