deploy_rubygem 0.1.0 → 0.1.0.1.gcea5aa1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5a313d3fd4dbba39b1aa95e4a5defc71ffcf6fb8e57999e31e9e506f22a534c
4
- data.tar.gz: c4e84e731a4a9690a56130842f04579da14d43852ade162f710abf73909d56a7
3
+ metadata.gz: 8799d17a8a68f88acf726ee367aac88c3cbb1856b744937677c2acd5b4d7a7f9
4
+ data.tar.gz: 57ad5b060edc63722a32e87cb17e2a8d85d996a19215005729821a005ce4af17
5
5
  SHA512:
6
- metadata.gz: 010f7a7d76095c7b14c7ec01b3494bd8d664ee09c42faee0a9ac969c4ddb56077e9f47d01fbf3fd45b4d40e932cc5631196af5648de17b17fbaba5a8fbfae5e6
7
- data.tar.gz: 1eeb50abe84c431c60ad17ea9e89218429bc88ac5eab91561037375abe08032e9b66668980db4f6640c2aa70d8e16888f39dd5b9d0627889e393abe8ed22f8b0
6
+ metadata.gz: '086feffd4b6af2ce9e1fb1236f57cf167096d37d025dcdb12d09382d6f4744e4e4d827cce53db26b8ae9e3d673db583d7bc6b571400fb3970d6f37578a7a8655'
7
+ data.tar.gz: b358b9004e0984bef53ef216045126b2039e276763d502f7eb3a653ded1d3d2fd0ab749fc937fa1dce706da02ed0758794205d599a4cccbbfb3f51fdff0a2467
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,93 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ install_deploy_rubygem:
5
+ docker:
6
+ - image: cimg/ruby:3.1.2
7
+ auth:
8
+ username: $DOCKERHUB_USER
9
+ password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
10
+
11
+ environment: {}
12
+ working_directory: /tmp/jimbodragon
13
+ steps:
14
+ - checkout
15
+ - run: |
16
+ set -xu
17
+ echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' >> ~/.ssh/known_hosts
18
+ echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
19
+ echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
20
+ cat ~/.ssh/known_hosts
21
+ ssh git@github.com || echo
22
+ gem install deploy_rubygem
23
+ using_deploy_rubygem:
24
+ docker:
25
+ - image: cimg/ruby:3.1.2
26
+ auth:
27
+ username: $DOCKERHUB_USER
28
+ password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
29
+
30
+ environment: {}
31
+ working_directory: /tmp/jimbodragon
32
+ steps:
33
+ - checkout
34
+ - run: |
35
+ deploy_rubygem
36
+ install_and_deploy_rubygem:
37
+ docker:
38
+ - image: cimg/ruby:3.1.2
39
+ auth:
40
+ username: $DOCKERHUB_USER
41
+ password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
42
+
43
+ environment: {}
44
+ working_directory: /tmp/jimbodragon
45
+ steps:
46
+ - checkout
47
+ - run: |
48
+ set -xu
49
+ echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' >> ~/.ssh/known_hosts
50
+ echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
51
+ echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
52
+ cat ~/.ssh/known_hosts
53
+ ssh git@github.com || echo
54
+ gem install deploy_rubygem
55
+ prepare_workstation
56
+ deploy_rubygem
57
+ install_and_prepare_for_deployement:
58
+ docker:
59
+ - image: cimg/ruby:3.1.2
60
+ auth:
61
+ username: $DOCKERHUB_USER
62
+ password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
63
+
64
+ environment: {}
65
+ working_directory: /tmp/jimbodragon
66
+ steps:
67
+ - checkout
68
+ - run: |
69
+ set -xu
70
+ echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' >> ~/.ssh/known_hosts
71
+ echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
72
+ echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
73
+ cat ~/.ssh/known_hosts
74
+ ssh git@github.com || echo
75
+ gem install deploy_rubygem
76
+ prepare_workstation
77
+ #...
78
+ workflows:
79
+ version: 2
80
+ deploy_rubygem:
81
+ jobs:
82
+ - install_deploy_rubygem:
83
+ filters:
84
+ branches:
85
+ only: master
86
+ - install_and_prepare_for_deployement:
87
+ filters:
88
+ branches:
89
+ only: master
90
+ - install_and_deploy_rubygem:
91
+ filters:
92
+ branches:
93
+ only: master
data/.gitignore ADDED
@@ -0,0 +1,56 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
@@ -1,29 +1,29 @@
1
- I, [2024-05-30T17:21:52.504900 #1051516] INFO -- Kitchen: -----> Starting Test Kitchen (v3.3.2)
2
- E, [2024-05-30T17:21:52.505259 #1051516] ERROR -- Kitchen: ------Exception-------
3
- E, [2024-05-30T17:21:52.505291 #1051516] ERROR -- Kitchen: Class: Kitchen::UserError
4
- E, [2024-05-30T17:21:52.505315 #1051516] ERROR -- Kitchen: Message: Kitchen YAML file /home/jimboadmin/deploy_rubygem/kitchen.yml does not exist.
5
- E, [2024-05-30T17:21:52.505338 #1051516] ERROR -- Kitchen: ----------------------
6
- E, [2024-05-30T17:21:52.505360 #1051516] ERROR -- Kitchen: ------Backtrace-------
7
- E, [2024-05-30T17:21:52.505381 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/loader/yaml.rb:65:in `read'
8
- E, [2024-05-30T17:21:52.505407 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:153:in `data'
9
- E, [2024-05-30T17:21:52.505430 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:131:in `suites'
10
- E, [2024-05-30T17:21:52.505456 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:183:in `filter_instances'
11
- E, [2024-05-30T17:21:52.505479 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:142:in `build_instances'
12
- E, [2024-05-30T17:21:52.505501 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:116:in `instances'
13
- E, [2024-05-30T17:21:52.505524 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command.rb:109:in `filtered_instances'
14
- E, [2024-05-30T17:21:52.505552 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command.rb:139:in `parse_subcommand'
15
- E, [2024-05-30T17:21:52.505584 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command/action.rb:34:in `block in call'
16
- E, [2024-05-30T17:21:52.505610 #1051516] ERROR -- Kitchen: /home/jimboadmin/.chef/gem/ruby/3.0.0/gems/benchmark-0.2.1/lib/benchmark.rb:296:in `measure'
17
- E, [2024-05-30T17:21:52.505634 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command/action.rb:33:in `call'
18
- E, [2024-05-30T17:21:52.505658 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/cli.rb:52:in `perform'
19
- E, [2024-05-30T17:21:52.505681 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/cli.rb:198:in `block (2 levels) in <class:CLI>'
20
- E, [2024-05-30T17:21:52.505704 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
21
- E, [2024-05-30T17:21:52.505728 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
22
- E, [2024-05-30T17:21:52.505752 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
23
- E, [2024-05-30T17:21:52.505776 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
24
- E, [2024-05-30T17:21:52.505800 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/bin/kitchen:11:in `block in <top (required)>'
25
- E, [2024-05-30T17:21:52.505823 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/errors.rb:183:in `with_friendly_errors'
26
- E, [2024-05-30T17:21:52.505847 #1051516] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/bin/kitchen:11:in `<top (required)>'
27
- E, [2024-05-30T17:21:52.505870 #1051516] ERROR -- Kitchen: /opt/chef-workstation/bin/kitchen:389:in `load'
28
- E, [2024-05-30T17:21:52.505902 #1051516] ERROR -- Kitchen: /opt/chef-workstation/bin/kitchen:389:in `<main>'
29
- E, [2024-05-30T17:21:52.505926 #1051516] ERROR -- Kitchen: ----End Backtrace-----
1
+ I, [2024-05-20T00:12:38.649245 #1026043] INFO -- Kitchen: -----> Starting Test Kitchen (v3.3.2)
2
+ E, [2024-05-20T00:12:38.649511 #1026043] ERROR -- Kitchen: ------Exception-------
3
+ E, [2024-05-20T00:12:38.649541 #1026043] ERROR -- Kitchen: Class: Kitchen::UserError
4
+ E, [2024-05-20T00:12:38.649561 #1026043] ERROR -- Kitchen: Message: Kitchen YAML file /home/jimboadmin/deploy_rubygem/kitchen.yml does not exist.
5
+ E, [2024-05-20T00:12:38.649580 #1026043] ERROR -- Kitchen: ----------------------
6
+ E, [2024-05-20T00:12:38.649598 #1026043] ERROR -- Kitchen: ------Backtrace-------
7
+ E, [2024-05-20T00:12:38.649615 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/loader/yaml.rb:65:in `read'
8
+ E, [2024-05-20T00:12:38.649634 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:153:in `data'
9
+ E, [2024-05-20T00:12:38.649653 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:131:in `suites'
10
+ E, [2024-05-20T00:12:38.649671 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:183:in `filter_instances'
11
+ E, [2024-05-20T00:12:38.649690 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:142:in `build_instances'
12
+ E, [2024-05-20T00:12:38.649708 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/config.rb:116:in `instances'
13
+ E, [2024-05-20T00:12:38.649726 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command.rb:109:in `filtered_instances'
14
+ E, [2024-05-20T00:12:38.649744 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command.rb:139:in `parse_subcommand'
15
+ E, [2024-05-20T00:12:38.649763 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command/action.rb:34:in `block in call'
16
+ E, [2024-05-20T00:12:38.649782 #1026043] ERROR -- Kitchen: /home/jimboadmin/.chef/gem/ruby/3.0.0/gems/benchmark-0.2.1/lib/benchmark.rb:296:in `measure'
17
+ E, [2024-05-20T00:12:38.649800 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/command/action.rb:33:in `call'
18
+ E, [2024-05-20T00:12:38.649818 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/cli.rb:52:in `perform'
19
+ E, [2024-05-20T00:12:38.649837 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/cli.rb:198:in `block (2 levels) in <class:CLI>'
20
+ E, [2024-05-20T00:12:38.649855 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
21
+ E, [2024-05-20T00:12:38.649874 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
22
+ E, [2024-05-20T00:12:38.649892 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
23
+ E, [2024-05-20T00:12:38.649910 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
24
+ E, [2024-05-20T00:12:38.649928 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/bin/kitchen:11:in `block in <top (required)>'
25
+ E, [2024-05-20T00:12:38.649946 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/lib/kitchen/errors.rb:183:in `with_friendly_errors'
26
+ E, [2024-05-20T00:12:38.649964 #1026043] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.3.2/bin/kitchen:11:in `<top (required)>'
27
+ E, [2024-05-20T00:12:38.649983 #1026043] ERROR -- Kitchen: /opt/chef-workstation/bin/kitchen:389:in `load'
28
+ E, [2024-05-20T00:12:38.650009 #1026043] ERROR -- Kitchen: /opt/chef-workstation/bin/kitchen:389:in `<main>'
29
+ E, [2024-05-20T00:12:38.650029 #1026043] ERROR -- Kitchen: ----End Backtrace-----
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org/'
2
+
3
+ gemspec
data/README.md CHANGED
@@ -1,39 +1,2 @@
1
- # DeployRubygem
2
-
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/deploy_rubygem`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- ## Installation
8
-
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
-
15
- If bundler is not being used to manage dependencies, install the gem by executing:
16
-
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Development
24
-
25
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
-
27
- 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`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
-
29
- ## Contributing
30
-
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/deploy_rubygem. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/deploy_rubygem/blob/master/CODE_OF_CONDUCT.md).
32
-
33
- ## License
34
-
35
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
-
37
- ## Code of Conduct
38
-
39
- Everyone interacting in the DeployRubygem project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/deploy_rubygem/blob/master/CODE_OF_CONDUCT.md).
1
+ # deploy-chef-config
2
+ Deploy Chef secrets to a chef server with knife
data/bin/deploy_rubygem CHANGED
@@ -1,8 +1,21 @@
1
1
  #!/opt/chef-workstation/embedded/bin/ruby
2
- Signal.trap('INT') { exit 1 }
3
2
 
4
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
5
- require 'rubygems' unless defined?(Gem)
6
- require 'deploy_rubygem'
3
+ %w(
4
+ deploy_rubygem
5
+ prepare_workstation
6
+ ).each do |executable|
7
+ system("git add bin/#{executable}")
8
+ end
7
9
 
8
- DeployRubygem.new_deploy_rubygem.deploy
10
+ system('git add deploy_rubygem.gemspec')
11
+ system('git add .circleci/config.yml')
12
+
13
+ system('git commit -m "Deploying deploy_rugygem_$(git version-bump show)"')
14
+
15
+ system('git version-bump patch') # <major|minor|patch|show>
16
+
17
+ system('gem build')
18
+
19
+ system('gem push deploy_rubygem-$(git version-bump show).gem')
20
+
21
+ system('git version-bump minor') # <major|minor|patch|show>
@@ -1,3 +1,7 @@
1
1
  #!/opt/chef-workstation/embedded/bin/ruby
2
2
 
3
+ puts "environments context = #{ENV.inspect}"
4
+
5
+ puts "environments methods = #{self.methods}"
6
+
3
7
  system('chef-client')
@@ -0,0 +1,70 @@
1
+
2
+
3
+ require 'git-version-bump'
4
+
5
+ ::Gem::Specification.new do |s|
6
+ s.name = 'deploy_rubygem'
7
+ s.license = 'MIT'
8
+ s.authors = ['Jimmy Provencher']
9
+ s.email = ['jimbo_dragon@hotmail.com']
10
+ s.homepage = 'https://github.com/JimboDragonGit/deploy_rubygem'
11
+ s.summary = 'A auto chef bootstrapper and wrapper cookbook to deploy code and context'
12
+ s.description = 'Using Chef cookbook style and force any script using it to switch to chef even if it is not install. It will install it tho ;)'
13
+
14
+ s.version = GVB.version
15
+ s.date = GVB.date
16
+
17
+ # all_files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
+ # s.files = all_files.grep(%r!^(exe|libraries|rubocop)/|^.rubocop.yml$!)
19
+ # code_folder = 'libraries/'
20
+ # s.files = %w(README.md LICENSE bin/selfbootstrap libraries/selfbootstrap.rb ) + Dir.glob('libraries/**/*') # + Dir.glob('{bin,lib,certs,test}/**/*')
21
+ # s.require_paths = [code_folder]
22
+ # s.executables = %w(selfbootstrap)
23
+ # s.bindir = 'exe'
24
+
25
+
26
+ s.extra_rdoc_files = ["README.md"]
27
+ s.files = `git ls-files`.split("\n")
28
+ s.executables = %w(
29
+ deploy_rubygem
30
+ prepare_workstation
31
+ )
32
+
33
+ # s.cert_chain = [File.expand_path('../jimbodragon/certs/public/jimbodragon.pem')]
34
+ # s.signing_key = File.expand_path('../jimbodragon/certs/private/jimbodragon-gem-private_key.pem') if $PROGRAM_NAME =~ /gem\z/
35
+
36
+ s.metadata = {
37
+ # 'source_code_uri' => '/home/git/selfbootstrap.git/',
38
+ 'bug_tracker_uri' => 'https://github.com/JimboDragonGit/deploy_rubygem/issues',
39
+ 'changelog_uri' => 'https://github.com/JimboDragonGit/deploy_rubygem/releases',
40
+ 'homepage_uri' => s.homepage,
41
+ }
42
+
43
+ s.rdoc_options = ['--charset=UTF-8']
44
+ s.extra_rdoc_files = %w(README.md LICENSE)
45
+
46
+ # s.required_ruby_version = '>= 2.5.0'
47
+ # s.required_rubygems_version = '>= 2.7.0'
48
+
49
+ s.add_development_dependency('chef')
50
+ s.add_development_dependency('test-kitchen')
51
+
52
+ s.add_runtime_dependency('git-version-bump')
53
+
54
+ # s.add_runtime_dependency('colorator', '~> 1.0')
55
+ # s.add_runtime_dependency('em-websocket', '~> 0.5')
56
+ # s.add_runtime_dependency('i18n', '~> 1.0')
57
+ # s.add_runtime_dependency('jekyll-sass-converter', '>= 2.0', '< 4.0')
58
+ # s.add_runtime_dependency('jekyll-watch', '~> 2.0')
59
+ # s.add_runtime_dependency('kramdown', '~> 2.3', '>= 2.3.1')
60
+ # s.add_runtime_dependency('kramdown-parser-gfm', '~> 1.0')
61
+ # s.add_runtime_dependency('liquid', '~> 4.0')
62
+ # s.add_runtime_dependency('mercenary', '>= 0.3.6', '< 0.5')
63
+ # s.add_runtime_dependency('pathutil', '~> 0.9')
64
+ # s.add_runtime_dependency('rouge', '>= 3.0', '< 5.0')
65
+ # s.add_runtime_dependency('safe_yaml', '~> 1.0')
66
+ # s.add_runtime_dependency('terminal-table', '>= 1.8', '< 4.0')
67
+ # s.add_runtime_dependency('webrick', '~> 1.7')
68
+ end
69
+
70
+
data.tar.gz.sig CHANGED
@@ -1,5 +1,3 @@
1
- J�2�6��]Z�6\�m@V�Vl(��ZQ���U���%�� =�p�>�/�|b���Mu�i��˚�j��(�ğ��'=�+~~������������[���^���V���KZ+�A�2y��+�hqץ���5A���;�\OVhȆ�
2
- u��b�]��9O#����r�Sl����X�5Y%�}�;01mJS2.V���H��-i�_��� �G�W
3
- �̷�F �džWL������O ���<�Bt�Bq�o�u��
4
- g$�� �%G�Uӥ�N��\��pIv�����*�x��Cf����Pn_��YQ��4=���ǖ�1�n e�u�C��w�v�+]�1_uS�r
5
- '@����
1
+ 3Vo
2
+ 9&�cNv1��,�݌�nL�E
3
+ v�*��V� ��I��L�#�������
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_rubygem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.0.1.gcea5aa1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -33,16 +33,16 @@ cert_chain:
33
33
  n6Pwa3EckU/5n8N6gUJTAmGyu6Ncu1pbsZtH450+BJ2z82JNXomdFYlnG8+1XNlj
34
34
  3M1sBFUHvqrBg2hQkQcLHokmQYrYsRK5A7HrxwKcmwM=
35
35
  -----END CERTIFICATE-----
36
- date: 2024-06-08 00:00:00.000000000 Z
36
+ date: 2024-05-20 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
- name: git-version-bump
39
+ name: chef
40
40
  requirement: !ruby/object:Gem::Requirement
41
41
  requirements:
42
42
  - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
- type: :runtime
45
+ type: :development
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
@@ -50,55 +50,13 @@ dependencies:
50
50
  - !ruby/object:Gem::Version
51
51
  version: '0'
52
52
  - !ruby/object:Gem::Dependency
53
- name: rspec
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - "~>"
57
- - !ruby/object:Gem::Version
58
- version: 3.13.0
59
- type: :runtime
60
- prerelease: false
61
- version_requirements: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - "~>"
64
- - !ruby/object:Gem::Version
65
- version: 3.13.0
66
- - !ruby/object:Gem::Dependency
67
- name: rspec-core
68
- requirement: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - "~>"
71
- - !ruby/object:Gem::Version
72
- version: 3.13.0
73
- type: :runtime
74
- prerelease: false
75
- version_requirements: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - "~>"
78
- - !ruby/object:Gem::Version
79
- version: 3.13.0
80
- - !ruby/object:Gem::Dependency
81
- name: rspec-support
82
- requirement: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - "~>"
85
- - !ruby/object:Gem::Version
86
- version: 3.13.0
87
- type: :runtime
88
- prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - "~>"
92
- - !ruby/object:Gem::Version
93
- version: 3.13.0
94
- - !ruby/object:Gem::Dependency
95
- name: rubocop-rake
53
+ name: test-kitchen
96
54
  requirement: !ruby/object:Gem::Requirement
97
55
  requirements:
98
56
  - - ">="
99
57
  - !ruby/object:Gem::Version
100
58
  version: '0'
101
- type: :runtime
59
+ type: :development
102
60
  prerelease: false
103
61
  version_requirements: !ruby/object:Gem::Requirement
104
62
  requirements:
@@ -106,7 +64,7 @@ dependencies:
106
64
  - !ruby/object:Gem::Version
107
65
  version: '0'
108
66
  - !ruby/object:Gem::Dependency
109
- name: rubocop-rspec
67
+ name: git-version-bump
110
68
  requirement: !ruby/object:Gem::Requirement
111
69
  requirements:
112
70
  - - ">="
@@ -126,38 +84,20 @@ email:
126
84
  executables:
127
85
  - deploy_rubygem
128
86
  - prepare_workstation
129
- - test_deploy_rubygem
130
- - deploy_rubygem_manually
131
- - deploy_jimbodragon
132
87
  extensions: []
133
88
  extra_rdoc_files:
134
89
  - README.md
135
90
  - LICENSE
136
91
  files:
92
+ - ".circleci/config.yml"
93
+ - ".gitignore"
137
94
  - ".kitchen/logs/kitchen.log"
138
- - ".rspec"
139
- - ".rubocop.yml"
140
- - CHANGELOG.md
141
- - CODE_OF_CONDUCT.md
95
+ - Gemfile
142
96
  - LICENSE
143
- - LICENSE.txt
144
97
  - README.md
145
- - Rakefile
146
- - bin/deploy_jimbodragon
147
98
  - bin/deploy_rubygem
148
- - bin/deploy_rubygem_manually
149
99
  - bin/prepare_workstation
150
- - bin/test_deploy_rubygem
151
- - exe/deploy_rubygem
152
- - lib/deploy_rubygem.rb
153
- - lib/deploy_rubygem/cookbook.rb
154
- - lib/deploy_rubygem/deploy_rubygem_options.rb
155
- - lib/deploy_rubygem/inspec.rb
156
- - lib/deploy_rubygem/kitchen.rb
157
- - lib/deploy_rubygem/project.rb
158
- - lib/deploy_rubygem/rubygem.rb
159
- - lib/deploy_rubygem/version.rb
160
- - sig/deploy_rubygem.rbs
100
+ - deploy_rubygem.gemspec
161
101
  homepage: https://github.com/JimboDragonGit/deploy_rubygem
162
102
  licenses:
163
103
  - MIT
@@ -174,12 +114,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
114
  requirements:
175
115
  - - ">="
176
116
  - !ruby/object:Gem::Version
177
- version: '3.0'
117
+ version: '0'
178
118
  required_rubygems_version: !ruby/object:Gem::Requirement
179
119
  requirements:
180
- - - ">="
120
+ - - ">"
181
121
  - !ruby/object:Gem::Version
182
- version: '0'
122
+ version: 1.3.1
183
123
  requirements: []
184
124
  rubygems_version: 3.2.32
185
125
  signing_key:
metadata.gz.sig CHANGED
Binary file
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,27 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 3.0
3
-
4
- Style/StringLiterals:
5
- Enabled: true
6
- EnforcedStyle: single_quotes
7
-
8
- Style/StringLiteralsInInterpolation:
9
- Enabled: true
10
- EnforcedStyle: single_quotes
11
-
12
- Layout/LineLength:
13
- Enabled: true
14
- Max: 155
15
-
16
- Style/FrozenStringLiteralComment:
17
- Enabled: false
18
-
19
- Metrics/AbcSize:
20
- Enabled: false
21
-
22
- Layout/CommentIndentation:
23
- Enabled: false
24
-
25
- Metrics/MethodLength:
26
- Enabled: true
27
- Max: 15
data/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- ## [Unreleased]
2
-
3
- ## [0.1.0] - 2024-05-29
4
-
5
- - Initial release
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at jimmy.provencher@hotmail.ca. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt DELETED
File without changes
data/Rakefile DELETED
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- require 'rubocop/rake_task'
7
-
8
- RSpec::Core::RakeTask.new(:spec)
9
- RuboCop::RakeTask.new
10
-
11
- task test_framework: %i[clean rubocop spec]
12
- task default: %i[test_framework build install:local]
13
- task cicd: %i[default release test_version]
14
- task test_version: %i[install compliance]
15
- task :compliance do
16
- system('inspec exec git@github.com:JimboDragonGit/rubygem_baseline.git --input-file compliance.yml')
17
- end
@@ -1,8 +0,0 @@
1
- #!/opt/chef-workstation/embedded/bin/ruby
2
- Signal.trap('INT') { exit 1 }
3
-
4
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
5
- require 'rubygems' unless defined?(Gem)
6
- require 'deploy_rubygem'
7
-
8
- DeployRubygem.deploy_jimbodragon
@@ -1,4 +0,0 @@
1
- #!/opt/chef-workstation/embedded/bin/ruby
2
-
3
- Dir.chdir(::File.join(ENV['HOME'], 'jimbo_management_site'))
4
- system('chef exec inspec exec compliance/profiles/jimbodragon-manual-push')
@@ -1,7 +0,0 @@
1
- #!/opt/chef-workstation/embedded/bin/ruby
2
- Signal.trap('INT') { exit 1 }
3
-
4
- require 'rubygems' unless defined?(Gem)
5
- require 'deploy_rubygem'
6
-
7
- DeployRubygem.new_deploy_rubygem.release
data/exe/deploy_rubygem DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'deploy_rubygem'
@@ -1,117 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'project'
4
- require_relative 'kitchen'
5
- require_relative 'inspec'
6
- require_relative 'rubygem'
7
-
8
- # DeployRubygem - deploy a gem using rake
9
- # Containing a class
10
- module DeployRubygem
11
- # Using Cookbook to deploy and manage cookbook
12
- class Cookbook < Project
13
- attr_reader :profiles, :kitchens, :execute_profiles
14
-
15
- def initialize(new_cookbook_info)
16
- super(new_cookbook_info)
17
- @profiles = cookbook_info[:compliance_profiles].map do |profile_name|
18
- input_file = File.join(%w[compliance inputs] + ["#{cookbook_name}.yml"])
19
- waiver_file = File.join(%w[compliance waivers] + ["#{cookbook_name}.yml"])
20
- Inspec.new(profile_name, input_file, waiver_file)
21
- end
22
- @kitchens = cookbook_info[:kitchens].map do |kitchen_name|
23
- Kitchen.new(kitchen_name, self)
24
- end
25
- @execute_profiles = cookbook_info[:execute_profiles].map do |profile_name|
26
- Inspec.new(profile_name)
27
- end
28
- end
29
-
30
- def cookbook_name
31
- project_name
32
- end
33
-
34
- def cookbook_info
35
- project_options
36
- end
37
-
38
- def cookbook_path
39
- ::File.join(chefrepo_path, 'cookbooks', cookbook_name.to_s)
40
- end
41
-
42
- def git
43
- cookbook_info[__method__]
44
- end
45
-
46
- def groups
47
- cookbook_info[__method__]
48
- end
49
-
50
- def connect_cookbook
51
- system("git submodule add #{git}")
52
- system("git submodule init cookbooks/#{cookbook_name}")
53
- system("git submodule sync cookbooks/#{cookbook_name}")
54
- system("git submodule foreach --recursive 'pwd && git pull'")
55
- end
56
-
57
- def switch_to_cookbook
58
- change_to_chefrepo
59
- connect_cookbook
60
- change_to_project_folder
61
- end
62
-
63
- def upload_cookbook
64
- system('git pull')
65
-
66
- system('chef clean-policy-cookbooks')
67
- # system('chef clean-policy-revisions')
68
-
69
- system("knife cookbook upload --cookbook-path '../' #{cookbook_name}")
70
-
71
- system('chef install Policyfile.rb')
72
-
73
- groups.each do |group|
74
- system("chef push #{group} Policyfile.lock.json")
75
- end
76
- end
77
-
78
- def prepare_test_environment
79
- profiles.each(&:update)
80
- kitchens.each(&:converge)
81
- end
82
-
83
- def destroy_test_environment
84
- kitchens.each(&:destroy)
85
- end
86
-
87
- def deploy
88
- save_progress
89
- switch_to_cookbook
90
- save_progress
91
- upload_cookbook
92
- prepare_test_environment
93
- verify
94
- save_progress
95
- end
96
-
97
- def verify
98
- kitchens.each do |kitchen|
99
- puts "Verify cookbook #{cookbook_name} on target #{kitchen.target}"
100
- kitchen.verify
101
- end
102
-
103
- execute_profiles.each do |inspec_profile|
104
- inspec_profile.update
105
- inspec_profile.apply
106
- end
107
- end
108
-
109
- def save_progress
110
- system('git add .')
111
- system("git commit -m \"Saving: hostname=#{ENV['HOSTNAME']}, cookbook_name=#{cookbook_name}\"")
112
- system('git push')
113
- end
114
-
115
- # system('sudo chef-client --override-runlist jimbo_management_site')
116
- end
117
- end
@@ -1,106 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # DeployRubygem - deploy a gem using rake
4
- # Containing a class
5
- module DeployRubygem
6
- # Using Inspec to deploy and manage Inspec
7
- class DeployRubygemOptions
8
- def project_name
9
- 'deploy_rubygem'
10
- end
11
-
12
- def git
13
- 'git@github.com:JimboDragonGit/deploy_rubygem.git'
14
- end
15
-
16
- def chefrepo_git
17
- 'git@github.com:JimboDragonGit/jimbodragon.git'
18
- end
19
-
20
- def chefrepo_path
21
- '/usr/local/chef/repo/jimbodragon'
22
- end
23
-
24
- def binaries
25
- %w[
26
- deploy_rubygem
27
- prepare_workstation
28
- test_deploy_rubygem
29
- deploy_jimbodragon
30
- ]
31
- end
32
-
33
- def dependencies
34
- %w[
35
- deploy_rubygem
36
- jimbo_management_site
37
- ]
38
- end
39
-
40
- def path
41
- File.join(ENV['HOME'], 'deploy_rubygem')
42
- end
43
-
44
- def jimbodragon_profiles
45
- %w[
46
- jimbodragon-accept
47
- jimbodragon-applications
48
- jimbodragon-deploy-context
49
- jimbodragon-environment
50
- jimbodragon-git
51
- ]
52
- end
53
-
54
- def workstation_profiles
55
- %w[
56
- jimbodragon-linux-baseline
57
- jimbodragon-manual-push
58
- jimbodragon-push
59
- jimbodragon-services
60
- jimbodragon-users
61
- jimbodragon-workstation
62
- ]
63
- end
64
-
65
- def compliance_profiles
66
- jimbodragon_profiles + workstation_profiles
67
- end
68
-
69
- def jimbo_management_site_cookbook
70
- {
71
- git: 'git@github.com:JimboDragonGit/jimbo_management_site.git',
72
- path: File.join(ENV['HOME'], 'jimbo_management_site'),
73
- kitchens: %w[base],
74
- compliance_profiles: compliance_profiles,
75
- execute_profiles: %w[jimbodragon-accept],
76
- groups: %w[base]
77
- }
78
- end
79
-
80
- def jimbo_management_site_profile
81
- {
82
- input: 'compliance/inputs/user.yml',
83
- profile: 'jimbodragon-management-site'
84
- }
85
- end
86
-
87
- def cookbooks
88
- {
89
- jimbo_management_site: jimbo_management_site_cookbook
90
- }
91
- end
92
-
93
- def compile
94
- {
95
- project_name: project_name,
96
- git: git,
97
- chefrepo_git: chefrepo_git,
98
- chefrepo_path: chefrepo_path,
99
- binaries: binaries,
100
- dependencies: dependencies,
101
- path: path,
102
- cookbooks: cookbooks
103
- }
104
- end
105
- end
106
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # DeployRubygem - deploy a gem using rake
4
- # Containing a class
5
- module DeployRubygem
6
- # Using Inspec to deploy and manage Inspec
7
- class Inspec
8
- attr_reader :inspec_name, :input_file
9
-
10
- def initialize(inspec_name, input_file = nil, waiver_file = nil)
11
- @inspec_name = inspec_name
12
- @input_file = input_file
13
- @waiver_file = waiver_file
14
- end
15
-
16
- def apply
17
- puts "ActuaL Dir #{Dir.pwd}"
18
- puts "inspec_name = #{inspec_name}"
19
- puts "input_file = #{input_file}"
20
- puts "waiver_file = #{waiver_file}"
21
- system("inspec check compliance/profiles/#{inspec_name}")
22
- cmd_opt = []
23
-
24
- unless input_file.nil?
25
- cmd_opt << '--input-file'
26
- cmd_opt << input_file
27
- end
28
-
29
- unless waiver_file.nil?
30
- cmd_opt << '--waiver-file'
31
- cmd_opt << waiver_file
32
- end
33
- system("inspec exec compliance/profiles/#{inspec_name} #{cmd_opt.join(' ')}")
34
- end
35
-
36
- def update
37
- system("rm -rf compliance/profiles/#{inspec_name}/vendor")
38
- system("rm compliance/profiles/#{inspec_name}/inspec.lock")
39
- system("inspec vendor compliance/profiles/#{inspec_name}")
40
- end
41
- end
42
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # DeployRubygem - deploy a gem using rake
4
- # Containing a class
5
- module DeployRubygem
6
- # Using Kitchen to deploy and manage Kitchen
7
- class Kitchen
8
- attr_reader :kitchen_name, :cookbook
9
-
10
- def initialize(kitchen_name, cookbook)
11
- @kitchen_name = kitchen_name
12
- @cookbook = cookbook
13
- end
14
-
15
- def check_file
16
- ::File.join("#{kitchen_name}_check.log")
17
- end
18
-
19
- def converge
20
- system("kitchen converge #{kitchen_name}")
21
- end
22
-
23
- def destroy
24
- system("kitchen destroy #{kitchen_name}")
25
- end
26
-
27
- def ip
28
- switch_to_cookbook
29
- system("kitchen exec #{kitchen_name} -c 'hostname -I'")
30
- end
31
-
32
- def verify(showing: true)
33
- cookbook.switch_to_cookbook
34
- if showing
35
- system("kitchen verify #{kitchen_name}")
36
- else
37
- system("kitchen verify #{kitchen_name} > #{check_file}")
38
- end
39
- end
40
-
41
- def target
42
- verify(showing: false)
43
- system("grep -n Target #{check_file}")
44
- end
45
- end
46
- end
@@ -1,121 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # DeployRubygem - deploy a gem using rake
4
- # Containing a class
5
- module DeployRubygem
6
- # Using Project to deploy and manage Project
7
- class Project
8
- attr_reader :project_options, :cookbooks, :compliance_profile
9
-
10
- def initialize(new_project_options)
11
- @project_options = new_project_options
12
- @cookbooks = project_options[:cookbooks]&.map do |cookbook_name, cookbook_options|
13
- new_cookbook_option = cookbook_options.dup
14
- new_cookbook_option[:project_name] = cookbook_name
15
- new_cookbook_option[:chefrepo_path] = chefrepo_path
16
- Cookbook.new(new_cookbook_option)
17
- end
18
- @compliance_profile = Inspec.new(project_options[:compliance_profile])
19
- end
20
-
21
- # Wrapping GVB to fetch project version
22
- class DeployVersion
23
- attr_reader :path
24
-
25
- def initialize(git_path)
26
- @path = git_path
27
- end
28
-
29
- def execute_in_folder
30
- current_folder = Dir.pwd
31
- Dir.chdir path
32
- get_gvb = yield if block_given?
33
- Dir.chdir current_folder
34
- get_gvb
35
- end
36
-
37
- def method_missing(method_name)
38
- execute_in_folder { GVB.send(method_name) }
39
- end
40
-
41
- def respond_to_missing?(method_name)
42
- GVB.methods.include?(method_name)
43
- end
44
-
45
- def patch_bump
46
- execute_in_folder { system('git version-bump patch') }
47
- end
48
-
49
- def short_version
50
- Gem::Version.new("#{major_version}.#{minor_version}.#{patch_version}")
51
- end
52
- end
53
-
54
- def project_name
55
- project_options[__method__]
56
- end
57
-
58
- def binaries
59
- project_options[__method__]
60
- end
61
-
62
- def dependencies
63
- project_options[__method__]
64
- end
65
-
66
- def path
67
- project_options[__method__]
68
- end
69
-
70
- def git
71
- project_options[__method__]
72
- end
73
-
74
- def chefrepo_git
75
- project_options[__method__]
76
- end
77
-
78
- def chefrepo_path
79
- project_options[__method__]
80
- end
81
-
82
- def deploy_cookbooks
83
- cookbooks.each(&:deploy)
84
- end
85
-
86
- def release_cookbooks
87
- project_options[:cookbooks].each(&:release)
88
- end
89
-
90
- def change_to_directory(git_path, git_url)
91
- system("git clone #{git_url}") unless Dir.exist?(chefrepo_path)
92
- Dir.chdir(git_path)
93
- git_path
94
- end
95
-
96
- def change_to_project_folder
97
- change_to_directory(path, git)
98
- end
99
-
100
- def change_to_chefrepo
101
- change_to_directory(chefrepo_path, chefrepo_git)
102
- end
103
-
104
- def test_compliance
105
- change_to_chefrepo
106
- compliance_profile.update
107
- compliance_profile.apply
108
- end
109
-
110
- def git_commit
111
- system('git add .') || return
112
- system("git commit -m 'Self validated for version #{GVB.version}'") || return
113
- system('git push') || abort("Cannot push #{project_name} #{GVB.version}")
114
- end
115
-
116
- def gvb_version
117
- @gvb_version ||= DeployVersion.new(path)
118
- @gvb_version
119
- end
120
- end
121
- end
@@ -1,87 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'project'
4
- require_relative 'cookbook'
5
-
6
- # DeployRubygem - deploy a gem using rake
7
- # Containing a class
8
- module DeployRubygem
9
- # Using Rubygem to deploy and manage Rubygem
10
- class Rubygem < Project
11
- def deploy_dependencies
12
- dependencies.each do |git_depends|
13
- Dir.chdir(::File.join(ENV['HOME'], git_depends))
14
- system('git pull')
15
-
16
- system('git add .')
17
-
18
- system("git commit -m \"Deploying #{project_name}_$(git version-bump show)\"")
19
-
20
- system('git push')
21
- end
22
- end
23
-
24
- def git_prepare
25
- binaries.each do |executable|
26
- system("git add bin/#{executable}")
27
- end
28
-
29
- system('git add deploy_rubygem.gemspec')
30
- system('git add .circleci/config.yml')
31
-
32
- system('git add lib')
33
- end
34
-
35
- def git_sync
36
- Dir.chdir(path)
37
- system('git pull')
38
- end
39
-
40
- def push_minor_bump
41
- system("git commit -m \"Deploying #{project_name}_$(git version-bump show)\"")
42
- system('git version-bump patch') # <major|minor|patch|show>
43
- system('gem build')
44
- system('gem push deploy_rubygem-$(git version-bump show).gem')
45
- system('git version-bump minor') # <major|minor|patch|show>
46
- end
47
-
48
- def deploy_with_git
49
- deploy_dependencies
50
- git_sync
51
- git_prepare
52
-
53
- push_minor_bump
54
- end
55
-
56
- def rake_test
57
- File.delete('Gemfile.lock') if File.exist?('Gemfile.lock')
58
- system('bundle') || return
59
- system('bundle install') || return
60
- system('rake') || return
61
- # system('rake build') &&
62
- # system('rake install:local') &&
63
- end
64
-
65
- def rake_release
66
- change_to_project_folder
67
- git_commit
68
- system('rake install') || abort("Cannot rake install #{project_name} #{GVB.version}")
69
- # system('rake release') || exit(105)
70
- end
71
-
72
- def release
73
- change_to_project_folder
74
- rake_test
75
- rake_release
76
- end
77
-
78
- def deploy
79
- change_to_chefrepo
80
- deploy_cookbooks
81
- change_to_project_folder
82
-
83
- # release
84
- test_compliance
85
- end
86
- end
87
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'git-version-bump'
4
-
5
- require_relative 'rubygem'
6
- require_relative 'deploy_rubygem_options'
7
-
8
- # Set version for DeployRubygem
9
- module DeployRubygem
10
- def self.project_name
11
- 'deploy_rubygem'
12
- end
13
-
14
- def self.new_deploy_rubygem
15
- @self_project = Rubygem.new(DeployRubygemOptions.new.compile) if @self_project.nil?
16
- @self_project
17
- end
18
-
19
- # VERSION = new_deploy_rubygem.gvb_version.short_version
20
- VERSION = '0.1.0'
21
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'deploy_rubygem/version'
4
-
5
- # DeployRubygem - deploy a gem using rake
6
- module DeployRubygem
7
- end
@@ -1,4 +0,0 @@
1
- module DeployRubygem
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end