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 +4 -4
- data/lib/canzea/version.rb +1 -1
- data/lib/canzea.rb +5 -6
- data/lib/commands/get-catalog.rb +7 -3
- data/lib/helper-run-class.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07c1fd750790a2c8a5f46d9ef71b2b945bd00345
|
4
|
+
data.tar.gz: 89eecb6433b3372b3120611c57a8e955f581df77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fe6176806dbcf3a8e138f3f2adabc8c24cb12ef4f1ad052998a74bb48e07d5a2c4b026db17bd867c01c2ed2e0166170060db15e36d7cee0532f85e379e23732
|
7
|
+
data.tar.gz: 983f4f95775fc60076b55ea030035a9911fc5365582818390390b5497c6ef5faa90082c83936aede997473b98bf1ad16bccffa18e8406d98c3c084fa51d3af83
|
data/lib/canzea/version.rb
CHANGED
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
|
|
data/lib/commands/get-catalog.rb
CHANGED
@@ -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
|
-
|
19
|
+
@log.info "For tag #{tag}"
|
16
20
|
g.tag tag
|
17
21
|
end
|
18
|
-
|
19
|
-
|
22
|
+
@log.info "Branch '#{g.branch}' Commit #{g.log[0]}"
|
23
|
+
@log.info "Source #{catalogLocation}"
|
20
24
|
end
|
21
25
|
|
22
26
|
end
|
data/lib/helper-run-class.rb
CHANGED
@@ -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,
|
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.
|
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-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|