profiler
profiler copied to clipboard
Write a script to simplify deployments and rollbacks
Our deploy process is longer than it should be, because it involves going through a sequence of actions on Github Web UI.
Instead we can leverage the command line using git, github cli, and/or directly calling the github API, to make it easier.
Some tips:
- generate a changelog (assumes
mozis the upstream remote -- can we infer that?)
git fetch moz
git log --oneline --first-parent moz/production..moz/main | awk '{ $1 = "*"; print }'
- checks that production doesn't have any unwanted commit
git fetch moz
git log --oneline moz/main..moz/production --no-merges
- create a production deployment PR with the github cli
gh pr create --base production --head main -t "Deploy XXX" -b "body"
(would be good to put the result of "changelog" in the body)
┆Issue is synchronized with this Jira Task
checks that production doesn't have any unwanted commit create a production deployment PR with the github cli
It stroke me that we can also handle the merge locally using pure git, doing local checks, and directly push to github to the production branch.
It stroke me that we can also handle the merge locally using pure git, doing local checks, and directly push to github to the production branch.
It would be preferable on my end to be able to automate this all from my terminal
It would be preferable on my end to be able to automate this all from my terminal
Yeah this was always the goal :) The open question is: only git operations, or using the github CLI. Now that I gave it some thought, I think we can do it with only git operations.