Update your test environments in 3 seconds
crzy is mainly 2 things: (1) a GIT server that triggers a test, build and
run on a receive; (2) an HTTP proxy that rollout the new version of your API.
The best way to understand how it works is to use it. You can check
go-crzy/color as an example. First
install and run crzy:
go get github.com/go-crzy/crzy
crzy -server -repository color.gitNote: we assume you are working on the
mainbranch, if that is not the case, add the-headflag with the name of your branch to thecrzycommand.
This commands above starts the GIT server that can be used to push you
program to the http://localhost:8080/color.git URL. It also creates
a proxy server on http://localhost:8081. You can then push your project
the to crzy, with a simple git push command. Here is a complete example
that includes the setup:
git clone https://github.com/go-crzy/color.git color
cd color
git remote add server http://localhost:8080/color.git
git push serverThe API is now proxied and the next push will perform a blue/green update of your test environment...
crzy is not magic and there is a few assumptions for your program to work
with it:
- We depend on
goandgiton the server - We assume your program is using Go and can be build from a simple
go buildon the root of your repository. You should rely ongo mod - We assume the program relies on HTTP and we can change its listening port
with the
PORTenvironment variable - We are running the
mainbranch of your project
crzy will be improved to manage broader use cases. If you like the idea,
need support for another programming language or protocol or simply cannot
figure out how to make it work, do not hesitate to open an
issue.