canzea 0.1.96 → 0.1.97

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: 299d20eb5d8ad408f60d286471418cef6a8a54af
4
- data.tar.gz: 20f6a335877771085febb21e8cb4bfd23c4750ba
3
+ metadata.gz: 25cc7bef88d1c3aa4130ca5d0d7b8b5e13afb70c
4
+ data.tar.gz: 88e48bbf9df252213bb9763326930706a1c35b2c
5
5
  SHA512:
6
- metadata.gz: 5d988cfe94cb858f1e99930298af053ea2fa848a21f0a389b2c6a1979220c02202eeb58c074114151febccb8c10902f270b5142f9b8157512a451aed31acca2b
7
- data.tar.gz: 29a0d8b1b45bb1c824e18d46746b9fd512e146a551037e70adff2d38ba083a6f23d740d909227d01bfc50cec081212d1eff47c95ea41d8ecfb31010f59f45fa2
6
+ metadata.gz: ee42790b768a57e40befce34d1b5a976a768b85eefb50678a4141cfef49b6702864db6f0b985d6bc4eb12ef4bf848b795bf6b301485eacd69ec65d4b0e4439d7
7
+ data.tar.gz: 95dfb66af0bbc3a09f2dd1a93d62c1c89d814b299fefc28a33f4d290ea6b6283259b8f9dee315123771cce8350e811cd47f95446c9c1bb5c7a8611e5c04f1de9
data/lib/audit.rb CHANGED
@@ -29,6 +29,7 @@ class Audit
29
29
  end
30
30
 
31
31
  def log (id, cmd, task, status, msecs, result)
32
+
32
33
  data = {
33
34
  "message" => {
34
35
  "id" => id,
@@ -48,6 +49,15 @@ class Audit
48
49
  "elapsed" => msecs
49
50
  }
50
51
  }
52
+ context = {
53
+ "step" => ENV['ES_STEP'],
54
+ "ref" => ENV['ES_REF'],
55
+ "role" => ENV['ES_ROLE'],
56
+ "solution" => ENV['ES_SOLUTION'],
57
+ "action" => ENV['ES_ACTION']
58
+ }
59
+ summary['message'][:context] = context
60
+
51
61
  puts summary.to_json
52
62
  File.open(Canzea::config[:logging_root] + '/audit.log', 'a') { |file| file.puts(data.to_json) }
53
63
  end
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.96"
2
+ VERSION = "0.1.97"
3
3
  end
@@ -29,6 +29,8 @@ class ApplyConfig
29
29
  role = step['role']
30
30
  solution = step['solution']
31
31
 
32
+ ENV['ES_STEP'] = index;
33
+
32
34
  if (stepNum == nil or index >= Integer(stepNum))
33
35
  log " [#{ref}] Configure for #{role} and #{solution}"
34
36
  ps.runPhaseConfigure role, solution, test, (task == nil ? 1:task), ref
@@ -47,6 +47,9 @@ class HelperRun
47
47
 
48
48
  ENV['CATALOG_LOCATION'] = "#{@basePath}";
49
49
 
50
+ ENV['ES_SOLUTION'] = solution;
51
+ ENV['ES_ACTION'] = action;
52
+
50
53
  parameters = Template.new.processString(parameters, {})
51
54
 
52
55
  if (type == "ruby")
@@ -15,6 +15,10 @@ class PlanStep
15
15
 
16
16
  plan = JSON.parse("{ \"plan\": [ { \"role\": \"#{role}\", \"solution\": \"#{solution}\" } ] }")
17
17
 
18
+ ENV['ES_REF'] = ref;
19
+ ENV['ES_ROLE'] = role;
20
+ ENV['ES_SOLUTION'] = solution;
21
+
18
22
  n = Worker.new
19
23
  n.test ( test )
20
24
 
@@ -53,6 +57,10 @@ class PlanStep
53
57
 
54
58
  plan = JSON.parse("{ \"plan\": [ { \"role\": \"#{role}\", \"solution\": \"#{solution}\" } ] }")
55
59
 
60
+ ENV['ES_REF'] = ref;
61
+ ENV['ES_ROLE'] = role;
62
+ ENV['ES_SOLUTION'] = solution;
63
+
56
64
  n = Worker.new
57
65
  n.test ( test )
58
66
 
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.96
4
+ version: 0.1.97
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler