Skip to content

Deployment

Atul Varma edited this page Jul 10, 2019 · 6 revisions

The tenant platform currently has two deployments:

Deployments occur when a deployment's respective branch is pushed to and its test pass. This behavior is defined in .circleci/config.yml, and its status can be observed at Jobs » JustFixNYC » tenants2 on CircleCI.

Deploying to development

Just issue a PR against the default (master) branch. Once the PR is merged, the development instance will be updated.

Deploying to production

Preferred method: fast-forward merge from master into production

The preferred way of deploying to production is to merge master into production via the command-line, which should result in a fast-forward. This is preferred to a formal GitHub PR because a PR would create a merge commit, which would then require merging back into master, which is a hassle.

This can be done via:

git fetch
git checkout production
git merge master
git push

Alternative method: pull request from master into production

However, if the person making the deployment doesn't have permission to push directly to production, they can do so via a pull request from master into production. Just make sure to merge the PR using a merge commit (do not squash or rebase, as this will result in very different histories for the two branches, making future merges confusing).

Once the PR is merged, production should be merged back into master to ensure that both branches are in-sync.

Fallback method: using deploy.py from the command-line

If CircleCI or GitHub is down, a deployment can be made by running deploy.py heroku directly from the command-line. This requires setting up the Heroku CLI and is generally discouraged.

Clone this wiki locally