build-buddy 1.14.1 → 1.14.2
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 +4 -4
- data/lib/build_buddy.rb +1 -1
- data/lib/build_buddy/builder.rb +6 -6
- data/lib/build_buddy/slacker.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14eca58f4d3f477090e879ccc9daa6c2e6cd4ed7
|
|
4
|
+
data.tar.gz: 3f8b38b895cb96d779792147621e9531cad37a40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3969cc949092d261451d018c8e76611990d1c33a1ebc2592c553a4fb57b7742062ca3645539e8a1e1c416993474bd37fc0a181e8b367e380cfe02cd13a6e69d4
|
|
7
|
+
data.tar.gz: 51abbb4a39671b7f381b4cdf50c66fc731ed6f6effc693931ae9a45c230591552c0bf36ce5741c36509ce86b6ebda497f6bcd654d9ddd766fe0fbe59920c9cb8
|
data/lib/build_buddy.rb
CHANGED
data/lib/build_buddy/builder.rb
CHANGED
|
@@ -15,7 +15,7 @@ module BuildBuddy
|
|
|
15
15
|
@pid = nil
|
|
16
16
|
@gid = nil
|
|
17
17
|
@watcher = nil
|
|
18
|
-
@
|
|
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" => @
|
|
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?(@
|
|
171
|
-
metrics_yaml = File.read(@
|
|
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
|
data/lib/build_buddy/slacker.rb
CHANGED
|
@@ -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 #{
|
|
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
|