{"id":24128074,"url":"https://github.com/parolkar/deployment_pipeline","last_synced_at":"2025-09-18T21:30:47.695Z","repository":{"id":3773693,"uuid":"4850696","full_name":"parolkar/deployment_pipeline","owner":"parolkar","description":"[Workflow] Deployment Pipeline - An opinionated continuous delivery workflow for Agile Teams","archived":false,"fork":false,"pushed_at":"2012-07-18T05:37:18.000Z","size":688,"stargazers_count":49,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-21T17:21:17.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parolkar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-01T14:13:05.000Z","updated_at":"2024-01-13T23:50:51.000Z","dependencies_parsed_at":"2022-09-13T09:50:16.758Z","dependency_job_id":null,"html_url":"https://github.com/parolkar/deployment_pipeline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parolkar%2Fdeployment_pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parolkar%2Fdeployment_pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parolkar%2Fdeployment_pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parolkar%2Fdeployment_pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parolkar","download_url":"https://codeload.github.com/parolkar/deployment_pipeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233522910,"owners_count":18689023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-11T18:36:24.115Z","updated_at":"2025-09-18T21:30:42.060Z","avatar_url":"https://github.com/parolkar.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Deployment Pipeline  (Let's make Continuous Deployment painless)\n-------------------\n\nIn the life of Deployment Manager of an agile aggressive team\u003csup\u003e1\u003c/sup\u003e, there comes a day when he/she needs to manage releases and communicate with\nstake holders about features being released and also control what goes live on production. Why control? because in any practical scenario, feature which is ready\nand accepted by product managers doesn't guarantee its readiness for the business and marketing and quite often non-technical teams need a buffer time before\na feature is released.  Deployment Pipeline is here to help you manage these releases and keep non-technical teams and users better informed about whats going on.\n\n\n### Ideal Scenario:\n\n 1. Your Product Managers write feature/bug stories and prioritize them anytime during the day.\n 2. Your engineering team believes in Continuous Integration and all engineers commit to  Master branch (or Trunk) several times a day.\n 3. If the build (CI) is green, that tag from Master Branch might get pushed to QA environment for stories to be delivered.\n 4. Once all stories are accepted, (QA) Staging Tag is deployed to production, Happy Ending of the day!\n\n### Practical Scenario:\n 1. You have 5 Product Managers who request feature/bug stories and prioritize them anytime during the day.\n 2. You have 10 engineers working on 5 stories and commits to  Master branch (or Trunk) several times a day.\n 3. Build is green only 70% of time during the day.\n 4. By the time build is green there are commits to 4 finished \u0026 intermediate commits to an 1 un-finished story.\n 5. QA delivers the stories(4) which has been finished and 3 are accepted and 1 is rejected.\n 6. Among 3 accepted stories Marketing Team takes a call to hold 1 story even though its ready.\n 7. Now we have 2 production ready, 1 held by marketing, 1 rejected, 1 un-finished.\n 8. Commits related to 2 prod ready are shuffled between commits related to all non-ready stories.\n 9. Among 2 ready-to-deploy , 1 is marked urgent but it's commits are part of the day when CI build was RED (not necessarily due to this commit).\n 10. What and how would you deploy today?  (cherry-pick commits for a feature with no green build? FAIL) You post-pone release!\n  - ==Day Rolls Over==\n 11. 3 new stories requested by Product Managers.\n 12. An engineer finishes 2 of new stories quickly whose commits goes to master. 3rd new story might take long to finish, but gets its commits pushed to master.\n 13. Build is green and a tag on master is pushed to QA environment.\n 14. 2 new stories are delivered and accepted.\n 15. ...\n 16. Which staging tag on master would you deploy to production? At any given time there are commits from un-finished/un-delivered stories.\n\n\n### Solutions:\n 1. Sure you can use [feature toggle](http://martinfowler.com/bliki/FeatureToggle.html), but it only makes sense for long running (for weeks) set of stories. When every story starts to have a feature toggle, then system gets polluted with\n  if-else everywhere, which again is difficult to manage and error prone\n 2. You can also ask engineers to have separate feature branches for each stories and rebase with master often. This brings in its own [over heads](http://martinfowler.com/bliki/FeatureBranch.html)...\n  * Time spent in merging changes\n  * It needs a single controller of release branch who pulls the changes and makes sure what goes live is vetted. (This controller can soon become a bottleneck in the process)\n  * Engineers work in isolation and can not commit intermediate commits unless feature is complete.\n 3. Use All-Accepted Marker : This is a commit on master below which all stories have been accepted and there are few commits (shuffled with other un-finished) above the marker that can be cleanly cherry-picked.\n\n\n#### Workflow for All-Accepted Marker Deployment:\n  1. Find a suitable commit below which all stories are accepted\n  2. Branch out to new \"Release\" Branch\n  3. Inform stake-holders about what features are being released and locked down release marker\n  4. Cherry-pick related commits from above the marker to release branch\n  5. Build the release branch and wait for it to be green\n  6. Deploy release branch to production\n  7. Automate this entire process\n\n\n#### Chasing a commit for release:\n  1. You make a choice for commit in mainline, all the stories below that will be deployed. (but the stories are not yet accepted or in progress)\n  2. Inform everybody in your dev/prod mgmt team that following stories should be accepted before we release\n  3. Branch out to new \"Release\" Branch\n  4. In case, few stories are rejected or new bugs are discovered ask everyone to fix it on release branch and also backport (merge) those changes to mainline.\n  5. Once all stories are accepted, build the release branch and wait for it to be green\n  6. Deploy release branch to production\n  7. Automate this entire process\n\n### Deployment Pipeline @ Work :\n####Getting Started:\n\u003cpre\u003e\u003ccode\u003e\ndevelopers-machine:~/workspace/repository (master)$ \u003cb\u003epipeline help\u003c/b\u003e\nTasks:\n  pipeline help [TASK]       # Describe available tasks or one specific task\n  pipeline release_plan      # Prepares a release plan\n  pipeline setup             # Setup Deployment Pipeline Tool\n  pipeline status            # lists all stories with their status\n  pipeline suitable_release  # Suggests a release commit to be picked and also includes a release plan\n\nOptions:\n  [--config=CONFIG]  # A ruby file that defines relevant constants \u0026 configs. accepts ENV $PIPELINE_CONFIG\n                     # Default: /Users/dev_home/.pipeline_config\n\u003c/code\u003e\u003c/pre\u003e\n\n\n####Find Suitable Commit for All-Accepted Marker:\n\u003cpre\u003e\u003ccode\u003e\ndevelopers-machine:~/workspace/repository (master)$ \u003cb\u003epipeline suitable_release --last-release-commit=\"c0512b2cebf86e96baa1fe783ba4c01b55b40000\"\u003c/b\u003e\n  Analysing... c0512b2cebf86e96baa1fe783ba4c01b55b40000\n  Commit is untagged hence considered\n  Analysing... aaa756c1c79829aa6680df66dda62f0a59c336a1\n  Stories accepted for aaa756c1c79829aa6680df66dda62f0a59c336a1, hence considered\n  Analysing... 7b9cf2863e35add6663a7e964440b4f75befe572\n  Stories accepted for 7b9cf2863e35add6663a7e964440b4f75befe572, hence considered\n  Analysing... eb94f53ac8969fee134fe6677f7a6bf457b155c5\n  Stories accepted for eb94f53ac8969fee134fe6677f7a6bf457b155c5, hence considered\n  Analysing... 44d1324d0899cba238a3a53d470f655fcf4b64e2\n  Stories accepted for 44d1324d0899cba238a3a53d470f655fcf4b64e2, hence considered\n  Analysing... ef9d1a6a1e8bac5112c6ff491c97c083769bd553\n  Stories accepted for ef9d1a6a1e8bac5112c6ff491c97c083769bd553, hence considered\n  Analysing... ee0112cad3f58b362281c786a197d27148b13f12\n  Stories accepted for ee0112cad3f58b362281c786a197d27148b13f12, hence considered\n  Analysing... 331cdaca1cfd3672d901ca56218cef9330540241\n  Commit is untagged hence considered\n  Analysing... a2380cf7f3ad3ab660927bac6177073b123b002e\n  Commit is untagged hence considered\n  Analysing... b1c281030100d40f46057b5b8463ee7d16952b29\n  Commit is untagged hence considered\n  Analysing... e65d84b68ff038a96769bd9b10c1cb3997f625bb\n  Commit is untagged hence considered\n  Analysing... 20c4a74ffd298f0d9bf60679b23823fc32d4ec26\n  Unsuitable commit because story status is not accepted\n  \u003cb\u003eCommit that can be pickup up for release is: e65d84b68ff038a96769bd9b10c1cb3997f625bb\u003c/b\u003e\n\n\u003c/code\u003e\u003c/pre\u003e\n\n####Find status of stories between given commits on a branch:\n\n\u003cpre\u003e\u003ccode\u003e\ndevelopers-machine:~/workspace/repository (master)$ \u003cb\u003epipeline status --commit-range=\"3191320e8d7c5a402d17a560b12677b44344b300..9471d8794a28cc3a6888fa3a42c03edb4f4458812\" --html \u003c/b\u003e\nFetching...:   100% |============================================| Time:   0:00:11\nSTATUS:\n\u003c/code\u003e\u003c/pre\u003e\n\u003cquote\u003e\n\u003eOUTPUT:\n\u003e finished:\n\u003e\n  * (bug) [Users unable to reset their password](http://www.pivotaltracker.com/story/show/1)  requested by **Rajnikanth** owned by Tom Cruise\n  * (bug) [Banner ad spacing issue](http://www.pivotaltracker.com/story/show/2)  requested by **Bill G** owned by Jacky Chan\n\n\u003eaccepted:\n\u003e\n  * (chore) [Reduce memory foot print](http://www.pivotaltracker.com/story/show/3)  requested by **Big B** owned by Tony\n  * (feature) [Users can foresee their future](http://www.pivotaltracker.com/story/show/4)  requested by **Rajnikanth** owned by Tom Cruise\n\n\u003e Following commits have not been tagged, (**why?**)\n\u003e\n  * 3191320e8d7c5a402d17a560b12677b44d11b3d1  Super crazy commit by **Tom**\n  * 49297c0b1e28cc63d0117c62b08420a4465b6b8f  lazy to add tag by **Dick**\n  * 401a997f402666a148a8e54582b6feedfb7a9148  Fixed Build  by **Harry**\n\u003c/quote\u003e\n\n\n####Find suitable release plan (find out exact stuff that will be seen on production):\n\n\u003cpre\u003e\u003ccode\u003e\ndevelopers-machine:~/workspace/repository (master)$ \u003cb\u003epipeline release_plan  --last-release-commit=\"3191320e8d7c5a402g17a561b12777b44344b3d5\" --target-release-commit=\"9471d8794a28cc3a6888fa3a42c03eab4f445823\" --html \u003c/b\u003e\nFetching...:   100% |============================================| Time:   0:00:22\n\n\u003c/code\u003e\u003c/pre\u003e\n\u003cquote\u003e\n\u003eOUTPUT:\n\u003e Release can be locked at commit 9471d8794a28cc3a6888fa3a42c03edb4f4458a6\n\n\u003e Stories being released are:\n\u003e\n  * (chore) [Reduce memory foot print](http://www.pivotaltracker.com/story/show/3)  requested by **Big B** owned by Tony\n  * (feature) [Users can foresee their future](http://www.pivotaltracker.com/story/show/4)  requested by requested by **Rajnikanth** owned by Tom Cruise\n\n\n\u003e Commits that needs to be cherry-picked as they are part of above stories:\n\u003e\n  * 401a997f402666a148a8e54582b6feedfb7a9149  [#1234] Related to memory  by **Harry**\n\n\u003c/quote\u003e\n\n\n####Installation:\n\u003cpre\u003e\u003ccode\u003e\n  developers-machine:~/workspace/repository (master)$ \u003cb\u003egem install deployment_pipeline\u003c/b\u003e\n  developers-machine:~/workspace/repository (master)$ \u003cb\u003epipeline setup\u003c/b\u003e\n  Let's setup Deployment Pipeline\n  Pivotal Tracker Token:  \u003ci\u003e2d2b1f708d2b1f708cd2b1f708c\u003c/i\u003e\n  Pivotal Tracker Project Ids (comma separated):  \u003ci\u003e1234,5678,9876\u003c/i\u003e\n  Setup complete! (Configuration updated in \u003cb\u003e~/.pipeline_config\u003c/b\u003e)\n  Thanks for choosing Deployment Pipeline\n\n\u003c/code\u003e\u003c/pre\u003e\n\n\n####Gotchas:\n * [BUG] Segmentation fault (ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]): If you see random segmentation faults, install the rugged gem provided in the extra folder.\n\n\n####Inspiration\n\n * [Continuous Delivery](http://en.wikipedia.org/wiki/Continuous_delivery)\n * [Git Story](https://github.com/visibletrap/git_story) Project from [visibletrap](https://github.com/visibletrap) \u0026 [acroca](https://github.com/acroca)\n * [Jenkin's](http://jenkins-ci.org/) Build Pipeline Project\n\n####Thanks to the awesome team @ [Viki](http://viki.com) for letting me contribute to this project\n\n\u003csub\u003e\\[**1**\\]: Team which is motivated for [release-often philosophy](http://radar.oreilly.com/2009/03/continuous-deployment-5-eas.html) so much that it releases to production multiple times a day. It uses DVCS like **[Git](http://git-scm.com)** and agile story tracker like **[PIVOTAL TRACKER](http://www.pivotaltracker.com)**. It has adopted TDD \u0026 **[Continious Integration](http://en.wikipedia.org/wiki/Continuous_integration)** as way of life. Every engineer [commits to master all the time](http://martinfowler.com/bliki/FeatureBranch.html#PromiscuousIntegrationVsContinuousIntegration).\n\u003c/sub\u003e\n\n---------------------------------------------------------------\n\u003cfont size='1'\u003e\nCopyright (c) 2012 Abhishek Parolkar [abhishek[at]parolkar[dot]com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\u003c/font\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparolkar%2Fdeployment_pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparolkar%2Fdeployment_pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparolkar%2Fdeployment_pipeline/lists"}