-
Notifications
You must be signed in to change notification settings - Fork 21
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
Webhook for deploying #112
Comments
💯 for Continuous Delivery |
Some more thoughts: on pull requests, pull the refspec looking to be merged, try to Some considerations:
|
Also, tag versions with github tags and well as Docker tags for easy rollback and bug identification. Should probably (definitely) make sure there's a way to signify backward-incompatible database schema changes. |
My thoughts are your first comment (referring to "some considerations"):
|
Tagging versions is going to be a little trickier. We can always safely bump the patch number, but detecting when we should bump the major/minor number is going to be more difficult. For example, we can use rake to detect whether or not there are pending migrations, but we can't tell programmatically if those are backwards compatible (and we would bump the minor version) or not (and we would bump the major version). I think we could solve the migration issue programmatically by parsing the pending migrations (which I know how to do), but there are probably other issues with this that I haven't thought of yet. |
It (tagging) is mostly so we don't roll back to a version that's incompatible with the production DB schema. We could simply bump the minor version (y in x.y.z, did I get that naming right? It's major.minor.patch?) when there are migrations, and then manually check compatibility if we need to roll back to an older minor version. |
Yeah you have the naming right. The problem is that if a migration removes a column from a table for example, that's a breaking change, so it should bump the major version. So you can't just bump minor version indiscriminately. |
OK. It's not too big of an issue, since as long as we get the tests right we won't have to roll back very often. We can figure out version numbers when this actually becomes a feature. |
Agreed |
This should automatically build the docker image every time changes are pushed to master. The next (and last) step is to setup a docker hub webhook to tell the server to re-deploy on changes. EDIT: server-side configs updated to pull from hacsoc/jolly-advisor. Now all that's needed to redeploy is to SSH in and run one command. It seems to all work. |
It will also re-build each time rails updates too. |
After the tests pass, build the docker container and deploy it to a test server (ie docker.case.edu:3000). Once it gets a +1 from a team member, push it live.
This will probably be done with a really simple python web server running on the docker.case.edu, and tag the docker images with ":test" for testing and ":latest" for production.
The text was updated successfully, but these errors were encountered: