rundock 1.2.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6f82ec4374a46a20026e0417e0c7f66d7d057e8b
4
- data.tar.gz: 8b580b3c626012b28be9fbc2613f97f87ee9f212
2
+ SHA256:
3
+ metadata.gz: 9bb22b4416bfed20d9298fdef1b332a9d38d18f660bcbb5c9efb7b51f05774b2
4
+ data.tar.gz: 815af1356a3282d2840faa0a4b245461fc6c41017dcb677dea4868d391542e8f
5
5
  SHA512:
6
- metadata.gz: 6be0922ed3c5b1da9b1af40872eff0f329ee40743a6f66c6cc55a68ca61e810971920dfe35522487e54a83051ca549e039361ed9fd1a23980fea9ad762896426
7
- data.tar.gz: beab9f72f9ace44c0e65e9222f1df9489306565204fda69ff213c25f60317bd51838ae75db528d88cf4ef3b2f5771fcfb37601a462ac4c53f80489e76408016b
6
+ metadata.gz: 2e5f969a45ea55d61b00bb8a36a4e27b57dfbb8706d3cec497e9f4bf31293d4e6012e36d5975a8f47d374bca81b206540e4327b92ecff548c4a9a7b3baf92123
7
+ data.tar.gz: e8d6dffa5f76858e3909c934ff207aa4b195e4e13af443670f401f48346cfac4a4a617efe5afa98021dc8fc61b59a6c41e985bcf76967c6c15b83c36347b8942
@@ -1,3 +1,10 @@
1
+ ## v1.2.1
2
+
3
+ Update
4
+
5
+ - Update support ruby version(2.4.1,2.6.0)
6
+ - Support circleci 2.0
7
+
1
8
  ## v1.2.0
2
9
 
3
10
  Update
data/Rakefile CHANGED
@@ -100,6 +100,7 @@ task :clean do
100
100
  execute('rm -fr /var/tmp/hello_rundock*', false, false)
101
101
  Dir.glob('./spec/integration/platforms/*').each do |platform|
102
102
  next if platform =~ /localhost$/
103
+
103
104
  execute("#{platform}/setup.sh --clean", false, true)
104
105
  end
105
106
  end
data/circle.yml CHANGED
@@ -1,19 +1,95 @@
1
- machine:
2
- environment:
3
- RUBY_VERSIONS: 2.1.10,2.4.1
4
- services:
5
- - docker
6
-
7
- dependencies:
8
- cache_directories:
9
- - "~/docker"
10
- override:
11
- - rvm get head
12
- - rvm install $RUBY_VERSIONS
13
- - rvm $RUBY_VERSIONS --verbose do gem install bundler
14
- - rvm $RUBY_VERSIONS --verbose do bundle install
15
-
16
- test:
17
- override:
18
- - rvm $RUBY_VERSIONS --verbose do bundle exec rake spec:
19
- parallel: true
1
+ # This configuration was automatically generated from a CircleCI 1.0 config.
2
+ # It should include any build commands you had along with commands that CircleCI
3
+ # inferred from your project structure. We strongly recommend you read all the
4
+ # comments in this file to understand the structure of CircleCI 2.0, as the idiom
5
+ # for configuration has changed substantially in 2.0 to allow arbitrary jobs rather
6
+ # than the prescribed lifecycle of 1.0. In general, we recommend using this generated
7
+ # configuration as a reference rather than using it in production, though in most
8
+ # cases it should duplicate the execution of your original 1.0 config.
9
+ version: 2
10
+ jobs:
11
+ build:
12
+ machine: true
13
+ working_directory: ~/hiracy/rundock
14
+ parallelism: 2
15
+ shell: /bin/bash --login
16
+ # CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
17
+ # If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables .
18
+ environment:
19
+ CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
20
+ CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
21
+ RUBY_VERSIONS: 2.4.1,2.6.0
22
+ # In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages.
23
+ # In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images.
24
+ # The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job.
25
+ # We have selected a pre-built image that mirrors the build environment we use on
26
+ # the 1.0 platform, but we recommend you choose an image more tailored to the needs
27
+ # of each job. For more information on choosing an image (or alternatively using a
28
+ # VM instead of a container) see https://circleci.com/docs/2.0/executor-types/
29
+ # To see the list of pre-built images that CircleCI provides for most common languages see
30
+ # https://circleci.com/docs/2.0/circleci-images/
31
+ #docker:
32
+ #- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
33
+ # command: /sbin/init
34
+ steps:
35
+ # Machine Setup
36
+ # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
37
+ # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
38
+ - checkout
39
+ # Prepare for artifact and test results collection equivalent to how it was done on 1.0.
40
+ # In many cases you can simplify this from what is generated here.
41
+ # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifactsG/'
42
+ - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
43
+ # This is based on your 1.0 configuration file or project settings
44
+ - run:
45
+ working_directory: ~/hiracy/rundock
46
+ command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
47
+ # Dependencies
48
+ # This would typically go in either a build or a build-and-test job when using workflows
49
+ # Restore the dependency cache
50
+ - restore_cache:
51
+ keys:
52
+ # This branch if available
53
+ - v2-dep-{{ .Branch }}-
54
+ # Default branch if not
55
+ - v2-dep-master-
56
+ # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
57
+ - v2-dep-
58
+ # This is based on your 1.0 configuration file or project settings
59
+ - run: sudo apt-get update
60
+ - run: sudo apt-get install gnupg2
61
+ - run: gpg2 --keyserver keyserver.ubuntu.com --recv-keys 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
62
+ - run: rvm get head
63
+ - run: rvm install $RUBY_VERSIONS
64
+ - run: rvm $RUBY_VERSIONS --verbose do gem install bundler
65
+ - run: rvm $RUBY_VERSIONS --verbose do bundle install
66
+ # Save dependency cache
67
+ - save_cache:
68
+ key: v2-dep-{{ .Branch }}-{{ epoch }}
69
+ paths:
70
+ # This is a broad list of cache paths to include many possible development environments
71
+ # You can probably delete some of these entries
72
+ - vendor/bundle
73
+ - ~/virtualenvs
74
+ - ~/.m2
75
+ - ~/.ivy2
76
+ - ~/.bundle
77
+ - ~/.go_workspace
78
+ - ~/.gradle
79
+ - ~/.cache/bower
80
+ # These cache paths were specified in the 1.0 config
81
+ - ~/docker
82
+ # Test
83
+ # This would typically be a build job when using workflows, possibly combined with build
84
+ # This is based on your 1.0 configuration file or project settings
85
+ - run: rvm $RUBY_VERSIONS --verbose do bundle exec rake spec
86
+ # Teardown
87
+ # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
88
+ # Save test results
89
+ - store_test_results:
90
+ path: /tmp/circleci-test-results
91
+ # Save artifacts
92
+ - store_artifacts:
93
+ path: /tmp/circleci-artifacts
94
+ - store_artifacts:
95
+ path: /tmp/circleci-test-results
@@ -64,6 +64,7 @@ module Rundock
64
64
  rescue StandardError => e
65
65
  Logger.error(e.to_s)
66
66
  raise CommandResultStatusError if exec_options[:errexit]
67
+
67
68
  return nil
68
69
  end
69
70
 
@@ -41,6 +41,7 @@ module Rundock
41
41
  # no use default ssh options if local
42
42
  # set unless scenario file and cli options specified and not localhost
43
43
  next if localhost?
44
+
44
45
  opt = oo.to_s.gsub(/_ssh_default/, '').to_sym
45
46
  @node_info[@nodename.to_sym][:ssh_opts][opt] = @options[oo] if !@node_info[@nodename.to_sym][:ssh_opts][opt] && !@options[opt]
46
47
  end
@@ -24,7 +24,7 @@ module Rundock
24
24
  end
25
25
 
26
26
  File.open(def_ssh_file) do |f|
27
- YAML.load_documents(f) do |y|
27
+ YAML.load_stream(f) do |y|
28
28
  y.each do |k, v|
29
29
  opts["#{k}_ssh_default".to_sym] = v
30
30
  end
@@ -60,6 +60,7 @@ module Rundock
60
60
  attributes.each do |k, v|
61
61
  raise HookStructureError unless v.is_a?(Hash)
62
62
  next if !allow_all && !enables.include?(k.to_s)
63
+
63
64
  @enable_hooks[k] = v
64
65
  hooks << Rundock::HookFactory.instance(v[:hook_type]).create(k.to_s, v)
65
66
  end
@@ -107,7 +107,7 @@ module Rundock
107
107
  cli_options = {} if cli_options.nil?
108
108
 
109
109
  if cli_options[:command] &&
110
- (ope_type == :command || ope_type == :task)
110
+ %i[command task].include?(ope_type)
111
111
  Logger.debug(%("--command or -c" option is specified and ignore scenario file.))
112
112
  return
113
113
  end
@@ -30,6 +30,7 @@ module Rundock
30
30
 
31
31
  def build_scenario_with_cli
32
32
  raise CommandArgNotFoundError, %("--command or -c" option is not specified.) unless @options[:command]
33
+
33
34
  ope = OperationBuilder.new(@options)
34
35
  ope.build_cli
35
36
  end
@@ -40,7 +41,7 @@ module Rundock
40
41
  type = %i[main target_info tasks hooks]
41
42
  scenario_data = {}
42
43
 
43
- YAML.load_documents(@scenario_file).each_with_index do |data, idx|
44
+ YAML.load_stream(@scenario_file).each_with_index do |data, idx|
44
45
  if idx == 0
45
46
  scenario_data[type[idx]] = data
46
47
  else
@@ -80,6 +80,7 @@ module Rundock
80
80
 
81
81
  def flush
82
82
  return nil if @lock
83
+
83
84
  ret = @buffer.dup
84
85
  @buffer.clear
85
86
  ret
@@ -24,6 +24,7 @@ module Rundock
24
24
 
25
25
  def assign_args(src, args)
26
26
  return src unless args
27
+
27
28
  src.gsub(/\$#/, args.length.to_s)
28
29
  .gsub(/\$@/, args.join(' '))
29
30
  .gsub(/\$[1-9]/) { |arg_n| args[arg_n.chars[1..-1].join.to_i - 1] }
@@ -108,6 +108,7 @@ module Rundock
108
108
  map = {}
109
109
  binding.each do |k, v|
110
110
  next unless v.key?(:value)
111
+
111
112
  bind_key = assign_args(k.to_s, args)
112
113
  bind_type = assign_args(v[:type].to_s, args)
113
114
  bind_value = assign_args(v[:value].to_s, args)
@@ -76,6 +76,7 @@ module Rundock
76
76
  RUNDOCK_PLUGINS.each do |plugin|
77
77
  next if g !~ /^(rundock-plugin-#{plugin})-/
78
78
  next if Gem::Specification.find_by_name(g).nil?
79
+
79
80
  Logger.debug("Loading rundock plugin: #{g}")
80
81
  libdir = "#{Gem::Specification.find_by_name(g).full_gem_path}/lib/#{Regexp.last_match(1).tr('-', '/')}"
81
82
  Dir.glob("#{libdir}/*.rb").each do |f|
@@ -1,3 +1,3 @@
1
1
  module Rundock
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_development_dependency 'bundler', '~> 1.9'
20
+ spec.add_development_dependency 'bundler', '~> 2.0'
21
21
  spec.add_development_dependency 'rake', '~> 10.0'
22
22
  spec.add_development_dependency 'rubocop'
23
23
  spec.add_development_dependency 'serverspec', '~> 2.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rundock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiracy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-11 00:00:00.000000000 Z
11
+ date: 2019-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -153,7 +153,6 @@ files:
153
153
  - ".gitignore"
154
154
  - ".rspec"
155
155
  - ".rubocop.yml"
156
- - ".travis.yml"
157
156
  - CHANGELOG.md
158
157
  - Gemfile
159
158
  - LICENSE
@@ -293,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
292
  version: '0'
294
293
  requirements: []
295
294
  rubyforge_project:
296
- rubygems_version: 2.5.1
295
+ rubygems_version: 2.7.6
297
296
  signing_key:
298
297
  specification_version: 4
299
298
  summary: Simple and extensible server orchestration framework
@@ -1,3 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0