dkdeploy-php 7.0.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -1
- data/.travis.yml +3 -2
- data/Berksfile.lock +2 -0
- data/CHANGELOG.md +16 -0
- data/CONTRIBUTORS.md +2 -0
- data/LICENSE +1 -1
- data/README.md +4 -2
- data/Rakefile +0 -3
- data/Vagrantfile +4 -11
- data/assets/dkdeploy-logo.png +0 -0
- data/config/vm/cookbooks/dkdeploy-php/metadata.rb +1 -0
- data/config/vm/cookbooks/dkdeploy-php/recipes/default.rb +16 -0
- data/config/vm/cookbooks/dkdeploy-php/templates/default/web_app.conf.erb +35 -0
- data/dkdeploy-php.gemspec +11 -8
- data/features/php.feature +15 -0
- data/features/support/step_definitions/steps.rb +11 -0
- data/lib/capistrano/dkdeploy/php.rb +4 -0
- data/lib/dkdeploy/php/helpers/http.rb +9 -8
- data/lib/dkdeploy/php/tasks/composer.rake +1 -1
- data/lib/dkdeploy/php/tasks/db.rake +2 -2
- data/lib/dkdeploy/php/tasks/php.rake +0 -2
- data/lib/dkdeploy/php/version.rb +1 -1
- data/spec/fixtures/application/config/deploy/dev.rb +3 -3
- data/spec/fixtures/capistrano/configuration/server_with_faulty_domain_configuration.rb +1 -1
- data/spec/fixtures/capistrano/configuration/server_with_ssl.rb +1 -0
- data/spec/fixtures/capistrano/configuration/server_with_valid_domain.rb +1 -1
- metadata +62 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 628972cdda81ecf60ccc9cb092029d0665fde0f1
|
4
|
+
data.tar.gz: 10bedd5854d79e6bbcbeff58e3db433109c96ae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faba7deb9a67e7f9a12074621b4be1b1cb2501df093a9a744b0af21256a1123f1bd4115ce8f102026b48d78684da0e7f33d8908d03ee65123c351f1beb019517
|
7
|
+
data.tar.gz: d672ce7d13b822b05f8fda05cac01b05f9a7b14177391ae2903685d10849de77360534c6973310f70b5c90cfacfb5a335fc5cc80a87bd50a3da475d3a76ab6cb
|
data/.rubocop.yml
CHANGED
@@ -2,8 +2,13 @@ AllCops:
|
|
2
2
|
Exclude:
|
3
3
|
- 'tmp/**/*'
|
4
4
|
- 'spec/fixtures/application/htdocs/stylesheets/**/config.rb'
|
5
|
-
- 'Vagrantfile'
|
6
5
|
- 'config/**/*'
|
6
|
+
- 'Vagrantfile'
|
7
|
+
- 'vendor/**/*'
|
8
|
+
TargetRubyVersion: 2.2
|
9
|
+
ExtraDetails: true
|
10
|
+
DisplayStyleGuide: true
|
11
|
+
DisplayCopNames: true
|
7
12
|
GlobalVars:
|
8
13
|
AllowedVariables: []
|
9
14
|
MethodLength:
|
@@ -20,3 +25,7 @@ Metrics/AbcSize:
|
|
20
25
|
Max: 30
|
21
26
|
Style/SignalException:
|
22
27
|
EnforcedStyle: only_raise
|
28
|
+
Style/FormatStringToken:
|
29
|
+
Enabled: false
|
30
|
+
Metrics/BlockLength:
|
31
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/Berksfile.lock
CHANGED
@@ -18,6 +18,7 @@ GRAPH
|
|
18
18
|
mysql (~> 6.1)
|
19
19
|
mysql2_chef_gem (~> 1.0)
|
20
20
|
php (~> 1.9)
|
21
|
+
ssl_certificate (~> 1.12.0)
|
21
22
|
iis (4.1.7)
|
22
23
|
windows (>= 1.34.6)
|
23
24
|
mariadb (0.3.1)
|
@@ -49,6 +50,7 @@ GRAPH
|
|
49
50
|
windows (>= 1.2.2)
|
50
51
|
smf (2.2.8)
|
51
52
|
rbac (>= 1.0.1)
|
53
|
+
ssl_certificate (1.12.0)
|
52
54
|
windows (1.40.0)
|
53
55
|
chef_handler (>= 0.0.0)
|
54
56
|
xml (2.0.0)
|
data/CHANGELOG.md
CHANGED
@@ -2,10 +2,26 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [8.0.0] - 2017-09-18
|
6
|
+
### Summary
|
7
|
+
|
8
|
+
- `:ssl_verify_mode` for server properties, which takes SSL verify_mode constants (`OpenSSL::SSL::VERIFY_NONE`)
|
9
|
+
- `Dkdeploy::Php::Helpers::Http::http_get_with_redirect` gets arguments as options hash now
|
10
|
+
- Vagrant 2.0.x support
|
11
|
+
- rubocop upgrade to 0.50
|
12
|
+
- ruby upgrade to 2.2
|
13
|
+
- bundler upgrade
|
14
|
+
- rake upgrade
|
15
|
+
- dkdeploy-test_environment upgrade to 2.0
|
16
|
+
- dkdeploy-core upgrade 9.0
|
17
|
+
- Add dependencies for cucumber, rubocop, aruba and mysql2
|
18
|
+
- remove SSL certificate bypassing in http helper #5
|
19
|
+
|
5
20
|
## [7.0.0] - 2016-07-01
|
6
21
|
### Summary
|
7
22
|
|
8
23
|
- first public release
|
9
24
|
|
10
25
|
[Unreleased]: https://github.com/dkdeploy/dkdeploy-php/compare/master...develop
|
26
|
+
[8.0.0]: https://github.com/dkdeploy/dkdeploy-php/releases/tag/v8.0.0
|
11
27
|
[7.0.0]: https://github.com/dkdeploy/dkdeploy-php/releases/tag/v7.0.0
|
data/CONTRIBUTORS.md
CHANGED
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2014-
|
1
|
+
Copyright (c) 2014-2017 dkd Internet Service GmbH, Frankfurt am Main (Germany), https://dkd.de/
|
2
2
|
|
3
3
|
Permission 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:
|
4
4
|
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
![dkdeploy::php](assets/dkdeploy-logo.png)
|
2
|
+
|
1
3
|
# Dkdeploy::Php
|
2
4
|
|
3
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://travis-ci.org/dkdeploy/dkdeploy-php.svg?branch=develop)](https://travis-ci.org/dkdeploy/dkdeploy-php)
|
4
6
|
[![Gem Version](https://badge.fury.io/rb/dkdeploy-php.svg)](https://badge.fury.io/rb/dkdeploy-php) [![Inline docs](http://inch-ci.org/github/dkdeploy/dkdeploy-php.svg?branch=develop)](http://inch-ci.org/github/dkdeploy/dkdeploy-php)
|
5
7
|
|
6
8
|
## Description
|
@@ -11,7 +13,7 @@ This Rubygem `dkdeploy-php` ruby gem represents the extension of [Capistrano](ht
|
|
11
13
|
|
12
14
|
Add this line to your application's `Gemfile`
|
13
15
|
|
14
|
-
gem 'dkdeploy-php', '~>
|
16
|
+
gem 'dkdeploy-php', '~> 8.0'
|
15
17
|
|
16
18
|
and then execute
|
17
19
|
|
data/Rakefile
CHANGED
data/Vagrantfile
CHANGED
@@ -5,17 +5,10 @@ unless Vagrant.has_plugin?('vagrant-berkshelf')
|
|
5
5
|
abort
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
puts "Please install vagrant plugin vagrant-omnibus first\n"
|
10
|
-
puts " vagrant plugin install vagrant-omnibus\n\n"
|
11
|
-
puts "Exit vagrant\n\n"
|
12
|
-
abort
|
13
|
-
end
|
14
|
-
|
15
|
-
Vagrant.require_version '>= 1.8.1'
|
8
|
+
Vagrant.require_version '~> 2.0.0'
|
16
9
|
chef_version = '12.9.41'
|
17
10
|
|
18
|
-
Vagrant.configure(
|
11
|
+
Vagrant.configure(2) do |config|
|
19
12
|
domain = 'dkdeploy-php.dev'
|
20
13
|
domain_second = 'second-dkdeploy-php.dev'
|
21
14
|
ip_address = '192.168.156.181'
|
@@ -23,7 +16,6 @@ Vagrant.configure('2') do |config|
|
|
23
16
|
config.vm.box = 'ubuntu/trusty64'
|
24
17
|
config.vm.box_check_update = false
|
25
18
|
config.berkshelf.enabled = true
|
26
|
-
config.omnibus.chef_version = chef_version
|
27
19
|
|
28
20
|
config.vm.define('dkdeploy-php', primary: true) do |master_config|
|
29
21
|
master_config.vm.network 'private_network', ip: ip_address
|
@@ -31,7 +23,8 @@ Vagrant.configure('2') do |config|
|
|
31
23
|
# Chef settings
|
32
24
|
master_config.vm.provision :chef_solo do |chef|
|
33
25
|
chef.version = chef_version
|
34
|
-
chef.install =
|
26
|
+
chef.install = true
|
27
|
+
chef.channel = 'stable'
|
35
28
|
chef.log_level = :info
|
36
29
|
chef.add_recipe 'dkdeploy-php'
|
37
30
|
chef.json = {}
|
Binary file
|
@@ -56,16 +56,22 @@ end
|
|
56
56
|
# Apache
|
57
57
|
include_recipe 'apache2'
|
58
58
|
include_recipe 'apache2::mod_php5'
|
59
|
+
include_recipe 'apache2::mod_ssl'
|
59
60
|
|
60
61
|
# install apache2-utils. It is needed for the assets:add_htpasswd task
|
61
62
|
package 'apache2-utils' do
|
62
63
|
action :install
|
63
64
|
end
|
64
65
|
|
66
|
+
ssl_key_path = '/var/www/dkdeploy.key'
|
67
|
+
ssl_cert_path = '/var/www/dkdeploy.pem'
|
68
|
+
|
65
69
|
web_app 'dkdeploy-php.dev' do
|
66
70
|
server_name 'dkdeploy-php.dev'
|
67
71
|
server_aliases ['second-dkdeploy-php.dev']
|
68
72
|
docroot '/var/www/dkdeploy/current/'
|
73
|
+
key_path ssl_key_path
|
74
|
+
cert_path ssl_cert_path
|
69
75
|
template 'web_app.conf.erb'
|
70
76
|
end
|
71
77
|
|
@@ -75,3 +81,13 @@ directory '/var/www/' do
|
|
75
81
|
mode '0770'
|
76
82
|
action :create
|
77
83
|
end
|
84
|
+
|
85
|
+
ssl_certificate 'dkdeploy-php.dev' do
|
86
|
+
key_path ssl_key_path
|
87
|
+
key_mode 00755
|
88
|
+
cert_path ssl_cert_path
|
89
|
+
domain 'dkdeploy-php.dev'
|
90
|
+
organization 'dkdeploy'
|
91
|
+
email 'offical@example.com'
|
92
|
+
notifies :restart, 'service[apache2]'
|
93
|
+
end
|
@@ -26,3 +26,38 @@
|
|
26
26
|
php_admin_value realpath_cache_ttl 0
|
27
27
|
php_admin_value realpath_cache_size 0k
|
28
28
|
</VirtualHost>
|
29
|
+
|
30
|
+
<VirtualHost *:443>
|
31
|
+
ServerName <%= @params[:server_name] %>
|
32
|
+
ServerAlias <%= @params[:server_aliases].join(' ') %>
|
33
|
+
DocumentRoot <%= @params[:docroot] %>
|
34
|
+
RewriteEngine On
|
35
|
+
|
36
|
+
<Directory <%= @params[:docroot] %>>
|
37
|
+
Options FollowSymLinks
|
38
|
+
AllowOverride None
|
39
|
+
Require all granted
|
40
|
+
</Directory>
|
41
|
+
|
42
|
+
<Directory />
|
43
|
+
Options FollowSymLinks
|
44
|
+
AllowOverride None
|
45
|
+
</Directory>
|
46
|
+
|
47
|
+
<IfModule mod_ssl.c>
|
48
|
+
SSLEngine on
|
49
|
+
SSLCertificateFile <%= @params[:cert_path] %>
|
50
|
+
SSLCertificateKeyFile <%= @params[:key_path] %>
|
51
|
+
</IfModule>
|
52
|
+
|
53
|
+
LogLevel info
|
54
|
+
ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
|
55
|
+
CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
|
56
|
+
|
57
|
+
RewriteEngine On
|
58
|
+
LogLevel info rewrite:trace2 alias:debug
|
59
|
+
|
60
|
+
# Deactivate php realpath cache
|
61
|
+
php_admin_value realpath_cache_ttl 0
|
62
|
+
php_admin_value realpath_cache_size 0k
|
63
|
+
</VirtualHost>
|
data/dkdeploy-php.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'dkdeploy/php/version'
|
@@ -7,21 +6,25 @@ Gem::Specification.new do |spec|
|
|
7
6
|
spec.name = 'dkdeploy-php'
|
8
7
|
spec.version = Dkdeploy::Php::Version
|
9
8
|
spec.license = 'MIT'
|
10
|
-
spec.authors = ['
|
11
|
-
spec.email = [
|
9
|
+
spec.authors = ['Timo Webler', 'Nicolai Reuschling']
|
10
|
+
spec.email = %w[timo.webler@dkd.de nicolai.reuschling@dkd.de]
|
12
11
|
spec.description = 'dkd PHP deployment tasks and strategies'
|
13
12
|
spec.summary = 'dkd php deployment tasks and strategies'
|
14
13
|
spec.homepage = 'https://github.com/dkdeploy/dkdeploy-php'
|
14
|
+
spec.required_ruby_version = '~> 2.2'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency 'bundler'
|
22
|
-
spec.add_development_dependency 'rake'
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency '
|
21
|
+
spec.add_development_dependency 'bundler'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'cucumber', '~> 2.4'
|
24
|
+
spec.add_development_dependency 'rubocop', '~> 0.50.0'
|
25
|
+
spec.add_development_dependency 'aruba', '~> 0.14.1'
|
26
|
+
spec.add_development_dependency 'mysql2', '~> 0.3'
|
27
|
+
spec.add_development_dependency 'dkdeploy-test_environment', '~> 2.0'
|
25
28
|
|
26
|
-
spec.add_dependency 'dkdeploy-core', '~>
|
29
|
+
spec.add_dependency 'dkdeploy-core', '~> 9.0'
|
27
30
|
end
|
data/features/php.feature
CHANGED
@@ -42,3 +42,18 @@ Feature: Test tasks for namespace 'php'
|
|
42
42
|
And I extend the development capistrano configuration from the fixture file server_with_faulty_domain_configuration.rb
|
43
43
|
When I run `cap dev php:clear_opcache`
|
44
44
|
Then the exit status should not be 0
|
45
|
+
|
46
|
+
Scenario: Clear APC via HTTPS
|
47
|
+
Given a directory named "temp"
|
48
|
+
And I extend the development capistrano configuration from the fixture file server_with_ssl.rb
|
49
|
+
And I inject the root SSL certificate
|
50
|
+
When I run `cap dev php:clear_apc_cache`
|
51
|
+
Then the exit status should be 0
|
52
|
+
And the output should contain "200 - OK"
|
53
|
+
|
54
|
+
Scenario: Clear APC via HTTPS and failing SSL certificate
|
55
|
+
Given a directory named "temp"
|
56
|
+
And I extend the development capistrano configuration from the fixture file server_with_ssl.rb
|
57
|
+
When I run `cap dev php:clear_apc_cache`
|
58
|
+
Then the exit status should not be 0
|
59
|
+
And the output should contain "certificate verify failed"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'erb'
|
2
2
|
require 'ostruct'
|
3
3
|
|
4
|
+
include Dkdeploy::TestEnvironment::Constants # to get access to test_app_path method
|
4
5
|
# Creates an empty doctrine migration with a given migration version and basic content
|
5
6
|
#
|
6
7
|
# @yieldparam migration_version [String] the 14 digits migration number
|
@@ -13,3 +14,13 @@ Given(/^an empty doctrine migration with name "([^"]*)"$/) do |file_path|
|
|
13
14
|
empty_doctrine_migration_template = ERB.new File.read(empty_doctrine_migration_template_path)
|
14
15
|
write_file file_path, empty_doctrine_migration_template.result(context_object.binding_for_erb)
|
15
16
|
end
|
17
|
+
|
18
|
+
Given(/^I set relative to current path the environment variable "(.*)" to "(.*)"/) do |variable, value|
|
19
|
+
set_environment_variable(variable.to_s, test_app_path + value.to_s)
|
20
|
+
end
|
21
|
+
|
22
|
+
# injects the self-signed certificate into environment variables to simulate a valid certificate
|
23
|
+
Given('I inject the root SSL certificate') do
|
24
|
+
steps 'When I run `cap dev utils:download_file[../../../dkdeploy.pem]`
|
25
|
+
Given I set relative to current path the environment variable "SSL_CERT_FILE" to "/temp/dkdeploy.dkdeploy-php.dev.pem"'
|
26
|
+
end
|
@@ -21,5 +21,9 @@ namespace :load do
|
|
21
21
|
|
22
22
|
set :remote_opcache_file_name, 'opcache_reset.php'
|
23
23
|
set :local_opcache_file, File.join(__dir__, '..', '..', '..', 'vendor', 'opcache_reset.php')
|
24
|
+
|
25
|
+
# timeouts for Net::HTTP
|
26
|
+
set :http_open_timeout, nil
|
27
|
+
set :http_read_timeout, 60
|
24
28
|
end
|
25
29
|
end
|
@@ -18,39 +18,40 @@ module Dkdeploy
|
|
18
18
|
web_server_port = domain_scheme == 'https' ? 443 : 80
|
19
19
|
# Use server configuration, if exists
|
20
20
|
web_server_port = server.fetch(:web_server_port) if server.properties.respond_to?(:web_server_port)
|
21
|
+
ssl_verify_mode = server.properties.respond_to?(:ssl_verify_mode) ? server.fetch(:ssl_verify_mode) : OpenSSL::SSL::VERIFY_PEER
|
21
22
|
|
22
23
|
url = URI.parse("#{domain_scheme}://#{domain}").merge("/#{filename}")
|
23
24
|
url.port = web_server_port
|
24
25
|
info "Call URL #{url}"
|
25
26
|
|
26
|
-
http_get_with_redirect url
|
27
|
+
http_get_with_redirect url: url, verify_mode: ssl_verify_mode
|
27
28
|
end
|
28
29
|
|
29
30
|
# Sends a get request that handles redirects
|
30
31
|
#
|
31
32
|
# @param url [URI]
|
32
33
|
# @param limit [Integer] defines how many redirects are allowed
|
34
|
+
# @param verify_mode [OpenSSL::SSL::verify_mode] ssl verify mode, setting to VERIFY_NONE disables certificate check
|
33
35
|
# @return [NET::HTTPResponse]
|
34
|
-
def http_get_with_redirect(url
|
36
|
+
def http_get_with_redirect(url:, limit: 5, verify_mode: OpenSSL::SSL::VERIFY_PEER)
|
35
37
|
limit = Integer(limit)
|
36
38
|
raise ArgumentError, 'limit cannot be negative' if limit < 0
|
37
39
|
raise 'too many HTTP redirects' if limit.zero?
|
38
40
|
# configure Net::HTTP
|
39
41
|
http = Net::HTTP.new(url.host, url.port)
|
40
|
-
http.open_timeout = fetch :http_open_timeout
|
41
|
-
http.read_timeout = fetch :http_read_timeout
|
42
|
+
http.open_timeout = fetch :http_open_timeout
|
43
|
+
http.read_timeout = fetch :http_read_timeout
|
42
44
|
if url.scheme == 'https'
|
43
45
|
http.use_ssl = true
|
44
|
-
http.verify_mode =
|
46
|
+
http.verify_mode = verify_mode
|
45
47
|
end
|
46
48
|
request = Net::HTTP::Get.new(url.path) # build request
|
47
|
-
# call url
|
48
|
-
response = http.request(request)
|
49
|
+
response = http.request(request) # call url
|
49
50
|
if response.is_a? Net::HTTPRedirection
|
50
51
|
# Does not handle multiple redirects. Code/idea from http://stackoverflow.com/a/7210600/1796645
|
51
52
|
location = URI.parse(response.header['location'])
|
52
53
|
info "redirected to #{location}"
|
53
|
-
response = http_get_with_redirect(location, limit - 1)
|
54
|
+
response = http_get_with_redirect(url: location, limit: limit - 1, verify_mode: verify_mode)
|
54
55
|
end
|
55
56
|
response
|
56
57
|
end
|
@@ -24,7 +24,7 @@ namespace :composer do
|
|
24
24
|
begin
|
25
25
|
# run composer status
|
26
26
|
invoke 'composer:local:run', :status
|
27
|
-
rescue
|
27
|
+
rescue SSHKit::StandardError
|
28
28
|
run_locally do
|
29
29
|
command = SSHKit::Command.new :composer, :status, '-v', *default_arguments
|
30
30
|
error I18n.t('tasks.composer.local.check_status.failure', command: command.to_s, scope: :dkdeploy)
|
@@ -18,7 +18,7 @@ namespace :db do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
desc 'Show migration status'
|
21
|
-
task status: [
|
21
|
+
task status: %i[copy_doctrine_to_server copy_migrations_to_server] do
|
22
22
|
run_locally do
|
23
23
|
info I18n.t('tasks.db.migrations.status.info', scope: :dkdeploy)
|
24
24
|
end
|
@@ -30,7 +30,7 @@ namespace :db do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
desc 'Migrate Database'
|
33
|
-
task migrate: [
|
33
|
+
task migrate: %i[copy_doctrine_to_server copy_migrations_to_server] do
|
34
34
|
run_locally do
|
35
35
|
info I18n.t('tasks.db.migrations.migrate.info', scope: :dkdeploy)
|
36
36
|
end
|
@@ -43,7 +43,6 @@ namespace :php do
|
|
43
43
|
error I18n.t('tasks.php.clear_apc_cache.response_not_success', code: response.code, message: response.message, scope: :dkdeploy)
|
44
44
|
raise
|
45
45
|
end
|
46
|
-
|
47
46
|
ensure
|
48
47
|
# Delete file, if uploaded before
|
49
48
|
execute(:rm, '-f', remote_apc_file) if delete_apc_file
|
@@ -80,7 +79,6 @@ namespace :php do
|
|
80
79
|
error I18n.t('tasks.php.clear_opcache.response_not_success', code: response.code, message: response.message, scope: :dkdeploy)
|
81
80
|
raise
|
82
81
|
end
|
83
|
-
|
84
82
|
ensure
|
85
83
|
# Delete file, if uploaded before
|
86
84
|
execute(:rm, '-f', remote_opcache_file) if delete_opcache_file
|
data/lib/dkdeploy/php/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
set :deploy_to, '/var/www/dkdeploy'
|
2
|
-
server 'dkdeploy-php.dev', roles: %w
|
2
|
+
server 'dkdeploy-php.dev', roles: %w[web app backend], primary: true
|
3
3
|
|
4
4
|
# no ssh compression on the dev stage
|
5
5
|
set :ssh_options, {
|
@@ -18,11 +18,11 @@ unless ssh_key_files.empty?
|
|
18
18
|
end
|
19
19
|
|
20
20
|
set :copy_source, 'htdocs'
|
21
|
-
set :copy_exclude, %w
|
21
|
+
set :copy_exclude, %w[
|
22
22
|
Gemfile*
|
23
23
|
.hidden
|
24
24
|
**/.hidden
|
25
|
-
|
25
|
+
]
|
26
26
|
|
27
27
|
# Set http open timeout to 1 second
|
28
28
|
set :http_open_timeout, 60
|
@@ -1,2 +1,2 @@
|
|
1
1
|
|
2
|
-
server 'dkdeploy-php.dev', roles: %w
|
2
|
+
server 'dkdeploy-php.dev', roles: %w[web app backend], domain: 'not-existing-dkdeploy.dev'
|
@@ -0,0 +1 @@
|
|
1
|
+
server 'dkdeploy-php.dev', roles: %w[web app backend], primary: true, domain_scheme: 'https'
|
@@ -1,2 +1,2 @@
|
|
1
1
|
|
2
|
-
server 'dkdeploy-php.dev', roles: %w
|
2
|
+
server 'dkdeploy-php.dev', roles: %w[web app backend], domain: 'second-dkdeploy-php.dev'
|
metadata
CHANGED
@@ -1,93 +1,131 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dkdeploy-php
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Lars Tode
|
8
7
|
- Timo Webler
|
9
|
-
- Kieran Hayes
|
10
8
|
- Nicolai Reuschling
|
11
9
|
autorequire:
|
12
10
|
bindir: bin
|
13
11
|
cert_chain: []
|
14
|
-
date:
|
12
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
15
13
|
dependencies:
|
16
14
|
- !ruby/object:Gem::Dependency
|
17
15
|
name: bundler
|
18
16
|
requirement: !ruby/object:Gem::Requirement
|
19
17
|
requirements:
|
20
|
-
- - "
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
20
|
+
version: '0'
|
23
21
|
type: :development
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
|
-
- - "
|
25
|
+
- - ">="
|
28
26
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
27
|
+
version: '0'
|
30
28
|
- !ruby/object:Gem::Dependency
|
31
29
|
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: cucumber
|
32
44
|
requirement: !ruby/object:Gem::Requirement
|
33
45
|
requirements:
|
34
46
|
- - "~>"
|
35
47
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
48
|
+
version: '2.4'
|
37
49
|
type: :development
|
38
50
|
prerelease: false
|
39
51
|
version_requirements: !ruby/object:Gem::Requirement
|
40
52
|
requirements:
|
41
53
|
- - "~>"
|
42
54
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
55
|
+
version: '2.4'
|
44
56
|
- !ruby/object:Gem::Dependency
|
45
57
|
name: rubocop
|
46
58
|
requirement: !ruby/object:Gem::Requirement
|
47
59
|
requirements:
|
48
60
|
- - "~>"
|
49
61
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
62
|
+
version: 0.50.0
|
51
63
|
type: :development
|
52
64
|
prerelease: false
|
53
65
|
version_requirements: !ruby/object:Gem::Requirement
|
54
66
|
requirements:
|
55
67
|
- - "~>"
|
56
68
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
69
|
+
version: 0.50.0
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: aruba
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.14.1
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.14.1
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: mysql2
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0.3'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0.3'
|
58
98
|
- !ruby/object:Gem::Dependency
|
59
99
|
name: dkdeploy-test_environment
|
60
100
|
requirement: !ruby/object:Gem::Requirement
|
61
101
|
requirements:
|
62
102
|
- - "~>"
|
63
103
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
104
|
+
version: '2.0'
|
65
105
|
type: :development
|
66
106
|
prerelease: false
|
67
107
|
version_requirements: !ruby/object:Gem::Requirement
|
68
108
|
requirements:
|
69
109
|
- - "~>"
|
70
110
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
111
|
+
version: '2.0'
|
72
112
|
- !ruby/object:Gem::Dependency
|
73
113
|
name: dkdeploy-core
|
74
114
|
requirement: !ruby/object:Gem::Requirement
|
75
115
|
requirements:
|
76
116
|
- - "~>"
|
77
117
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
118
|
+
version: '9.0'
|
79
119
|
type: :runtime
|
80
120
|
prerelease: false
|
81
121
|
version_requirements: !ruby/object:Gem::Requirement
|
82
122
|
requirements:
|
83
123
|
- - "~>"
|
84
124
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
125
|
+
version: '9.0'
|
86
126
|
description: dkd PHP deployment tasks and strategies
|
87
127
|
email:
|
88
|
-
- lars.tode@dkd.de
|
89
128
|
- timo.webler@dkd.de
|
90
|
-
- kieran.hayes@dkd.de
|
91
129
|
- nicolai.reuschling@dkd.de
|
92
130
|
executables: []
|
93
131
|
extensions: []
|
@@ -105,6 +143,7 @@ files:
|
|
105
143
|
- README.md
|
106
144
|
- Rakefile
|
107
145
|
- Vagrantfile
|
146
|
+
- assets/dkdeploy-logo.png
|
108
147
|
- config/vm/cookbooks/dkdeploy-php/attributes/default.rb
|
109
148
|
- config/vm/cookbooks/dkdeploy-php/metadata.rb
|
110
149
|
- config/vm/cookbooks/dkdeploy-php/recipes/default.rb
|
@@ -136,6 +175,7 @@ files:
|
|
136
175
|
- spec/fixtures/application/vendor/composer.phar
|
137
176
|
- spec/fixtures/application/vendor/doctrine-migrations.phar
|
138
177
|
- spec/fixtures/capistrano/configuration/server_with_faulty_domain_configuration.rb
|
178
|
+
- spec/fixtures/capistrano/configuration/server_with_ssl.rb
|
139
179
|
- spec/fixtures/capistrano/configuration/server_with_valid_domain.rb
|
140
180
|
- vendor/apc_clear.php
|
141
181
|
- vendor/opcache_reset.php
|
@@ -149,9 +189,9 @@ require_paths:
|
|
149
189
|
- lib
|
150
190
|
required_ruby_version: !ruby/object:Gem::Requirement
|
151
191
|
requirements:
|
152
|
-
- - "
|
192
|
+
- - "~>"
|
153
193
|
- !ruby/object:Gem::Version
|
154
|
-
version: '
|
194
|
+
version: '2.2'
|
155
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
196
|
requirements:
|
157
197
|
- - ">="
|
@@ -159,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
199
|
version: '0'
|
160
200
|
requirements: []
|
161
201
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
202
|
+
rubygems_version: 2.4.5.3
|
163
203
|
signing_key:
|
164
204
|
specification_version: 4
|
165
205
|
summary: dkd php deployment tasks and strategies
|
@@ -182,4 +222,5 @@ test_files:
|
|
182
222
|
- spec/fixtures/application/vendor/composer.phar
|
183
223
|
- spec/fixtures/application/vendor/doctrine-migrations.phar
|
184
224
|
- spec/fixtures/capistrano/configuration/server_with_faulty_domain_configuration.rb
|
225
|
+
- spec/fixtures/capistrano/configuration/server_with_ssl.rb
|
185
226
|
- spec/fixtures/capistrano/configuration/server_with_valid_domain.rb
|