Amplify-console: Multiple deployed instances using the same git branch

Created on 19 Nov 2019  路  4Comments  路  Source: aws-amplify/amplify-console

Is your feature request related to a problem? Please describe.
I have encountered this problem that I'm developing a project which will be used for multiple clients. It's the exact same code let's say in my "master" branch and I don't want to have a different branch for each client.

Describe the solution you'd like
I'd like to be able to connect a branch with multiple environments to create more than one pipeline for that branch, so for example when I push to master branch, if it's connected to 3 different environments that stand for different clients, they will all be deployed using predefined pipelines.

Additional context
It's a feature that is supported by other CI/CD tools, but since we have no control over how we want to manage our build container in AWS Amplify, we can't have that feature.

_Please let me know if I'm wrong and we somehow have this feature, I have already tried reconnecting the same branch with a new environment, but a connected branch won't even show up on the list to start with_

question

Most helpful comment

Have the same issue. One branch and with environment setting we create different sites with different backends etc. So we would like to connect 1 branch to different apps or to multiple targets in a app.
Now it won't show the branch or says the repo is already connected

All 4 comments

Have the same issue. One branch and with environment setting we create different sites with different backends etc. So we would like to connect 1 branch to different apps or to multiple targets in a app.
Now it won't show the branch or says the repo is already connected

@wbroek @BardiaN you can accomplish this. You can create multiple apps by reconnecting the same repo>branch. That way when you trigger a code change to master, all three apps are built.

@wbroek @BardiaN you can accomplish this. You can create multiple apps by reconnecting the same repo>branch. That way when you trigger a code change to master, all three apps are built.

Hi @swaminator
Thanks for your input and for your contributions to the Amplify repository. I love both AWS Amplify CLI & Console and I've been using it since it was first released.
Regarding your solution, it's actually great, It helps me move forward with my deployment.
However, it'll have some cons like I have to duplicate my "build settings" and "notifications" & build environment variables, etc., but it also has some pros like the ability to have multiple environments per client.
Thanks for your help, I consider my problem solved, but I'm not sure if we have to close this issue or consider this a new feature-to-be-developed. I'll leave that to you.

P.S. I guess I can solve the "build settings" one by attaching amplify.yml to my source code so I won't have to set it for each new application.

@BardiaN I was about to suggest using the same amplify.yml in your repo so you do not have to duplicate build settings or environment variables. Further, you could also use the same SNS topic (email notifications use SNS) to subscribe to events from both apps. I'll close this issue for now as there is a path to achieve your usecase - it would be a large task for us to implement what you've asked for within the same app as we have to rearchitect several parts of the system. Our philosophy at Amplify is to simplify the base usecase yet provide escape hatches to customers to be able to do things that are more custom. Thanks for the positive feedback!

Was this page helpful?
0 / 5 - 0 ratings