brpm_content_framework 0.2.34 → 0.2.35
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/config.yml +1 -1
- data/docker/Dockerfile +3 -2
- data/infrastructure/module_template/{Dockerfile → docker/Dockerfile} +4 -3
- data/lib/brpm_script_executor.rb +10 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjYxYjhmYzJmNTg0MjZkMDJjNzkwMzI1M2YxNWM5MjJkZjE4MWU4Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODQyZWRjYzYwODJjZDhlYTU1ZTlhNWI1ZjIzMmVhYTM5OTZjMWViMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmY2Yzk0N2MyMTVhNTc5MDkxY2Q1NzRiYmVjMmE0YmY3NzM0MWYxNDU0ZmIz
|
10
|
+
YjE4NjZiMTI0NzQwODdiNGQ4MDJlM2U1ODUxNGVlYzJiYzBjNmUxZTdhNGE1
|
11
|
+
ZjlmMGRiMjNmYTRmZDJhZWNmYmY2OWIzOTRhZWU2ZWFjOWNmZWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWE0Y2RhNDM1ZmFlMTgzYTExMjVjOTNlZTBjYWJjYzhkY2RlZGRkNjc0NGFl
|
14
|
+
N2U4MWI0Yzk3NDI1NDAxNzRkOWRlZDRlYjMxNmI5MzBmYTFjNmU4ZDYyNzA1
|
15
|
+
ZmE5NDdlYjViYjg0MmIyNzUyMTNiNTU2OTJiM2U2MTc5NDgxYTc=
|
data/config.yml
CHANGED
data/docker/Dockerfile
CHANGED
@@ -5,8 +5,9 @@ ENV BRPM_CONTENT_FRAMEWORK_VERSION 1.0.0
|
|
5
5
|
ENV GEM_HOME /usr/lib/ruby/gems/1.9.1
|
6
6
|
|
7
7
|
RUN gem install brpm_content_framework --ignore-dependencies -v "$BRPM_CONTENT_FRAMEWORK_VERSION" && \
|
8
|
-
cd $GEM_HOME/gems/brpm_content_framework-$BRPM_CONTENT_FRAMEWORK_VERSION &&
|
9
|
-
|
8
|
+
cd "$GEM_HOME/gems/brpm_content_framework-$BRPM_CONTENT_FRAMEWORK_VERSION" && \
|
9
|
+
bundle install && \
|
10
|
+
rm -rf "$GEM_HOME/cache"
|
10
11
|
|
11
12
|
ADD . /
|
12
13
|
|
@@ -4,6 +4,7 @@ MAINTAINER Niek Bartholomeus <niek.bartholomeus@gmail.com>
|
|
4
4
|
ENV MODULE <module name>
|
5
5
|
ENV VERSION <module version>
|
6
6
|
|
7
|
-
RUN gem install $MODULE --ignore-dependencies -v "$VERSION" && \
|
8
|
-
cd $GEM_HOME/gems/$MODULE-$VERSION &&
|
9
|
-
|
7
|
+
RUN gem install "$MODULE" --ignore-dependencies -v "$VERSION" && \
|
8
|
+
cd "$GEM_HOME/gems/$MODULE-$VERSION" && \
|
9
|
+
bundle install && \
|
10
|
+
rm -rf "$GEM_HOME/cache"
|
data/lib/brpm_script_executor.rb
CHANGED
@@ -74,8 +74,7 @@ class BrpmScriptExecutor
|
|
74
74
|
result = BrpmAuto.execute_shell(command)
|
75
75
|
|
76
76
|
else
|
77
|
-
|
78
|
-
env_vars["GEM_HOME"] = ENV["BRPM_CONTENT_HOME"] || "#{ENV["BRPM_HOME"]}/modules"
|
77
|
+
env_var_gem_home = "export GEM_HOME=#{ENV["BRPM_CONTENT_HOME"] || "#{ENV["BRPM_HOME"]}/modules"};"
|
79
78
|
|
80
79
|
module_path = get_module_gem_path(modul, module_version)
|
81
80
|
|
@@ -88,15 +87,21 @@ class BrpmScriptExecutor
|
|
88
87
|
gemfile_path = "#{module_path}/Gemfile"
|
89
88
|
if File.exists?(gemfile_path)
|
90
89
|
BrpmAuto.log "Using Gemfile #{gemfile_path}."
|
91
|
-
|
90
|
+
env_var_bundler = "export BUNDLE_GEMFILE=#{gemfile_path};"
|
92
91
|
require_bundler = "require 'bundler/setup';"
|
93
92
|
else
|
94
93
|
BrpmAuto.log("This module doesn't have a Gemfile.")
|
94
|
+
env_var_bundler = ""
|
95
95
|
require_bundler = ""
|
96
96
|
end
|
97
97
|
|
98
98
|
BrpmAuto.log "Executing the script in a separate process..."
|
99
|
-
|
99
|
+
command = <<EOR
|
100
|
+
#{require_bundler}
|
101
|
+
require \\"brpm_script_executor\\"
|
102
|
+
BrpmScriptExecutor.execute_automation_script_from_other_process(\\"#{modul}\\", \\"#{name}\\", \\"#{params_path}\\", \\"#{automation_type}\\", \\"#{parent_id}\\", \\"#{offset}\\", \\"#{max_records}\\")
|
103
|
+
EOR
|
104
|
+
result = Bundler.with_clean_env { BrpmAuto.execute_shell("#{env_var_gem_home}#{env_var_bundler}ruby -e \"#{command}\"") }
|
100
105
|
end
|
101
106
|
|
102
107
|
FileUtils.rm(params_path) if File.exists?(params_path)
|
@@ -113,8 +118,8 @@ class BrpmScriptExecutor
|
|
113
118
|
end
|
114
119
|
|
115
120
|
if automation_type == "resource_automation"
|
116
|
-
BrpmAuto.log "Loading the result from #{result_path} and cleaning it up..."
|
117
121
|
result_path = params_path.sub!("params", "result")
|
122
|
+
BrpmAuto.log "Loading the result from #{result_path} and cleaning it up..."
|
118
123
|
result = YAML.load_file(result_path)
|
119
124
|
FileUtils.rm result_path
|
120
125
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Niek Bartholomeus
|
@@ -186,13 +186,13 @@ files:
|
|
186
186
|
- infrastructure/config/customer_include.rb
|
187
187
|
- infrastructure/config/server.yml
|
188
188
|
- infrastructure/log.html
|
189
|
-
- infrastructure/module_template/Dockerfile
|
190
189
|
- infrastructure/module_template/Gemfile
|
191
190
|
- infrastructure/module_template/Rakefile
|
192
191
|
- infrastructure/module_template/Rakefile_for_private_gem_repo
|
193
192
|
- infrastructure/module_template/automations/my_automation_script.meta
|
194
193
|
- infrastructure/module_template/automations/my_automation_script.rb
|
195
194
|
- infrastructure/module_template/config.yml
|
195
|
+
- infrastructure/module_template/docker/Dockerfile
|
196
196
|
- infrastructure/module_template/lib/my_library.rb
|
197
197
|
- infrastructure/module_template/module.gemspec
|
198
198
|
- infrastructure/module_template/resource_automations/my_resource_automation_script.meta
|