Specific git branches for aws elastic beanstalk environments

后端 未结 2 1458
抹茶落季
抹茶落季 2021-02-02 00:27

Here is my current scenario.

  • I am using AWS Elasticbeanstalk along with the eb cli 3.x tools for deployment.
  • I have created 2 environment
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-02 00:49

    You can merge master to production and production to master. However, after every merge, you have to reset the working tree of the folders in question. Here is how you can do this.

    git checkout production
    git merge --no-commit --no-ff master
    git reset /path/to/[.ebextensions and .elasticbeanstalk]/folders
    git commit
    git push
    

    Also, you may forget to reset after every merge so I suggest you set up a post-merge hook to do this automatically for the respective branches after every merge.

提交回复
热议问题