gct 0.3.92 → 0.3.93
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gct/command/robot/finish.rb +13 -1
- data/lib/gct/command/robot/start.rb +12 -1
- data/lib/gct/gct_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: a90278a27edf99a940f703b359f26160c3534f51bb8e3ad7dc2b9af240209fe1
|
4
|
+
data.tar.gz: 9a62537fadb1678a6d8c1969e1b487c844117b1e58c9089038ccc9bbcaba8328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acfa21c1c8cc42efc63f2d06fd49799146e8a17f6fcbcefc7480a9d2579db448280cdd78ea035bcb9906ab0facaa00926452fe429f7733c35c54b035ca6c411d
|
7
|
+
data.tar.gz: feafb9b42ecdbc68b5dd91ef4415ebb6d0b0f871a0e70f11fe49537ecfa1319ad282bf1dca09c5c42974ff203c6123dbb3a0bf78b3c749657f0be9fcfff9801c
|
@@ -15,6 +15,12 @@ module Gct
|
|
15
15
|
CLAide::Argument.new('BUILD_STATUS', true),
|
16
16
|
]
|
17
17
|
|
18
|
+
def self.options
|
19
|
+
[
|
20
|
+
['--test', '测试机器人,测试webhook'],
|
21
|
+
].concat(super)
|
22
|
+
end
|
23
|
+
|
18
24
|
def initialize(argv)
|
19
25
|
@project_name = ENV['CI_PROJECT_NAME']
|
20
26
|
@user_name = ENV['GITLAB_USER_NAME']
|
@@ -22,6 +28,7 @@ module Gct
|
|
22
28
|
@build_status = argv.shift_argument
|
23
29
|
@commit_sha = ENV['CI_COMMIT_SHA']
|
24
30
|
@ci_url = ENV['CI_PIPELINE_URL']
|
31
|
+
@test = argv.flag?('test', false)
|
25
32
|
super
|
26
33
|
end
|
27
34
|
|
@@ -29,7 +36,12 @@ module Gct
|
|
29
36
|
build_text = @build_status ? "<font color=\"info\">CI运行成功</font>" : "<font color=\"comment\">CI运行失败</font>,请相关人员注意"
|
30
37
|
ci_text = "[点击跳转](#{@ci_url})"
|
31
38
|
|
32
|
-
|
39
|
+
if @test
|
40
|
+
webhook = FileBase.get_config("gitlab-robot-webhook-test")
|
41
|
+
elsif
|
42
|
+
webhook = FileBase.get_config("gitlab-robot-webhook")
|
43
|
+
end
|
44
|
+
raise "请先设置webhook --> gct config set gitlab-robot-webhook WEBHOOK_URL" if webhook.nil? || webhook.empty?
|
33
45
|
url = URI(webhook)
|
34
46
|
|
35
47
|
http = Net::HTTP.new(url.host, url.port)
|
@@ -14,14 +14,25 @@ module Gct
|
|
14
14
|
self.arguments = [
|
15
15
|
]
|
16
16
|
|
17
|
+
def self.options
|
18
|
+
[
|
19
|
+
['--test', '测试机器人,测试webhook'],
|
20
|
+
].concat(super)
|
21
|
+
end
|
22
|
+
|
17
23
|
def initialize(argv)
|
18
24
|
@project_name = ENV['CI_PROJECT_NAME']
|
19
25
|
@tag = ENV['CI_COMMIT_REF_NAME']
|
26
|
+
@test = argv.flag?('test', false)
|
20
27
|
super
|
21
28
|
end
|
22
29
|
|
23
30
|
def run
|
24
|
-
|
31
|
+
if @test
|
32
|
+
webhook = FileBase.get_config("gitlab-robot-webhook-test")
|
33
|
+
elsif
|
34
|
+
webhook = FileBase.get_config("gitlab-robot-webhook")
|
35
|
+
end
|
25
36
|
raise "请先设置webhook --> gct config set gitlab-robot-webhook WEBHOOK_URL" if webhook.nil? || webhook.empty?
|
26
37
|
url = URI(webhook)
|
27
38
|
|
data/lib/gct/gct_version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.93
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jieming
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.0.
|
207
|
+
rubygems_version: 3.0.8
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: '"gct ios 自动化脚本工具"'
|