Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CI/CD deployment per branch #1348

Open
Ulthran opened this issue Sep 15, 2024 · 2 comments
Open

Support CI/CD deployment per branch #1348

Ulthran opened this issue Sep 15, 2024 · 2 comments

Comments

@Ulthran
Copy link

Ulthran commented Sep 15, 2024

Context

If there is a way to do this already I haven't found it. My setup is: I have a website deployed at example.com, and a dev site at dev.example.com. With this setup I can only have one dev site at a time so if I run my CI for different branches simultaneously there will either be errors or only one will get through. I want to deploy each branch instead to dev.example.com/branch-name/ (deploy to branch-name stage with zappa then create an API mapping for the dev.example.com domain in API Gateway). But in order to do this deployment, I need to already have the branch name specified in zappa-settings.json, even if it's something as simple as:

...
branch-name: {
  extends: "dev"
}

So my question is, is there already a good way to do this that I haven't found yet? And if not, how hard would it be to add a command line option that lets you deploy/update a stage no in zappa-settings.json that just extends something that is defined there?

@monkut
Copy link
Collaborator

monkut commented Sep 30, 2024

I auto-generate the settings.json file and package in my CI/CD environment.

Here's my generation tool.
https://github.com/monkut/zappa-configuration-generator

@Ulthran
Copy link
Author

Ulthran commented Oct 8, 2024

Nice @monkut! I ended up just editing the zappa_config directly from CI/CD. Still having issues getting all the styling resources to map properly to each API mapping (e.g. dev.example.com/test1 and dev.example.com/test2).

When I go directly to the address assigned to the API gateway (e.g. 123456abcdef.execute-api.us-east-1.amazonaws.com/test1) I see the site as normal but when I access it through the API mapping (e.g. dev.example.com/test1) it's mostly blank (because only the inline styling carries through) and gives me the Not Found page. Any thoughts on what's going wrong there? Do you have a better method for deploying multiple dev sites?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants