services/test_runner_service.rb
# Re-runs a build passed in, does not modify the build number
#
# @param  [Build] build
# @return [nil]
Re-runs a build passed in, does not modify the build number
Re - runs a build passed in does not modify the build number
def rerun(build = nil)
      start_time = Time.now
      self.current_build = build
      update_build_status!
      command = "rubocop #{project.repo_config.local_repo_path}"
      logger.info("Running #{command}")
      cmd = TTY::Command.new
      cmd.run(command)
      duration = Time.now - start_time
      current_build.duration = duration
      current_build.status = :success
      self.update_build_status!
    rescue StandardError => ex
      puts(ex)
      duration = Time.now - start_time
      current_build.duration = duration
      current_build.status = :failure 
      self.update_build_status!
    end
def rerun ( build = nil ) start_time = Time . now self . current_build = build update_build_status! command = "rubocop #{project.repo_config.local_repo_path}" logger . info ( "Running #{command}" ) cmd = TTY :: Command . new cmd . run ( command ) duration = Time . now - start_time current_build . duration = duration current_build . status = :success self . update_build_status! rescue StandardError => ex puts ( ex ) duration = Time . now - start_time current_build . duration = duration current_build . status = :failure self . update_build_status! end
Re-runs a build passed in, does not modify the build number
Re - runs a build passed in does not modify the build number
# TODO: Replace with fastlane runner here # TODO: better error handling, don't catch all Exception # TODO: also handle failure
None
nil
build
None