capistrano-magento2 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +17 -4
- data/lib/capistrano/magento2.rb +1 -1
- data/lib/capistrano/magento2/defaults.rb +5 -0
- data/lib/capistrano/magento2/version.rb +1 -1
- data/lib/capistrano/tasks/magento.rake +15 -1
- data/lib/capistrano/tasks/pending.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65c2dad3cf15d919401c8553410a7b8cf444e9e3
|
4
|
+
data.tar.gz: a197832d493ef6ba2d6725b63e8f3ae2e2c7586e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d6863ccc339acc538abedfd0fc71e12a3414064f47dd09a63b028dfebffdf676b9babc60a312e18e7251c608b5fa2f40a0d6c2092a98a296ae1c3cb58b44c6
|
7
|
+
data.tar.gz: d9f4abb0ee29c32e9628efb2f03437e4e56b299d82e8622e86378d3e4c5ee7033a7344929f348dc2d974cad698352c376b3a866378919bae15e9a7a25aff7355
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Capistrano::Magento2 Change Log
|
2
2
|
|
3
|
+
0.6.1
|
4
|
+
==========
|
5
|
+
|
6
|
+
* Fixed Magento version check failing on some servers due to ansi output in non-interactive shells (issue #64)
|
7
|
+
* Added ability to configure Magento's composer authentication keys. See README for details (PR #56)
|
8
|
+
* Changed pending change log to hook into before `deploy:check` (previously hooked before `deploy`)
|
9
|
+
|
3
10
|
0.6.0
|
4
11
|
==========
|
5
12
|
|
data/README.md
CHANGED
@@ -170,6 +170,19 @@ If you would like to customize the linked files or directories for your project,
|
|
170
170
|
append :linked_dirs, 'path/to/link'
|
171
171
|
```
|
172
172
|
|
173
|
+
### Composer Auth Credentials
|
174
|
+
|
175
|
+
Magento 2's composer repository requires auth credentials to install. These can be set on target servers in a global composer `auth.json` file, the project's `composer.json` or by setting them in your deployment configuration using the following two settings:
|
176
|
+
|
177
|
+
```ruby
|
178
|
+
set :magento_auth_public_key, '<your_public_key_here>'
|
179
|
+
set :magento_auth_private_key, '<your_prviate_key_here>'
|
180
|
+
```
|
181
|
+
|
182
|
+
To obtain these credentials, reference the official documentation on DevDocs: [Get your authentication keys](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html)
|
183
|
+
|
184
|
+
**Caution:** When using these settings, the values will be logged to the `log/capistrano.log` file by SSHKit. They will not, however, be included in the general command output by default.
|
185
|
+
|
173
186
|
### Magento 2 Deploy Routine
|
174
187
|
|
175
188
|
A pre-built deploy routine is available out-of-the-box. This can be overriden on a per-project basis by including only the Magento 2 specific tasks and defining your own `deploy.rake` file under `lib/capistrano/tasks` in your projects Capistrano install location.
|
@@ -233,7 +246,7 @@ No changes to deploy on web2 (from and to are the same: 2.1 -> 2.1)
|
|
233
246
|
Are you sure you want to continue? [y/n]
|
234
247
|
```
|
235
248
|
|
236
|
-
This
|
249
|
+
This confirmational warning can be disabled by including the following in your project's configuration:
|
237
250
|
|
238
251
|
```ruby
|
239
252
|
set :magento_deploy_pending_warn, false
|
@@ -243,9 +256,9 @@ set :magento_deploy_pending_warn, false
|
|
243
256
|
|
244
257
|
| setting | what it does
|
245
258
|
| -------------------------------- | ------- | ---
|
246
|
-
| `:magento_deploy_pending_role` |
|
247
|
-
| `:magento_deploy_pending_warn` | Set this to `false` to disable
|
248
|
-
| `:magento_deploy_pending_format` | Can be used to set a custom change log format
|
259
|
+
| `:magento_deploy_pending_role` | Role to check for pending changes on; defaults to `:all`
|
260
|
+
| `:magento_deploy_pending_warn` | Set this to `false` to disable confirmational warning on zero-change deployments
|
261
|
+
| `:magento_deploy_pending_format` | Can be used to set a custom change log format; refer to `defaults.rb` for example
|
249
262
|
|
250
263
|
### Pending Changes Tasks
|
251
264
|
|
data/lib/capistrano/magento2.rb
CHANGED
@@ -13,7 +13,7 @@ module Capistrano
|
|
13
13
|
module Magento2
|
14
14
|
module Helpers
|
15
15
|
def magento_version
|
16
|
-
return Gem::Version::new((capture :php, "-f #{release_path}/bin/magento -- -V").split(' ').pop)
|
16
|
+
return Gem::Version::new((capture :php, "-f #{release_path}/bin/magento -- -V --no-ansi").split(' ').pop)
|
17
17
|
end
|
18
18
|
|
19
19
|
def disabled_modules
|
@@ -31,6 +31,11 @@ set :linked_dirs, fetch(:linked_dirs, []).push(
|
|
31
31
|
'var/tmp'
|
32
32
|
)
|
33
33
|
|
34
|
+
# magento composer repository auth credentials
|
35
|
+
set :magento_auth_repo_name, fetch(:magento_auth_repo_name, 'http-basic.repo.magento.com')
|
36
|
+
set :magento_auth_public_key, fetch(:magento_auth_public_key, false)
|
37
|
+
set :magento_auth_private_key, fetch(:magento_auth_private_key, false)
|
38
|
+
|
34
39
|
# deploy permissions defaults
|
35
40
|
set :magento_deploy_chmod_d, fetch(:magento_deploy_chmod_d, '2770')
|
36
41
|
set :magento_deploy_chmod_f, fetch(:magento_deploy_chmod_f, '0660')
|
@@ -81,7 +81,7 @@ namespace :magento do
|
|
81
81
|
|
82
82
|
namespace :composer do
|
83
83
|
desc 'Run composer install'
|
84
|
-
task :install do
|
84
|
+
task :install => :auth_config do
|
85
85
|
|
86
86
|
on release_roles :all do
|
87
87
|
within release_path do
|
@@ -106,6 +106,20 @@ namespace :magento do
|
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
109
|
+
|
110
|
+
task :auth_config do
|
111
|
+
on release_roles :all do
|
112
|
+
within release_path do
|
113
|
+
if fetch(:magento_auth_public_key) and fetch(:magento_auth_private_key)
|
114
|
+
execute :composer, :config, '-q',
|
115
|
+
fetch(:magento_auth_repo_name),
|
116
|
+
fetch(:magento_auth_public_key),
|
117
|
+
fetch(:magento_auth_private_key),
|
118
|
+
verbosity: Logger::DEBUG
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
109
123
|
end
|
110
124
|
|
111
125
|
namespace :deploy do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-magento2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Alger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|