Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Website Development And Migration Workflow
- ==========================================
- Barry Arthur_and_Belinda Allan
- v1.1, August 19, 2011
- Website Repository Layout
- -------------------------
- .Repositories for website projects are:
- bzr+ssh://todd/mnt/repos/websites/<project>
- ---------------------------------------
- /mnt/repos/websites/
- *<project>*
- &trunk&
- xpt%
- 1.0(t)
- 1.1.0(t)
- 2.0(t)
- dev/
- 1.x/
- feature-1f%
- feature-2f%
- bug-1b%
- 2.x/
- bug-2b%
- feature-3f%
- ---------------------------------------
- Setup
- -----
- .Create Project Repository on todd
- ---------------------------------------
- cd /mnt/repos
- bzr init-repo --no-trees <project>
- bzr init <project>/trunk
- ---------------------------------------
- .Initialize Working Area
- ---------------------------------------
- cd ~/websites/
- bzr init-repo <project>
- cd <project>
- ---------------------------------------
- Feature / Bug Workflow
- ----------------------
- ---------------------------------------
- cd ~/websites/<project>
- bzr branch bzr+ssh://todd/mnt/repos/<project>/trunk \
- bzr+ssh://todd/mnt/repos/<project>/dev/1.x/<feature-1f>
- bzr checkout bzr+ssh://todd/mnt/repos/<project>/dev/1.x/<feature-1f>
- ---------------------------------------
- <hack, hack, hack>
- ---------------------------------------
- bzr commit -m "commit message"
- bzr up <--for latest changes from others
- ---------------------------------------
- If a longer development cycle/time, implement trunk importing/pulling
- steps below.
- .Update your Feature work with trunk changes
- Create local trunk branch if not exists.
- ---------------------------------------
- bzr branch bzr+ssh://todd/mnt/repos/<project>/trunk
- ---------------------------------------
- Otherwise:
- ---------------------------------------
- cd trunk
- bzr merge --pull --remember bzr+ssh://todd/mnt/repos/<project>/trunk
- cd ../<feature-1f>
- bzr merge ../trunk
- bzr commit -m "commit message"
- ---------------------------------------
- Migrate to trunk
- ----------------
- Create trunk & feature branches if necessary:
- ---------------------------------------
- cd ~/websites/<project>
- bzr branch bzr+ssh://todd/mnt/repos/<project>/trunk
- bzr branch bzr+ssh://todd/mnt/repos/<project>/dev/1.x/<feature-1f>
- ---------------------------------------
- Then merge:
- ---------------------------------------
- cd trunk
- bzr merge ../<feature-1f>
- ---------------------------------------
- <fix conflicts; test>
- ---------------------------------------
- bzr commit -m "migrated to trunk"
- bzr push --remember bzr+ssh://todd/mnt/repos/<project>/trunk
- ---------------------------------------
- Tell other developers that it's ready for testing.
- .Other developers test trunk migrations
- ---------------------------------------
- cd /var/www/testing
- bzr checkout --lightweight bzr+ssh://todd/mnt/repos/<project>/trunk web
- ---------------------------------------
- * (script: rsync files; generate settings.php; load db)
- * <test; report failure/success>
- Migrate to XPT
- --------------
- ---------------------------------------
- cd ~/websites/<project>
- bzr branch bzr+ssh://todd/mnt/repos/<project>/xpt
- bzr branch bzr+ssh://todd/mnt/repos/<project>/trunk
- cd xpt
- bzr merge ../trunk
- cd /var/www/xpt
- rm -rf web
- bzr checkout --lightweight ~/websites/<project>/xpt web
- ---------------------------------------
- <test, test, test; announce to developers to test>
- .If all is good, get ready to migrate to PRD:
- ---------------------------------------
- bzr tag v2.0.0
- bzr push --remember bzr+ssh://todd/mnt/repos/<project>/xpt
- ---------------------------------------
- Migrate to PRD
- --------------
- ---------------------------------------
- cd ~/websites/<project>
- bzr checkout --lightweight bzr+ssh://todd/mnt/repos/<project>/xpt prd
- cd prd
- ---------------------------------------
- .FTP to production site
- e.g. ++lftp -u +produser@website.com+ ftp.website.com++
- lftp> mirror -R -vv [<local dir> <remote dir>]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement