CiHelper 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ci_helper/ci_procedure.rb +4 -4
- data/lib/ci_helper/issue_monitor.rb +5 -2
- data/lib/ci_helper/main_process.rb +3 -3
- data/lib/ci_helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dbf0ce4cef1b71178f07093db7577826ccf2124
|
4
|
+
data.tar.gz: 2c05652c6fb93e36579f000be90f2a47180158ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcdd3c6d60d6c1fa40594de53a2578dc2734c9212a9bcfa940cf774634527de6e5a2c06285fff3ecdcb171544210f1f167c55ae5cec8dfbf174d879d30fc03e2
|
7
|
+
data.tar.gz: 327d20140817d150234d153831f23b1e55fd62757428e7a0a36be594c930ec6f1f1968a34efbbc843fe84152bf7a2558a5bfd7ffa2a5ff511c06bca19d04669d
|
@@ -5,9 +5,9 @@ class CiProcedure
|
|
5
5
|
|
6
6
|
CI_LOGIN_URL = 'http://ci.raamsys.co.uk/login?from=%2F'
|
7
7
|
CI_DOMAIN = 'http://ci.raamsys.co.uk/'
|
8
|
-
attr_accessor :result, :issue_page
|
8
|
+
attr_accessor :result, :issue_page, :console_page
|
9
9
|
attr_reader :account, :password, :mechanize,
|
10
|
-
:
|
10
|
+
:raam_page, :main_page,
|
11
11
|
:matching_strategy
|
12
12
|
|
13
13
|
|
@@ -28,8 +28,8 @@ class CiProcedure
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def re_get_console_output
|
31
|
-
|
32
|
-
|
31
|
+
self.issue_page = go_to_issue
|
32
|
+
self.console_page = go_to_console_output
|
33
33
|
get_console_output
|
34
34
|
end
|
35
35
|
|
@@ -25,6 +25,7 @@ class IssueMonitor
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def success?
|
28
|
+
parse_output(ci_procedure.get_console_output)
|
28
29
|
finish_test? ? status[0].match('success') : false
|
29
30
|
end
|
30
31
|
|
@@ -44,8 +45,10 @@ class IssueMonitor
|
|
44
45
|
|
45
46
|
def content
|
46
47
|
Result.new(success?, fail_examples,
|
47
|
-
"#{ci_procedure.console_page.uri.host}/#{ci_procedure.console_page.uri.request_uri}",
|
48
|
-
ci_procedure.
|
48
|
+
"#{ci_procedure.console_page.uri.host}/#{ci_procedure.console_page.uri.request_uri}",
|
49
|
+
ci_procedure.issue_number,
|
50
|
+
ci_procedure.branch_name,
|
51
|
+
ci_procedure.commit_hash)
|
49
52
|
end
|
50
53
|
|
51
54
|
private
|
@@ -3,7 +3,7 @@ require 'byebug'
|
|
3
3
|
# TODO: need to refactor this class
|
4
4
|
class MainProcess
|
5
5
|
|
6
|
-
USER_CONFIG = Struct.new(:ci_ac
|
6
|
+
USER_CONFIG = Struct.new(:ci_ac, :ci_pass, :bit_ac, :bit_pass)
|
7
7
|
|
8
8
|
attr_accessor :config
|
9
9
|
|
@@ -19,7 +19,7 @@ class MainProcess
|
|
19
19
|
@issue_is_queued_in_ci = false
|
20
20
|
puts 'Please Input your next ticked number or commit hash to specifiy the multi test result in the CI'
|
21
21
|
match_strategy = gets.chop
|
22
|
-
issue_monitor
|
22
|
+
issue_monitor = IssueMonitor.new(config.ci_ac, config.ci_pass, match_strategy)
|
23
23
|
|
24
24
|
unless issue_monitor.goto_monitor_page # no issue pull request found
|
25
25
|
# ask user to wait this issue or not
|
@@ -37,7 +37,7 @@ class MainProcess
|
|
37
37
|
if issue_monitor.success?
|
38
38
|
result = issue_monitor.content
|
39
39
|
puts " Console link: #{result.console_link}"
|
40
|
-
bit_bucket_client = BitBucketProcedure.new(config.bit_ac,config.bit_pass)
|
40
|
+
bit_bucket_client = BitBucketProcedure.new(config.bit_ac, config.bit_pass)
|
41
41
|
bit_bucket_client.create_pull_request(issue_monitor.content)
|
42
42
|
else
|
43
43
|
|
data/lib/ci_helper/version.rb
CHANGED