brpm_content_framework 0.2.46 → 0.2.47
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 +8 -8
- data/.gitignore +2 -2
- data/config.yml +1 -1
- data/docker/framework/docker_execute_automation +0 -0
- data/infrastructure/module_template/.gitignore.default +37 -0
- data/infrastructure/module_template/.ruby-gemset +1 -0
- data/infrastructure/module_template/.ruby-version +1 -0
- data/infrastructure/module_template/tests/{create_package_spec.rb → execute_test_spec.rb} +0 -0
- data/infrastructure/module_template/tests/spec_helper.rb +0 -8
- data/lib/brpm_auto.rb +15 -0
- data/lib/brpm_script_executor.rb +2 -2
- data/lib/logging/brpm_logger.rb +9 -6
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
OWJhZjJkYzBkMjE3NDZiMDZjZjk3ZGZkOWQ1MzIwNDRkZGIwNWNlNA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
YjFhZWJlODYyYWYwNmU0MzEzZWU5MGZjYWNmNGU2NWY5YThkMDM4Yw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZmJmOTFiYTRkMzYxZDk5NDRhNDZmZmYxMTAwYWNkYzkwZDkxMDA3OTliZWZl
|
|
10
|
+
YjE2NDljZWU4YWY5MTliZjJhMTU3NzY3OWMyYzkzN2E3MzM4NzEwN2NiMzFk
|
|
11
|
+
OGZkY2Y4NWUxNDczNTZjMTdlNTQ2MzI5YWNlYTA1MTNlNjhmNzc=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZGY2M2MyZWFmYmU1MmRiNzY4MDQ4YzJiNjBiOWIwOWY2NWE2ZTJjMTZmMzMw
|
|
14
|
+
OGEzMmJiYjgxYmQ3Nzg5YmQxMThhNmQ4M2FmZDI3OTgzNjUxZDgwZmQ5MGQ1
|
|
15
|
+
OWIyNWUxNzBlZWJiZmI0ZTY3NDc2MjBiYjYxMzYxNGY1MDYxMTc=
|
data/.gitignore
CHANGED
|
@@ -27,8 +27,8 @@ build/
|
|
|
27
27
|
# for a library or gem, you might want to ignore these files since the code is
|
|
28
28
|
# intended to run in multiple environments; otherwise, check them in:
|
|
29
29
|
Gemfile.lock
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/.ruby-version
|
|
31
|
+
/.ruby-gemset
|
|
32
32
|
|
|
33
33
|
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
34
34
|
.rvmrc
|
data/config.yml
CHANGED
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
/.config
|
|
4
|
+
/coverage/
|
|
5
|
+
/InstalledFiles
|
|
6
|
+
/pkg/
|
|
7
|
+
/spec/reports/
|
|
8
|
+
/test/tmp/
|
|
9
|
+
/test/version_tmp/
|
|
10
|
+
/tmp/
|
|
11
|
+
|
|
12
|
+
## Specific to RubyMotion:
|
|
13
|
+
.dat*
|
|
14
|
+
.repl_history
|
|
15
|
+
build/
|
|
16
|
+
|
|
17
|
+
## Documentation cache and generated files:
|
|
18
|
+
/.yardoc/
|
|
19
|
+
/_yardoc/
|
|
20
|
+
/doc/
|
|
21
|
+
/rdoc/
|
|
22
|
+
|
|
23
|
+
## Environment normalisation:
|
|
24
|
+
/.bundle/
|
|
25
|
+
/lib/bundler/man/
|
|
26
|
+
|
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
29
|
+
Gemfile.lock
|
|
30
|
+
.ruby-gemset
|
|
31
|
+
|
|
32
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
33
|
+
.rvmrc
|
|
34
|
+
|
|
35
|
+
.DS_Store
|
|
36
|
+
|
|
37
|
+
.idea
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
brpm_content
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.9.3-p392
|
|
File without changes
|
|
@@ -3,7 +3,6 @@ require "brpm_script_executor"
|
|
|
3
3
|
|
|
4
4
|
def setup_brpm_auto
|
|
5
5
|
FileUtils.mkdir_p "/tmp/brpm_content"
|
|
6
|
-
create_symlink_to_gemset
|
|
7
6
|
|
|
8
7
|
BrpmAuto.setup( get_default_params.merge!(get_integration_params) )
|
|
9
8
|
end
|
|
@@ -29,10 +28,3 @@ def get_integration_params
|
|
|
29
28
|
|
|
30
29
|
params
|
|
31
30
|
end
|
|
32
|
-
|
|
33
|
-
def create_symlink_to_gemset
|
|
34
|
-
module_name = File.basename(File.expand_path("#{File.dirname(__FILE__)}/.."))
|
|
35
|
-
symlink = "#{ENV["GEM_HOME"]}/gems/#{module_name}-999.0.0"
|
|
36
|
-
FileUtils.rm(symlink) if File.exists?(symlink)
|
|
37
|
-
FileUtils.ln_s(File.expand_path("#{File.dirname(__FILE__)}/.."), symlink)
|
|
38
|
-
end
|
data/lib/brpm_auto.rb
CHANGED
|
@@ -121,6 +121,21 @@ class BrpmAuto
|
|
|
121
121
|
@logger.message_box(message, m_type)
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
def pack_response(argument_name, response)
|
|
125
|
+
flag = "#------ Block to Set Pack Response ---------------#\n"
|
|
126
|
+
unless argument_name.nil?
|
|
127
|
+
if response.is_a?(Hash)
|
|
128
|
+
# Used for out-table output parameter
|
|
129
|
+
flag += "$$SS_Pack_Response{#{argument_name}@@#{response.to_json}}$$"
|
|
130
|
+
else
|
|
131
|
+
flag += "$$SS_Pack_Response{#{argument_name}=>#{response}}$$"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
flag += "\n#------- End Set Pack Response Block ---------------#\n"
|
|
135
|
+
@logger.log(flag, false)
|
|
136
|
+
flag
|
|
137
|
+
end
|
|
138
|
+
|
|
124
139
|
def initialize_request_params(path)
|
|
125
140
|
@request_params = RequestParams.new(path)
|
|
126
141
|
end
|
data/lib/brpm_script_executor.rb
CHANGED
|
@@ -133,6 +133,8 @@ EOR
|
|
|
133
133
|
BrpmAuto.log "\n\t" + e.backtrace.join("\n\t")
|
|
134
134
|
|
|
135
135
|
raise e
|
|
136
|
+
ensure
|
|
137
|
+
load File.expand_path("#{File.dirname(__FILE__)}/../infrastructure/write_to.rb") if BrpmAuto.params.run_from_brpm
|
|
136
138
|
end
|
|
137
139
|
end
|
|
138
140
|
|
|
@@ -207,8 +209,6 @@ EOR
|
|
|
207
209
|
|
|
208
210
|
BrpmAuto.log ">>>>>>>>>>>>>> STOP #{automation_type} #{modul} #{name} - total duration: #{Time.at(duration).utc.strftime("%H:%M:%S")}"
|
|
209
211
|
BrpmAuto.log ""
|
|
210
|
-
|
|
211
|
-
#load File.expand_path("#{File.dirname(__FILE__)}/../infrastructure/write_to.rb") if BrpmAuto.params.run_from_brpm
|
|
212
212
|
end
|
|
213
213
|
end
|
|
214
214
|
|
data/lib/logging/brpm_logger.rb
CHANGED
|
@@ -10,19 +10,22 @@ class BrpmLogger < LoggerBase
|
|
|
10
10
|
|
|
11
11
|
@request_log_file_path = "#{BrpmAuto.params.automation_results_dir}/#{BrpmAuto.params.request_id}.log"
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
@step_run_log_file_path = "#{BrpmAuto.params.automation_results_dir}/#{BrpmAuto.params.request_id}_#{BrpmAuto.params.step_id}_#{BrpmAuto.params.run_key}.log"
|
|
14
|
+
#@step_run_log_file_path = BrpmAuto.params.output_file
|
|
15
15
|
|
|
16
16
|
print "Logging to #{@step_run_log_file_path} and #{@request_log_file_path}\n" unless BrpmAuto.params.also_log_to_console
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def log(message)
|
|
19
|
+
def log(message, with_prefix = true)
|
|
20
20
|
message = message.to_s # in case booleans or whatever are passed
|
|
21
21
|
timestamp = "#{Time.now.strftime("%Y-%m-%d %H:%M:%S")}"
|
|
22
|
-
log_message = ""
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if with_prefix
|
|
24
|
+
prefix = ""
|
|
25
|
+
else
|
|
26
|
+
prefix = "#{timestamp}|#{'%2.2s' % @step_number}|#{'%-20.20s' % @step_name}|"
|
|
27
|
+
message.gsub!("\n", "\n" + (" " * prefix.length))
|
|
28
|
+
end
|
|
26
29
|
|
|
27
30
|
log_message = "#{prefix}#{message}\n"
|
|
28
31
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brpm_content_framework
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.47
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Niek Bartholomeus
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-10-
|
|
11
|
+
date: 2015-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-ssh
|
|
@@ -192,6 +192,9 @@ files:
|
|
|
192
192
|
- infrastructure/config/customer_include.rb
|
|
193
193
|
- infrastructure/config/server.yml
|
|
194
194
|
- infrastructure/log.html
|
|
195
|
+
- infrastructure/module_template/.gitignore.default
|
|
196
|
+
- infrastructure/module_template/.ruby-gemset
|
|
197
|
+
- infrastructure/module_template/.ruby-version
|
|
195
198
|
- infrastructure/module_template/Gemfile
|
|
196
199
|
- infrastructure/module_template/Rakefile
|
|
197
200
|
- infrastructure/module_template/Rakefile_for_private_gem_repo
|
|
@@ -202,7 +205,7 @@ files:
|
|
|
202
205
|
- infrastructure/module_template/module.gemspec
|
|
203
206
|
- infrastructure/module_template/resource_automations/my_resource_automation_script.meta
|
|
204
207
|
- infrastructure/module_template/resource_automations/my_resource_automation_script.rb
|
|
205
|
-
- infrastructure/module_template/tests/
|
|
208
|
+
- infrastructure/module_template/tests/execute_test_spec.rb
|
|
206
209
|
- infrastructure/module_template/tests/spec_helper.rb
|
|
207
210
|
- infrastructure/scripts/backup_database.sh
|
|
208
211
|
- infrastructure/scripts/ddns.sh
|