ci_toolkit 1.5.5 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ci_toolkit/build_status.rb +3 -3
- data/lib/ci_toolkit/dvcs_pr.rb +7 -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: 92e491b1785494a9a4c0162220afeed1dc3f78a17f08dc2e2de1d8849d2d3dbb
|
4
|
+
data.tar.gz: 84d40b3e76b76a7b4dcb8f709f46573e051f2da96ab3d567307ecf6ba4f3e3f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99681273ad9ce6752108675e7923baa1c3acc0d74060885885d061d9a67837cce5d982ecff12b26e449efa1232858c2f82507314852d7872d16e2ee21365b458
|
7
|
+
data.tar.gz: b1e3a38adb5bdea8235e3665e7d3b0013ef3365a1bb46fda8c1895ee7d36f4f681d8ca0b65fd29a1ef15bf3f0f11b6e36fb9067b781ee19ab055b932efdfa6d0
|
data/Gemfile.lock
CHANGED
@@ -27,20 +27,20 @@ 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}")
|
41
41
|
end
|
42
42
|
|
43
|
-
def error(state = CiToolkit::DvcsPrUtil.
|
43
|
+
def error(state = CiToolkit::DvcsPrUtil.status_state_error)
|
44
44
|
@github.create_status(state, @context, @env.app_url, "Building failed")
|
45
45
|
end
|
46
46
|
|
data/lib/ci_toolkit/dvcs_pr.rb
CHANGED
@@ -107,10 +107,16 @@ module CiToolkit
|
|
107
107
|
# values for the two services are different
|
108
108
|
# It uses the ENV["DVCS_SERVICE"] to decide which DVCS to use.
|
109
109
|
class DvcsPrUtil
|
110
|
-
def self.
|
110
|
+
def self.status_state_error(service = ENV["DVCS_SERVICE"])
|
111
111
|
status = "error"
|
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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gero Keller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|