ci_toolkit 1.5.5 → 1.5.6
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/Gemfile.lock +1 -1
- data/lib/ci_toolkit/build_status.rb +2 -2
- data/lib/ci_toolkit/dvcs_pr.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f11234ad0258930d676483a6489573cc85177c5436257785d9a9632709cd5bd5
|
|
4
|
+
data.tar.gz: e5d6284dbd20c33a4a4c272910cf583399f94eb5744fa1dba3bd7e9c67f133c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd3e440efc0fc2f7e8bc376f745ca1f2f6fba257f71d2b34b22c0e9d8c6fb1acce268ab902216f32e57fb70fa4f2ccb030a278583bbb4366cc9f6080512acb2d
|
|
7
|
+
data.tar.gz: 47c8697ab06e4fd4ad6c86cf08fb47b4605b2d9153a01de0c03cc26ece60d155eeadd4b6ec4d751a3f5f2d82d44d36a6c2af13dfc22db67b63de3d8ca7f92645
|
data/Gemfile.lock
CHANGED
|
@@ -27,14 +27,14 @@ module CiToolkit
|
|
|
27
27
|
@github.create_status(state, @context, target_url, desc)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
def increment
|
|
30
|
+
def increment(status = CiToolkit::DvcsPrUtil.status_state_pending)
|
|
31
31
|
counter = load_counter
|
|
32
32
|
return if counter.nil?
|
|
33
33
|
|
|
34
34
|
num_finished = counter[:num_finished] + 1
|
|
35
35
|
num_total = counter[:num_total]
|
|
36
36
|
|
|
37
|
-
state =
|
|
37
|
+
state = status
|
|
38
38
|
state = "success" if num_finished == num_total
|
|
39
39
|
|
|
40
40
|
@github.create_status(state, @context, @env.app_url, "Finished building #{num_finished}/#{num_total}")
|
data/lib/ci_toolkit/dvcs_pr.rb
CHANGED
|
@@ -112,5 +112,11 @@ module CiToolkit
|
|
|
112
112
|
status = "failed" if service == "gitlab"
|
|
113
113
|
status
|
|
114
114
|
end
|
|
115
|
+
|
|
116
|
+
def self.status_state_pending(service = ENV["DVCS_SERVICE"])
|
|
117
|
+
status = "pending"
|
|
118
|
+
status = "running" if service == "gitlab"
|
|
119
|
+
status
|
|
120
|
+
end
|
|
115
121
|
end
|
|
116
122
|
end
|