stax 0.0.28 → 0.0.29
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/stax/aws/codebuild.rb +9 -0
- data/lib/stax/mixin/codebuild.rb +23 -0
- data/lib/stax/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: 07edb5cdb3c89d91a2b2e68b9b9aa9b32c5ed3fd1e74eb9ced31f1c29639aa14
|
4
|
+
data.tar.gz: facb000864a939af4173f283f46ddca7fe80f4f92ef912ece959fa21fab0e073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f3b97140501ff71b6a5e28eb04b695a1da19c3f7f1715949a51a7260bc4acaca6d13c1f1b3274c8c482c8ea15537d230fc0628dee940c5738361a096427030c
|
7
|
+
data.tar.gz: 3730fda19ea914da822bdec993d1a0a5c90c133931badd6fd6a0d9678b3d26ecb00c1f38775b1d6368fd46fdc0f87891974196cada4c8d40288aa6d9e0df1918
|
data/lib/stax/aws/codebuild.rb
CHANGED
@@ -30,6 +30,15 @@ module Stax
|
|
30
30
|
client.batch_get_builds(ids: ids).builds
|
31
31
|
end
|
32
32
|
|
33
|
+
def reports(arns)
|
34
|
+
client.batch_get_reports(report_arns: arns).reports
|
35
|
+
end
|
36
|
+
|
37
|
+
## TODO: this fails attempt to page as enumerable, check back with sdk v3
|
38
|
+
def tests(arn)
|
39
|
+
client.describe_test_cases(report_arn: arn).test_cases
|
40
|
+
end
|
41
|
+
|
33
42
|
def start(opt)
|
34
43
|
client.start_build(opt).build
|
35
44
|
end
|
data/lib/stax/mixin/codebuild.rb
CHANGED
@@ -63,6 +63,29 @@ module Stax
|
|
63
63
|
Aws::Codebuild.builds([id]).first.phases.each(&method(:print_phase))
|
64
64
|
end
|
65
65
|
|
66
|
+
desc 'reports [ID]', 'show reports for given or most recent build'
|
67
|
+
def reports(id = nil)
|
68
|
+
id ||= Aws::Codebuild.builds_for_project(my.stack_project_names.first, 1).first
|
69
|
+
debug("Reports for build #{id}")
|
70
|
+
report_arns = Aws::Codebuild.builds([id]).first.report_arns
|
71
|
+
print_table Aws::Codebuild.reports(report_arns).map { |r|
|
72
|
+
duration = (r.test_summary.duration_in_nano_seconds/1_000_000_000.0).to_s + 's'
|
73
|
+
[ r.name, color(r.status, COLORS), duration, r.created ]
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
desc 'tests [ID]', 'show test results for given or most recent build'
|
78
|
+
def tests(id = nil)
|
79
|
+
id ||= Aws::Codebuild.builds_for_project(my.stack_project_names.first, 1).first
|
80
|
+
Aws::Codebuild.builds([id]).first.report_arns.each do |report_arn|
|
81
|
+
debug("Tests for report #{report_arn}")
|
82
|
+
print_table Aws::Codebuild.tests(report_arn).map { |t|
|
83
|
+
duration = (t.duration_in_nano_seconds/1_000_000).to_s + 'ms'
|
84
|
+
[ t.name, color(t.status, COLORS), t.prefix, t.message, duration ]
|
85
|
+
}
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
66
89
|
desc 'tail [ID]', 'tail build phases for build'
|
67
90
|
def tail(id = nil)
|
68
91
|
trap('SIGINT', 'EXIT') # clean exit with ctrl-c
|
data/lib/stax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|