canzea 0.1.30 → 0.1.31

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
2
  SHA1:
3
- metadata.gz: 4173c7e6e1d59a0fd6d4d3b0646af9cbba2def41
4
- data.tar.gz: a1c2ab05ece4771b31e0e5cb6f7c7ae81567cc3f
3
+ metadata.gz: 07c1fd750790a2c8a5f46d9ef71b2b945bd00345
4
+ data.tar.gz: 89eecb6433b3372b3120611c57a8e955f581df77
5
5
  SHA512:
6
- metadata.gz: 4ce919180e9abe97ddef2f6392967862a88b3e2e1dbe1ddf121dab086daba97403ebd4c7234045c0bbf64e490bcfd247f3070c40680e6762b7443021cd4b4b17
7
- data.tar.gz: aed9a155472adaded217be2d7d5ede2f4d715c74bd17352407fc938b5a1c2d5062b0bde5bbadd16d6ef8d8150599c05cbeae031e723940e6aec6ba48c65939e1
6
+ metadata.gz: 4fe6176806dbcf3a8e138f3f2adabc8c24cb12ef4f1ad052998a74bb48e07d5a2c4b026db17bd867c01c2ed2e0166170060db15e36d7cee0532f85e379e23732
7
+ data.tar.gz: 983f4f95775fc60076b55ea030035a9911fc5365582818390390b5497c6ef5faa90082c83936aede997473b98bf1ad16bccffa18e8406d98c3c084fa51d3af83
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.30"
2
+ VERSION = "0.1.31"
3
3
  end
data/lib/canzea.rb CHANGED
@@ -18,7 +18,6 @@ require "commands/update-config"
18
18
  require "commands/apply-config"
19
19
 
20
20
  module Canzea
21
-
22
21
  command = Cri::Command.define do
23
22
  name 'canzea'
24
23
  usage 'canzea [options]'
@@ -57,6 +56,7 @@ module Canzea
57
56
  option nil, :solution, 'Solution', argument: :required
58
57
  option nil, :task, 'Task', argument: :required
59
58
  option nil, :step, 'Step', argument: :required
59
+ option nil, :status, 'Result will be put into the status message', argument: :required
60
60
  option nil, :serverBase, 'Server Base', argument: :required
61
61
  option nil, :serverNumber, 'Server Number', argument: :required
62
62
  option nil, :privateKey, 'Task', argument: :required
@@ -76,6 +76,9 @@ module Canzea
76
76
 
77
77
  if opts[:pwd]
78
78
  puts Dir.pwd
79
+ end
80
+
81
+ if (opts[:reset])
79
82
  GetCatalog.new.do(opts.fetch(:catalogTag, nil));
80
83
  end
81
84
 
@@ -96,10 +99,6 @@ module Canzea
96
99
  end
97
100
  end
98
101
 
99
- if (opts[:reset])
100
- GetCatalog.new.do(opts.fetch(:catalogTag, nil));
101
- end
102
-
103
102
  if (opts[:lifecycle])
104
103
 
105
104
  lifecycle = opts[:lifecycle]
@@ -128,7 +127,7 @@ module Canzea
128
127
  if lifecycle == 'wire'
129
128
  puts "Running helper #{opts[:solution]} #{opts[:action]}"
130
129
  ps = HelperRun.new
131
- ps.run opts[:solution], opts[:action], opts[:args]
130
+ ps.run opts[:solution], opts[:action], opts[:args], opts.fetch(:status,nil)
132
131
  end
133
132
  end
134
133
 
@@ -1,9 +1,13 @@
1
1
  require "git"
2
2
  require "fileutils"
3
+ require "logger"
3
4
  require "pathname"
4
5
 
5
6
 
6
7
  class GetCatalog
8
+ def initialize ()
9
+ @log = Logger.new(Canzea::config[:logging_root] + '/plans.log')
10
+ end
7
11
  def do(tag = nil)
8
12
  catalogLocation = Canzea::config[:catalog_location]
9
13
  FileUtils.rm_rf catalogLocation
@@ -12,11 +16,11 @@ class GetCatalog
12
16
  g = Git.clone(Canzea::config[:catalog_git], "", :path => catalogLocation)
13
17
  g.branch Canzea::config[:catalog_branch]
14
18
  if (tag != nil)
15
- puts "For tag #{tag}"
19
+ @log.info "For tag #{tag}"
16
20
  g.tag tag
17
21
  end
18
- puts "Branch '#{g.branch}' Commit #{g.log[0]}"
19
- puts "Source #{catalogLocation}"
22
+ @log.info "Branch '#{g.branch}' Commit #{g.log[0]}"
23
+ @log.info "Source #{catalogLocation}"
20
24
  end
21
25
 
22
26
  end
@@ -18,7 +18,7 @@ class HelperRun
18
18
  }
19
19
  end
20
20
 
21
- def run (solution, action, parameters)
21
+ def run (solution, action, parameters, status = false)
22
22
 
23
23
  type = "ruby"
24
24
 
@@ -42,7 +42,7 @@ class HelperRun
42
42
  else
43
43
  cmd = "#{@basePath}/helpers/#{solution}/#{action}.sh \"#{parameters}\""
44
44
  end
45
- r.run cmd, 1, 1, false
45
+ r.run cmd, 1, 1, status
46
46
 
47
47
  rescue => exception
48
48
  @log.error(cmd)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canzea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-03 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler