build-buddy 1.14.1 → 1.14.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ba4c0fb810c99f9f83160fed087cfe0265d4894
4
- data.tar.gz: d4beedca033f53d2867182aeeecad3a67c9f409c
3
+ metadata.gz: 14eca58f4d3f477090e879ccc9daa6c2e6cd4ed7
4
+ data.tar.gz: 3f8b38b895cb96d779792147621e9531cad37a40
5
5
  SHA512:
6
- metadata.gz: 691ce8fe310f1aae0719b7cf4a56effb99b14078948f4fed733b7436c5250a8293f16e58737796d739c8e4f47df10732b0b38dadccd3d057757e3f65c14498a9
7
- data.tar.gz: a214d15ceea592f4bf8d632b63c593532e24b3d2b40abb3b127ce982e448e45213f6013d3312cb159eb1be216637997c625ebed6d56d97e18008fcd9abaac2de
6
+ metadata.gz: 3969cc949092d261451d018c8e76611990d1c33a1ebc2592c553a4fb57b7742062ca3645539e8a1e1c416993474bd37fc0a181e8b367e380cfe02cd13a6e69d4
7
+ data.tar.gz: 51abbb4a39671b7f381b4cdf50c66fc731ed6f6effc693931ae9a45c230591552c0bf36ce5741c36509ce86b6ebda497f6bcd654d9ddd766fe0fbe59920c9cb8
@@ -9,5 +9,5 @@ require 'build_buddy/recorder'
9
9
  require 'build_buddy/build_data'
10
10
 
11
11
  module BuildBuddy
12
- VERSION = "1.14.1"
12
+ VERSION = "1.14.2"
13
13
  end
@@ -15,7 +15,7 @@ module BuildBuddy
15
15
  @pid = nil
16
16
  @gid = nil
17
17
  @watcher = nil
18
- @metrics_tempfile = nil
18
+ @metrics_file_name = nil
19
19
  @build_output_dir = nil
20
20
  @log_file_name = nil
21
21
  end
@@ -26,12 +26,12 @@ module BuildBuddy
26
26
  end
27
27
 
28
28
  @build_data = build_data
29
- @metrics_tempfile = Tempfile.new('build-metrics')
30
- @metrics_tempfile.close()
31
29
  @build_output_dir = File.join(Config.build_output_dir, @build_data._id.to_s)
30
+ @metrics_file_name = File.join(@build_output_dir, 'metrics.yaml')
32
31
  @log_file_name = File.join(@build_output_dir, "log.txt")
33
32
 
34
33
  FileUtils.mkdir(@build_output_dir)
34
+ File.new(@metrics_file_name, 'w').close
35
35
 
36
36
  repo_parts = @build_data.repo_full_name.split('/')
37
37
  git_repo_owner = repo_parts[0]
@@ -111,7 +111,7 @@ source ${BB_BUILD_SCRIPT}
111
111
  env.merge!({
112
112
  "BB_GIT_REPO_OWNER" => git_repo_owner,
113
113
  "BB_GIT_REPO_NAME" => git_repo_name,
114
- "BB_METRICS_DATA_FILE" => @metrics_tempfile.path,
114
+ "BB_METRICS_DATA_FILE" => @metrics_file_name,
115
115
  "BB_BUILD_OUTPUT_DIR" => @build_output_dir,
116
116
  "BB_MONGO_URI" => Config.mongo_uri,
117
117
  "RBENV_DIR" => nil,
@@ -167,8 +167,8 @@ source ${BB_BUILD_SCRIPT}
167
167
  # Collect any data written to the build metrics YAML file
168
168
  metrics = {}
169
169
 
170
- if File.exist?(@metrics_tempfile.path)
171
- metrics_yaml = File.read(@metrics_tempfile.path)
170
+ if File.exist?(@metrics_file_name)
171
+ metrics_yaml = File.read(@metrics_file_name)
172
172
  begin
173
173
  metrics = Psych.load_stream(metrics_yaml).reduce({}, :merge)
174
174
  rescue Psych::SyntaxError => ex
@@ -113,7 +113,7 @@ module BuildBuddy
113
113
  end
114
114
 
115
115
  def do_help is_from_slack_channel
116
- %Q(Hello#{is_from_slack_channel ? " <@#{data['user']}>" : ""}, I'm the *@#{@rt_client.self['name']}* build bot version #{BuildBuddy::VERSION}!
116
+ %Q(Hello#{is_from_slack_channel ? " <@#{data['user']}>" : ""}, I'm the *@#{@rt_client.self['name']}* build bot version #{BuildBuddy::VERSION}!
117
117
 
118
118
  I understand types of build - pull requests and branch. A pull request build happens when you make a pull request to the https://github.com/#{Config.github_webhook_repo_full_name} GitHub repository.
119
119
 
@@ -285,7 +285,7 @@ I have lots of `show` commands:
285
285
  @pr_channel_id = Slacker.get_channel_id(Config.slack_pr_channel, map_channel_name_to_id, map_group_name_to_id)
286
286
 
287
287
  if @pr_channel_id.nil?
288
- error "Unable to identify the PR slack channel #{channel}"
288
+ error "Unable to identify the PR slack channel #{Config.slack_pr_channel}"
289
289
  else
290
290
  info "Slack PR notification channel is #{@pr_channel_id} (#{Config.slack_pr_channel})"
291
291
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-buddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.1
4
+ version: 1.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lyon-smith