capistrano-itamae 0.2.0 → 1.0.0
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 +5 -5
- data/CHANGELOG.md +14 -1
- data/README.md +14 -5
- data/lib/capistrano/itamae/dsl.rb +5 -2
- data/lib/capistrano/itamae/version.rb +1 -1
- data/wercker.yml +2 -8
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ff014760ac71c576ffe1439c54c417d9a95891126184212d35b52371fbad6ecc
|
4
|
+
data.tar.gz: 939e3cc89764f17944e2ef2e4708730fb6f386287f236dd31f7c567e4279a45d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 934a85067c45717c45eea23a0205046a5836bee6e3162729a5d6cd32eb7610a6674460f98e87a7bce40ef290a93455d592f73f93dc2b083fd65770557e2968ff
|
7
|
+
data.tar.gz: 1a31ab8e44e5d630107c6c220c20c25b0b137b0c7a55a004bfe71e319313f28f63bc68df509655d2f4f4928b363781d5ef81a29355a9dae5d204768770586340
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](http://github.com/sue445/capistrano-itamae/compare/
|
2
|
+
[full changelog](http://github.com/sue445/capistrano-itamae/compare/v1.0.0...master)
|
3
|
+
|
4
|
+
## v1.0.0
|
5
|
+
[full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.2.0...v1.0.0)
|
6
|
+
|
7
|
+
### Breaking changes :bomb:
|
8
|
+
* `options` arg of `itamae_ssh` is changed to keyword arg.
|
9
|
+
* Before (v0.x): `itamae_ssh "recipe.rb", "xxxxx"`
|
10
|
+
* After (v1.0.0+): `itamae_ssh "recipe.rb", options: "xxxxx"`
|
11
|
+
* https://github.com/sue445/capistrano-itamae/pull/21
|
12
|
+
|
13
|
+
### Features
|
14
|
+
* Add `environment` arg to `itamae_ssh`
|
15
|
+
* https://github.com/sue445/capistrano-itamae/pull/22
|
3
16
|
|
4
17
|
## v0.2.0
|
5
18
|
[full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.1.1...v0.2.0)
|
data/README.md
CHANGED
@@ -3,11 +3,9 @@
|
|
3
3
|
Run [itamae](https://github.com/itamae-kitchen/itamae) in capistrano task
|
4
4
|
|
5
5
|
[](https://badge.fury.io/rb/capistrano-itamae)
|
6
|
-
[](https://app.wercker.com/project/byKey/a2f734cda581d3d221e10b1ede83bb71)
|
7
7
|
[](https://codeclimate.com/github/sue445/capistrano-itamae)
|
8
8
|
|
9
|
-
[](https://app.wercker.com/project/bykey/a2f734cda581d3d221e10b1ede83bb71)
|
10
|
-
|
11
9
|
## Installation
|
12
10
|
|
13
11
|
Add this line to your application's Gemfile:
|
@@ -53,13 +51,24 @@ desc "Run itamae"
|
|
53
51
|
# Run itamae ssh --node-yaml=node.yml cookbooks/recipe1.rb cookbooks/recipe2.rb
|
54
52
|
itamae_ssh ["recipe1.rb", "recipe2.rb"]
|
55
53
|
|
56
|
-
# Run itamae ssh --node-yaml=node.yml cookbooks/recipe.rb --
|
57
|
-
itamae_ssh "recipe.rb", "--
|
54
|
+
# Run itamae ssh --node-yaml=node.yml cookbooks/recipe.rb --no-sudo --log-level=debug
|
55
|
+
itamae_ssh "recipe.rb", options: "--no-sudo --log-level=debug"
|
56
|
+
|
57
|
+
# Pass $PATH to `itamae ssh`
|
58
|
+
itamae_ssh "recipe.rb", environment: { path: ENV["PATH"] }
|
58
59
|
end
|
59
60
|
end
|
60
61
|
end
|
61
62
|
```
|
62
63
|
|
64
|
+
```bash
|
65
|
+
# Run itamae ssh --dry-run 〜
|
66
|
+
$ bundle exec cap --dry-run 〜
|
67
|
+
|
68
|
+
# Run itamae ssh 〜
|
69
|
+
$ bundle exec cap 〜
|
70
|
+
```
|
71
|
+
|
63
72
|
see [Capistrano::Itamae::DSL#itamae_ssh](lib/capistrano/itamae/dsl.rb)
|
64
73
|
|
65
74
|
## Variables
|
@@ -8,7 +8,8 @@ module Capistrano
|
|
8
8
|
# Run `itamae ssh`
|
9
9
|
# @param recipe_files [String, Array<String>]
|
10
10
|
# @param options [String] itamae ssh options
|
11
|
-
|
11
|
+
# @param environment [Hash] environment variables. (passed to `with`)
|
12
|
+
def itamae_ssh(recipe_files = DEFAULT_RECIPE, options: nil, environment: {})
|
12
13
|
recipe_paths = Array(recipe_files).map { |file| itamae_cookbooks_path.join(file) }
|
13
14
|
|
14
15
|
itamae_options = [options, itamae_ssh_default_options].compact
|
@@ -18,7 +19,9 @@ module Capistrano
|
|
18
19
|
|
19
20
|
run_locally do
|
20
21
|
Bundler.with_clean_env do
|
21
|
-
|
22
|
+
with environment do
|
23
|
+
execute(*generate_itamae_ssh_command(server, recipe_paths, itamae_options))
|
24
|
+
end
|
22
25
|
end
|
23
26
|
end
|
24
27
|
end
|
data/wercker.yml
CHANGED
@@ -77,17 +77,11 @@ build:
|
|
77
77
|
cwd: spec/integration
|
78
78
|
|
79
79
|
after-steps:
|
80
|
-
- script:
|
81
|
-
name: Set variables
|
82
|
-
code: |
|
83
|
-
# NOTE: override .ruby-version in pretty-slack-notify
|
84
|
-
export RBENV_VERSION=2.3.1
|
85
|
-
|
86
80
|
- script:
|
87
81
|
name: shutdown all vms
|
88
82
|
code: vagrant destroy -f
|
89
83
|
cwd: spec/integration
|
90
84
|
|
91
|
-
-
|
92
|
-
|
85
|
+
- slack-notifier:
|
86
|
+
url: $SLACK_WEBHOOK_URL
|
93
87
|
username: wercker_build
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-itamae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.6.11
|
138
|
+
rubygems_version: 3.0.1
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: Run itamae in capistrano task
|