itamae-plugin-resource-encrypted_remote_file 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +99 -0
- data/.rspec +1 -1
- data/CHANGELOG.md +7 -1
- data/README.md +12 -8
- data/itamae-plugin-resource-encrypted_remote_file.gemspec +9 -5
- metadata +13 -27
- data/.coveralls.yml +0 -1
- data/.hound.yml +0 -127
- data/.rubocop.yml +0 -2
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bebcc3c179b7dd53f157b03370b78cb2d989f7839a9edc7acc52bda9f517a480
|
4
|
+
data.tar.gz: 3233dfa12563e15f4ccf98654466e8d357175c10c4cc3f359d8f11c879a9dda5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a534f1567230059cbb8611e0f499fc1f9f8476bd10dcfe95d607663f8660794eb6a0635883d481477f93636df8d4f6daaba6a911af604e51cf3d73be37b8534
|
7
|
+
data.tar.gz: 111efe924cdcc0c0bc5601aaa4110b0654a4865629b07a9cc41b4de692761c6593b4027f545e2870688ce7b8269aa01a320ffe9a2ccb7f4c42423727f1e78bfc
|
@@ -0,0 +1,99 @@
|
|
1
|
+
name: test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
types:
|
9
|
+
- opened
|
10
|
+
- synchronize
|
11
|
+
- reopened
|
12
|
+
schedule:
|
13
|
+
- cron: "0 10 * * 5" # JST 19:00 (Fri)
|
14
|
+
|
15
|
+
env:
|
16
|
+
CI: "true"
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
test:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
|
22
|
+
strategy:
|
23
|
+
fail-fast: false
|
24
|
+
|
25
|
+
matrix:
|
26
|
+
ruby:
|
27
|
+
- 2.3
|
28
|
+
image:
|
29
|
+
- centos:7
|
30
|
+
- centos:8
|
31
|
+
- debian:jessie
|
32
|
+
- debian:stretch
|
33
|
+
- debian:buster
|
34
|
+
- amazonlinux:2
|
35
|
+
|
36
|
+
steps:
|
37
|
+
- uses: actions/checkout@v2
|
38
|
+
|
39
|
+
- uses: eregon/use-ruby-action@v1
|
40
|
+
with:
|
41
|
+
ruby-version: ${{ matrix.ruby }}
|
42
|
+
|
43
|
+
- name: Cache vendor/bundle
|
44
|
+
uses: actions/cache@v1
|
45
|
+
id: cache_gem
|
46
|
+
with:
|
47
|
+
path: vendor/bundle
|
48
|
+
key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }}
|
49
|
+
restore-keys: |
|
50
|
+
v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
|
51
|
+
|
52
|
+
- name: bundle update
|
53
|
+
run: |
|
54
|
+
set -xe
|
55
|
+
bundle config path vendor/bundle
|
56
|
+
bundle update --jobs $(nproc) --retry 3
|
57
|
+
|
58
|
+
- name: Run Itamae
|
59
|
+
run: |
|
60
|
+
set -xe
|
61
|
+
bundle exec itamae docker --node-yaml=spec/recipes/node.yml spec/recipes/install.rb --image=$IMAGE --tag itamae-plugin:latest
|
62
|
+
env:
|
63
|
+
IMAGE: ${{ matrix.image }}
|
64
|
+
|
65
|
+
- name: Run Serverspec
|
66
|
+
run: |
|
67
|
+
set -xe
|
68
|
+
bundle exec rspec
|
69
|
+
env:
|
70
|
+
DOCKER_IMAGE: itamae-plugin:latest
|
71
|
+
|
72
|
+
- name: Slack Notification (not success)
|
73
|
+
uses: lazy-actions/slatify@master
|
74
|
+
if: "! success()"
|
75
|
+
continue-on-error: true
|
76
|
+
with:
|
77
|
+
job_name: ${{ format('*build* ({0}, {1})', matrix.ruby, matrix.image) }}
|
78
|
+
type: ${{ job.status }}
|
79
|
+
icon_emoji: ":octocat:"
|
80
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
81
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
82
|
+
|
83
|
+
notify:
|
84
|
+
needs:
|
85
|
+
- test
|
86
|
+
|
87
|
+
runs-on: ubuntu-latest
|
88
|
+
|
89
|
+
steps:
|
90
|
+
- name: Slack Notification (success)
|
91
|
+
uses: lazy-actions/slatify@master
|
92
|
+
if: always()
|
93
|
+
continue-on-error: true
|
94
|
+
with:
|
95
|
+
job_name: '*build*'
|
96
|
+
type: ${{ job.status }}
|
97
|
+
icon_emoji: ":octocat:"
|
98
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
99
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.rspec
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.
|
2
|
+
[full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.3...master)
|
3
|
+
|
4
|
+
## 0.0.3 (2021/11/20)
|
5
|
+
[full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.2...v0.0.3)
|
6
|
+
|
7
|
+
* Enable MFA requirement for gem releasing
|
8
|
+
* https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/pull/25
|
3
9
|
|
4
10
|
## 0.0.2 (2015/06/02)
|
5
11
|
[full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.1...v0.0.2)
|
data/README.md
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
# Itamae::Plugin::Resource::EncryptedRemoteFile
|
2
2
|
|
3
|
-
encrypt secret data (
|
3
|
+
encrypt secret data (e.g. id_rsa), and forward decrypted file to remote.
|
4
4
|
|
5
5
|
This is like to [knife-solo_data_bag](https://github.com/thbishop/knife-solo_data_bag)
|
6
6
|
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/itamae-plugin-resource-encrypted_remote_file.svg)](http://badge.fury.io/rb/itamae-plugin-resource-encrypted_remote_file)
|
8
|
-
[![Build Status](https://
|
8
|
+
[![Build Status](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/workflows/test/badge.svg?branch=master)](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/actions?query=workflow%3Atest)
|
9
9
|
[![Code Climate](https://codeclimate.com/github/sue445/itamae-plugin-resource-encrypted_remote_file/badges/gpa.svg)](https://codeclimate.com/github/sue445/itamae-plugin-resource-encrypted_remote_file)
|
10
|
-
[![Coverage Status](https://coveralls.io/repos/sue445/itamae-plugin-resource-encrypted_remote_file/badge.svg)](https://coveralls.io/r/sue445/itamae-plugin-resource-encrypted_remote_file)
|
11
|
-
[![Dependency Status](https://gemnasium.com/sue445/itamae-plugin-resource-encrypted_remote_file.svg)](https://gemnasium.com/sue445/itamae-plugin-resource-encrypted_remote_file)
|
12
10
|
|
13
11
|
## Installation
|
14
12
|
|
@@ -40,12 +38,10 @@ reversible_cryptography encrypt --password=PASSWORD --src-file=/path/to/secret_f
|
|
40
38
|
### Recipe
|
41
39
|
|
42
40
|
```ruby
|
43
|
-
require "itamae-plugin-resource-encrypted_remote_file"
|
44
|
-
|
45
41
|
encrypted_remote_file "/home/deployer/.ssh/id_rsa" do
|
46
42
|
owner "root"
|
47
43
|
group "root"
|
48
|
-
source "
|
44
|
+
source "files/id_rsa.encrypted"
|
49
45
|
password ENV["ID_RSA_PASSWORD"]
|
50
46
|
end
|
51
47
|
```
|
@@ -80,7 +76,7 @@ ENV["ID_RSA_PASSWORD"]
|
|
80
76
|
encrypted_remote_file "/home/deployer/.ssh/id_rsa" do
|
81
77
|
owner "root"
|
82
78
|
group "root"
|
83
|
-
source "
|
79
|
+
source "files/id_rsa.encrypted"
|
84
80
|
password ENV["ID_RSA_PASSWORD"]
|
85
81
|
end
|
86
82
|
```
|
@@ -91,6 +87,14 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
91
87
|
|
92
88
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
93
89
|
|
90
|
+
## Testing
|
91
|
+
requirements [Docker](https://www.docker.com/)
|
92
|
+
|
93
|
+
```sh
|
94
|
+
bundle exec itamae docker --node-yaml=spec/recipes/node.yml spec/recipes/install.rb --image=centos:7 --tag itamae-plugin:latest
|
95
|
+
DOCKER_IMAGE=itamae-plugin:latest bundle exec rspec
|
96
|
+
```
|
97
|
+
|
94
98
|
## Contributing
|
95
99
|
|
96
100
|
1. Fork it ( https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/fork )
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "itamae-plugin-resource-encrypted_remote_file"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.3"
|
8
8
|
spec.authors = ["sue445"]
|
9
9
|
spec.email = ["sue445@sue445.net"]
|
10
10
|
spec.licenses = ["MIT"]
|
@@ -13,6 +13,11 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = "encrypt secret data, and forward decrypted file to remote."
|
14
14
|
spec.homepage = "https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file"
|
15
15
|
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
19
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
20
|
+
|
16
21
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
17
22
|
# delete this section to allow pushing this gem to any host.
|
18
23
|
if spec.respond_to?(:metadata)
|
@@ -30,8 +35,7 @@ Gem::Specification.new do |spec|
|
|
30
35
|
spec.add_dependency "reversible_cryptography"
|
31
36
|
|
32
37
|
spec.add_development_dependency "bundler"
|
33
|
-
spec.add_development_dependency "
|
34
|
-
spec.add_development_dependency "rake"
|
35
|
-
spec.add_development_dependency "
|
36
|
-
spec.add_development_dependency "rubocop"
|
38
|
+
spec.add_development_dependency "docker-api"
|
39
|
+
spec.add_development_dependency "rake"
|
40
|
+
spec.add_development_dependency "serverspec"
|
37
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-resource-encrypted_remote_file
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: docker-api
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -68,20 +68,6 @@ dependencies:
|
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '10.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '10.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
@@ -95,7 +81,7 @@ dependencies:
|
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: serverspec
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
@@ -115,12 +101,9 @@ executables: []
|
|
115
101
|
extensions: []
|
116
102
|
extra_rdoc_files: []
|
117
103
|
files:
|
118
|
-
- ".
|
104
|
+
- ".github/workflows/test.yml"
|
119
105
|
- ".gitignore"
|
120
|
-
- ".hound.yml"
|
121
106
|
- ".rspec"
|
122
|
-
- ".rubocop.yml"
|
123
|
-
- ".travis.yml"
|
124
107
|
- CHANGELOG.md
|
125
108
|
- Gemfile
|
126
109
|
- LICENSE.txt
|
@@ -135,8 +118,12 @@ homepage: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file
|
|
135
118
|
licenses:
|
136
119
|
- MIT
|
137
120
|
metadata:
|
121
|
+
homepage_uri: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file
|
122
|
+
source_code_uri: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file
|
123
|
+
changelog_uri: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/blob/master/CHANGELOG.md
|
124
|
+
rubygems_mfa_required: 'true'
|
138
125
|
allowed_push_host: https://rubygems.org
|
139
|
-
post_install_message:
|
126
|
+
post_install_message:
|
140
127
|
rdoc_options: []
|
141
128
|
require_paths:
|
142
129
|
- lib
|
@@ -151,9 +138,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
138
|
- !ruby/object:Gem::Version
|
152
139
|
version: '0'
|
153
140
|
requirements: []
|
154
|
-
|
155
|
-
|
156
|
-
signing_key:
|
141
|
+
rubygems_version: 3.2.22
|
142
|
+
signing_key:
|
157
143
|
specification_version: 4
|
158
144
|
summary: encrypt secret data, and forward decrypted file to remote.
|
159
145
|
test_files: []
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
repo_token: X0BBZfE4kDkJeaSeaYsiGEstlGR9SLRU1
|
data/.hound.yml
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
# target_version:
|
2
|
-
# rubocop v0.30.0
|
3
|
-
|
4
|
-
# Exclude autogenerated files
|
5
|
-
AllCops:
|
6
|
-
Exclude:
|
7
|
-
- "vendor/**/*" # rubocop config/default.yml
|
8
|
-
- "db/schema.rb"
|
9
|
-
DisplayCopNames: true
|
10
|
-
|
11
|
-
##################### Style ##################################
|
12
|
-
|
13
|
-
Style/AndOr:
|
14
|
-
EnforcedStyle: conditionals
|
15
|
-
|
16
|
-
Style/AsciiComments:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Style/BlockDelimiters:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/BracesAroundHashParameters:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Style/DeprecatedHashMethods:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Style/Documentation:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Style/DoubleNegation:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
Style/DotPosition:
|
35
|
-
EnforcedStyle: trailing
|
36
|
-
|
37
|
-
Style/EmptyElse:
|
38
|
-
EnforcedStyle: empty
|
39
|
-
|
40
|
-
Style/FormatString:
|
41
|
-
EnforcedStyle: percent
|
42
|
-
|
43
|
-
Style/GuardClause:
|
44
|
-
MinBodyLength: 5
|
45
|
-
|
46
|
-
Style/HashSyntax:
|
47
|
-
EnforcedStyle: ruby19_no_mixed_keys
|
48
|
-
Exclude:
|
49
|
-
- "**/*.rake"
|
50
|
-
- "Rakefile"
|
51
|
-
|
52
|
-
Style/IfUnlessModifier:
|
53
|
-
Enabled: false
|
54
|
-
|
55
|
-
Style/IndentHash:
|
56
|
-
EnforcedStyle: consistent
|
57
|
-
|
58
|
-
Style/Lambda:
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Style/NumericLiterals:
|
62
|
-
MinDigits: 6
|
63
|
-
|
64
|
-
Style/PredicateName:
|
65
|
-
Enabled: false
|
66
|
-
|
67
|
-
Style/RedundantSelf:
|
68
|
-
Enabled: false
|
69
|
-
|
70
|
-
Style/RedundantReturn:
|
71
|
-
AllowMultipleReturnValues: true
|
72
|
-
|
73
|
-
Style/SignalException:
|
74
|
-
EnforcedStyle: only_raise
|
75
|
-
|
76
|
-
Style/SpaceAroundOperators:
|
77
|
-
MultiSpaceAllowedForOperators:
|
78
|
-
- "="
|
79
|
-
- "=>"
|
80
|
-
- "||"
|
81
|
-
|
82
|
-
Style/StringLiterals:
|
83
|
-
EnforcedStyle: double_quotes
|
84
|
-
|
85
|
-
Style/StringLiteralsInInterpolation:
|
86
|
-
Enabled: false
|
87
|
-
|
88
|
-
Style/SingleLineBlockParams:
|
89
|
-
Enabled: false
|
90
|
-
|
91
|
-
Style/SingleSpaceBeforeFirstArg:
|
92
|
-
Enabled: false
|
93
|
-
|
94
|
-
Style/TrailingComma:
|
95
|
-
EnforcedStyleForMultiline: comma
|
96
|
-
|
97
|
-
##################### Lint ##################################
|
98
|
-
|
99
|
-
Lint/UnderscorePrefixedVariableName:
|
100
|
-
Enabled: false
|
101
|
-
|
102
|
-
Lint/UnusedMethodArgument:
|
103
|
-
Enabled: false
|
104
|
-
|
105
|
-
##################### Metrics ##################################
|
106
|
-
|
107
|
-
Metrics/AbcSize:
|
108
|
-
Max: 30
|
109
|
-
|
110
|
-
Metrics/CyclomaticComplexity:
|
111
|
-
Max: 10
|
112
|
-
|
113
|
-
Metrics/LineLength:
|
114
|
-
Max: 160
|
115
|
-
Exclude:
|
116
|
-
- "db/migrate/*.rb"
|
117
|
-
|
118
|
-
Metrics/MethodLength:
|
119
|
-
Max: 20
|
120
|
-
Exclude:
|
121
|
-
- "db/migrate/*.rb"
|
122
|
-
|
123
|
-
Metrics/PerceivedComplexity:
|
124
|
-
Max: 8
|
125
|
-
|
126
|
-
Metrics/ClassLength:
|
127
|
-
Max: 120
|
data/.rubocop.yml
DELETED
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.1
|
4
|
-
- 2.2
|
5
|
-
- ruby-head
|
6
|
-
cache: bundler
|
7
|
-
before_install: gem install bundler
|
8
|
-
before_script:
|
9
|
-
- export COVERAGE=true
|
10
|
-
script:
|
11
|
-
- bundle exec rspec
|
12
|
-
branches:
|
13
|
-
only:
|
14
|
-
- master
|
15
|
-
notifications:
|
16
|
-
email: false
|
17
|
-
slack:
|
18
|
-
secure: SusEtW3pV+b+KUQoQjhqTI+7QtaDXlVl0Wx2EPo1VA4k/t9M/FRZXAXxq2j5+K3QE0y4p4QbnMRoZ8W8l4f7NXzOi7CFHQAnKUVDswZdsj2udEWeNWUeN4Rub0de3sInfKkbZKfT0uhamToX/pRH7uhOogeL9Eei+KUekUXJKTE=
|
19
|
-
matrix:
|
20
|
-
allow_failures:
|
21
|
-
- rvm: ruby-head
|