{"id":16181835,"url":"https://github.com/ericclemmons/capistrano-svn-deployment","last_synced_at":"2026-07-14T18:02:04.180Z","repository":{"id":635043,"uuid":"276164","full_name":"ericclemmons/capistrano-svn-deployment","owner":"ericclemmons","description":"Example deployment script using Python \u0026 Capistrano for PHP apps in SVN","archived":false,"fork":false,"pushed_at":"2009-08-12T16:27:37.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-07T06:30:45.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/ericclemmons.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":"2009-08-12T15:32:44.000Z","updated_at":"2013-11-28T02:50:08.000Z","dependencies_parsed_at":"2022-07-07T13:40:38.278Z","dependency_job_id":null,"html_url":"https://github.com/ericclemmons/capistrano-svn-deployment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericclemmons/capistrano-svn-deployment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericclemmons%2Fcapistrano-svn-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericclemmons%2Fcapistrano-svn-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericclemmons%2Fcapistrano-svn-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericclemmons%2Fcapistrano-svn-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericclemmons","download_url":"https://codeload.github.com/ericclemmons/capistrano-svn-deployment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericclemmons%2Fcapistrano-svn-deployment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35472809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-10-10T06:28:16.598Z","updated_at":"2026-07-14T18:02:04.161Z","avatar_url":"https://github.com/ericclemmons.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[capistrano]: http://www.capify.org/index.php/Capistrano \"Capistrano\"\n[wf]: http://www.whitefence.com \"WhiteFence\"\n[et]: http://www.electricitytexas.com \"ET\"\n\n# Sample Capistrano Deployment Script\n\n**For now, this script is based on SVN conventions**\n\nThe primary purpose of this script, besides automating deployment is:\n\n*   Automated tagging of releases\n*   Deployment of tests to testing servers (for A/B testing)\n*   Deployment of latest release to staging environment\n*   Notification with commit comments, diffs, etc. for each new release\n\n## Background\nI've recently began setting up automated deployment for my various PHP apps to testing, staging\n\u0026 development servers.  Namely, sites such as [WhiteFence.com][wf], [ElectricityTexas.com][et] and\nseveral other client sites.\n\nI'm moving all of my projects to *Git*, so this script will be modified accordingly.\n\n## How it works\n\nThere are 3 files involved with deployment:\n\n*   `deploy`\n    \n    Defines the *repositores*, *servers*, and *notification email*, as well as how logging is handled.\n    \n*   deployment.py\n    \n    Class that actually performs the deployment.  This is highly based on convention.\n    \n*   capistrano.sh\n    \n    An `expect` script that performed many of the SVN operations.  This is because various SVN commands\n    sent false *EOF* signals to Python (most likely because of child processes spawning) and had to be\n    caught via `expect`.\n\n- - -    \n## How to use it\n\n### Setup SVN Project Structure\n\nMany of the commands from the script are based on folder structure, which should be as follows:\n    \n    my-project/\n        trunk/\n        branches/\n        tags/\n        tests/\n\n### Configure `deployment.py`\n\n    *todo*\n\n### Deploy\n\n#### Typical Deployment\n\n    # deploy my-project\n\n#### Deploy to staging environment\n\n    # deploy --stage my-project\n\n#### Deploy tests to testing tier\n\n    # deploy --tests my-project\n\n#### Deploy tests to staging tier\n\n    # deploy --tests --stage my-project\n    \n- - -\n## What's going on behind the scenes?\n\n### When deploying to production/stage\n\n1.  Script checks latest revision of `my-project`, `trunk`, and latest `tag`.\n2.  If the `trunk` has been modified since last `tag`, a new `tag` is made at that revision.\n3.  Script decides testing tier based on the presence of `--stage` switch.\n4.  Capistrano script is created for deploying the latest `tag` to the proper tier.\n5.  Capistrano script is ran:\n    1. Remote deployment folder is initialized.\n    2. Old releases are cleaned up.\n    3. New release is exported to `/releases` \u0026 symlinked to `/current` folder on tier.\n6.  If there is an error, Capistrano performs a `--rollback`.\n7.  Finished.\n\n### When deploying tests...\n\nThe process is the same as above, except that:\n\n*   Tests in the `/tests` folder are not tagged, and are simply deployed as-is.\n*   Tests are spread across the testing tier.  For example, if there are *2 tests* and *4 servers*,\n    `Test A` will be placed on servers 1 \u0026 2, while `Test B` will be placed on servers 3 \u0026 4.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericclemmons%2Fcapistrano-svn-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericclemmons%2Fcapistrano-svn-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericclemmons%2Fcapistrano-svn-deployment/lists"}