|
| 1 | +# Dkdeploy::Php |
| 2 | + |
| 3 | +[](https://travis-ci.org/repositories/dkdeploy/dkdeploy-php) |
| 4 | +[](https://badge.fury.io/rb/dkdeploy-php) [](http://inch-ci.org/github/dkdeploy/dkdeploy-php) |
| 5 | + |
| 6 | +## Description |
| 7 | + |
| 8 | +This Rubygem `dkdeploy-php` ruby gem represents the extension of [Capistrano](http://capistranorb.com/) tasks directed to the advanced deployment process. |
| 9 | + |
| 10 | +## Installation |
| 11 | + |
| 12 | +Add this line to your application's `Gemfile` |
| 13 | + |
| 14 | + gem 'dkdeploy-php', '~> 7.0' |
| 15 | + |
| 16 | +and then execute |
| 17 | + |
| 18 | + bundle install |
| 19 | + |
| 20 | +or install it yourself as |
| 21 | + |
| 22 | + gem install dkdeploy-php |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +Run in your project root |
| 27 | + |
| 28 | + cap install STAGES='dev,integration,testing,production' |
| 29 | + |
| 30 | +This command will create the following Capistrano file structure with all the standard pre-configured constants. |
| 31 | +Please be aware of the difference to the [native installation](http://capistranorb.com/documentation/getting-started/preparing-your-application/) of Capistrano. |
| 32 | +Certainly you have to adjust `config/deploy.rb` and respective stages and customize them for your needs. |
| 33 | + |
| 34 | +<pre> |
| 35 | + ├── Capfile |
| 36 | + └── config |
| 37 | + ├── deploy |
| 38 | + │ ├── dev.rb |
| 39 | + │ ├── integration.rb |
| 40 | + │ ├── testing.rb |
| 41 | + │ └── production.rb |
| 42 | + └── deploy.rb |
| 43 | +</pre> |
| 44 | + |
| 45 | +As next you have to append the following line to the `Capfile` in order to make use of dkdeploy extensions in addition to the standard Capistrano tasks: |
| 46 | + |
| 47 | + require 'capistrano/dkdeploy/php' |
| 48 | + |
| 49 | +To convince yourself, that Capistrano tasks list has been extended, please run |
| 50 | + |
| 51 | + cap -T |
| 52 | + |
| 53 | +Please note, that dkdeploy uses the local copy strategy and overwrites the `:scm` constant. If you want to use it, |
| 54 | +you should do nothing more. However if you want to change it for example to `:git`, please add the following line to `deploy.rb` |
| 55 | + |
| 56 | + set :scm, :git |
| 57 | + |
| 58 | +For more information about available Capistrano constants please use the [Capistrano documentation](http://capistranorb.com/documentation/getting-started/preparing-your-application/). |
| 59 | +The complete list of the dkdeploy-php constants you find in `/lib/capistrano/dkdeploy/php.rb`. |
| 60 | + |
| 61 | +## Testing |
| 62 | + |
| 63 | +### Prerequisite |
| 64 | + |
| 65 | +Vagrant `landrush` plugin is needed. If there are issues, make sure that the following IPv4 address is used for this domain |
| 66 | + |
| 67 | + 192.168.156.181 dkdeploy-php.dev |
| 68 | + |
| 69 | +### Running tests |
| 70 | + |
| 71 | +1. Starting the local box (`vagrant up --provision`) |
| 72 | +2. Checking coding styles (`rubocop`) |
| 73 | +3. Running BDD cucumber tests (`cucumber`) |
| 74 | + |
| 75 | +## Contributing |
| 76 | + |
| 77 | +1. Install [git flow](https://github.com/nvie/gitflow) |
| 78 | +2. If project is not checked out already do git clone `git@github.com:dkdeploy/dkdeploy-php.git` |
| 79 | +3. Checkout origin develop branch (`git checkout --track -b develop origin/develop`) |
| 80 | +4. Git flow initialze `git flow init -d` |
| 81 | +5. Installing gems `bundle install` |
| 82 | +6. Create new feature branch (`git flow feature start my-new-feature`) |
| 83 | +7. Run tests (README.md Testing) |
| 84 | +8. Commit your changes (`git commit -am 'Add some feature'`) |
0 commit comments