- Make sure working directory is clean (all changes committed or stashed)
- Checkout
deploy/(dev|qa|staging|production)
- Pull origin
- Merge from previous branch
- Run
build:(dev|qa|staging|production)
- Add, commit, push
- Checkout original branch
Problem:
Too many steps
Solution:
Automate with script
Problem:
Occasional merge conflicts
- Make sure working directory is clean
- Delete local branch
deploy/(dev|qa|staging|production)
- Create local branch
deploy/(dev|qa|staging|production)
- Merge from previous branch
- Run
build:(dev|qa|staging|production)
- Add, commit, force push
- Checkout original branch
No more merge conflicts
Don't commit compiled files, use "cached build commands" to compile code upon deployment.
Compilation happens post-deployment -
If updated gulpfile or package.json breaks compilation (would require someone to negligently deploy without running their code), you won't know about it breaking.
Compile code in separate Docker instance hosted on DeployBot If compilation fails it won't deploy.
npm install
and build commands currently run very very slowly, due to
- the vm being much less powerful than our servers
- running a fresh instance each time so no node_modules are cached