class CiHelper::Functions::Jenkin
Public Instance Methods
run()
click to toggle source
# File lib/ci_helper/functions/jenkin.rb, line 4 def run user_cli.wellcome while true issue_monitor.matching_strategy = user_cli.get_user_issue_pattern next if issue_monitor.matching_strategy.empty? unless issue_monitor.goto_monitor_page next if user_cli.user_want_skip? end while !issue_monitor.finish_test? user_cli.wait_issue_finish end if issue_monitor.success? print_console_link start_pull_request_function update_issue_status if user_cli.update_issue? else print_fails print_console_link if user_cli.force_create_pull_request? start_pull_request_function update_issue_status if user_cli.update_issue? end end end end
Private Instance Methods
print_console_link()
click to toggle source
# File lib/ci_helper/functions/jenkin.rb, line 49 def print_console_link puts "Console link: #{result.console_link}" end
print_fails()
click to toggle source
# File lib/ci_helper/functions/jenkin.rb, line 36 def print_fails puts 'issue failed here is failures ' issue_monitor.failures_each do |fail| puts fail end end
result()
click to toggle source
# File lib/ci_helper/functions/jenkin.rb, line 62 def result @result ||= issue_monitor.content end
start_pull_request_function()
click to toggle source
# File lib/ci_helper/functions/jenkin.rb, line 43 def start_pull_request_function pull_request = CiHelper::Functions::PullRequest.new(config) pull_request.branch_name = result.branch_name pull_request.run end
update_issue_status()
click to toggle source
# File lib/ci_helper/functions/jenkin.rb, line 53 def update_issue_status redmine_updater = CiHelper::Functions::Redmine.new(config) redmine_updater.issue_numbers = bit_bucket_client.issue_numbers redmine_updater.status = CiHelper::RESOLVED redmine_updater.text_box = "pull request : #{CiHelper::BITBUCKET_DOMAIN}#{bit_bucket_client.pull_request_page.link_with(class: 'execute').href} \n" redmine_updater.text_box += "\n CiHelper :#{CiHelper::VERSION}" redmine_updater.run end