cody 0.8.4 → 0.8.5
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/CHANGELOG.md +4 -0
- data/lib/cody/tailer.rb +16 -2
- data/lib/cody/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 173c5575c3d569b9f3f7a923a9c6998799cc725c7646301281f8c80b1d2386da
|
4
|
+
data.tar.gz: 810c27981e1b0b6a780917116b0175778d1fa6b97adc7e5a32fefe9e2aaf6f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0b34f5820b0f265de6dfe41087b3fa4dca36a2ae5fbcbb453fa0683eb9b0e33aa4fb91867352e0205af03d12cb0ee7a5b35515f7f0873c4eed485abbd478e33
|
7
|
+
data.tar.gz: f0afd77f39eafa11845a72218e39eb146aee6ff62bba30599296f2374c9ec5d49bb8fe9f35704e59940d83597be9652472e36314b80269ad9cb97aeb8f0af38d
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.8.5]
|
7
|
+
- #12 display failed phases at the end if failed
|
8
|
+
- also dont sleep 10 if command is coming from logs
|
9
|
+
|
6
10
|
## [0.8.4]
|
7
11
|
- improve final message, report build_status
|
8
12
|
|
data/lib/cody/tailer.rb
CHANGED
@@ -38,12 +38,21 @@ module Cody
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def final_message(build)
|
41
|
-
status = build.build_status
|
41
|
+
status = build.build_status.to_s # in case nil
|
42
42
|
status = status != "SUCCEEDED" ? status.color(:red) : status.color(:green)
|
43
43
|
puts "Final build status: #{status}"
|
44
|
+
display_failed_phases(build) if status != "SUCCEEDED"
|
44
45
|
puts "The build took #{build_time(build)} to complete."
|
45
46
|
end
|
46
47
|
|
48
|
+
def display_failed_phases(build)
|
49
|
+
puts "Failed Phases:"
|
50
|
+
build.phases.each do |phase|
|
51
|
+
next if phase.phase_status == "SUCCEEDED" or phase.phase_status.nil? or phase.phase_status == ""
|
52
|
+
puts "#{phase.phase_type}: #{phase.phase_status.color(:red)}"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
47
56
|
def find_build
|
48
57
|
resp = codebuild.batch_get_builds(ids: [@build_id])
|
49
58
|
resp.builds.first
|
@@ -81,11 +90,16 @@ module Cody
|
|
81
90
|
# However, this is sometimes not enough of a pause for CloudWatch to receive and send the logs back to us.
|
82
91
|
# So additionally pause on a failed build so we can receive the final logs at the end.
|
83
92
|
#
|
84
|
-
|
93
|
+
# provide extra time for cw tail to report error
|
94
|
+
sleep 10 if complete_failed?(build) and !logs_command?
|
85
95
|
AwsLogs::Tail.stop_follow!
|
86
96
|
@thread.join if @thread
|
87
97
|
end
|
88
98
|
|
99
|
+
def logs_command?
|
100
|
+
ARGV.join(" ").include?("logs")
|
101
|
+
end
|
102
|
+
|
89
103
|
# build.build_status : The current status of the build. Valid values include:
|
90
104
|
#
|
91
105
|
# FAILED : The build failed.
|
data/lib/cody/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cody
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|