build-buddy 1.10.0 → 1.11.0

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: 2a8a7992124d1da142da38648ea45d39b805582f
4
- data.tar.gz: 6785a428216e7499fc90d437692715f3442434b2
3
+ metadata.gz: c3ac2498d85759e142f61aead4aebf0968721a4e
4
+ data.tar.gz: 6af814ee68ac2f59f23b84eeef9ca9bfd454707c
5
5
  SHA512:
6
- metadata.gz: 1b789719672f1d11b0bf637063db822d66a4867d2f430e478cf7a6c212209081b2a3e00e95bcad838a220eca323142a39edc35c5fadc07e887825b820861c01d
7
- data.tar.gz: 05299a51f399a428f3038f1da2de44edc9b9d671d65a7cdc9b8009f035a9173e356ae35d94b79b7aaf994bb69041ffa6e72d22ccc214f5261abf82ce5664b410
6
+ metadata.gz: c04cbb95121ccd2dafc9d0445a7c03e94999e48dfdc8421f4f89c7dea5d857446208e193f51451370a2917964032f031b0dc0d5798884b99abc87f7d7f1918ea
7
+ data.tar.gz: c9f08e085110a8a733032bc01a68d824a477f7d5b3149c0c5a968a64b085c057b92961a4602e7f35428702a306434670b5841b28afc6f32d02dc461c521b7289
@@ -9,5 +9,5 @@ require 'build_buddy/recorder'
9
9
  require 'build_buddy/build_data'
10
10
 
11
11
  module BuildBuddy
12
- VERSION = "1.10.0"
12
+ VERSION = "1.11.0"
13
13
  end
@@ -88,7 +88,7 @@ git checkout pr/$GIT_PULL_REQUEST
88
88
  when :branch
89
89
  build_root_dir = expand_vars(Config.branch_root_dir)
90
90
  env.merge!({
91
- "GIT_BRANCH" => 'master',
91
+ "GIT_BRANCH" => build_data.branch.to_s,
92
92
  "BUILD_SCRIPT" => Config.branch_build_script
93
93
  })
94
94
  build_script += %q(
@@ -151,14 +151,17 @@ source ${BUILD_SCRIPT}
151
151
  @build_data.exit_code = (status.exited? ? status.exitstatus : -1)
152
152
 
153
153
  # Collect any data written to the build metrics YAML file
154
- begin
155
- metrics = Psych.load_stream(File.read(@metrics_tempfile.path)).reduce({}, :merge)
156
- rescue Psych::SyntaxError => ex
157
- error "There was a problem collecting build metrics: #{ex.message}"
158
- end
159
- if !metrics
160
- metrics = {}
154
+ metrics = {}
155
+
156
+ if File.exist?(@metrics_tempfile.path)
157
+ metrics_yaml = File.read(@metrics_tempfile.path)
158
+ begin
159
+ metrics = Psych.load_stream(metrics_yaml).reduce({}, :merge)
160
+ rescue Psych::SyntaxError => ex
161
+ error "There was a problem collecting build metrics: #{ex.message}\n#{metrics_yaml}"
162
+ end
161
163
  end
164
+
162
165
  @build_data.metrics = metrics
163
166
 
164
167
  info "Process #{status.pid} #{@build_data.termination_type == :killed ? 'was terminated' : "exited (#{@build_data.exit_code})"}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-buddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lyon-smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-12 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: timers