class Bard::CI
Public Class Methods
Source
# File lib/bard/ci.rb, line 5 def initialize project_name, branch, local: false @project_name = project_name @branch = branch @local = !!local end
Private Instance Methods
Source
# File lib/bard/ci.rb, line 36 def choose_runner_class if local? require_relative "./ci/local" Local elsif github_actions? require_relative "./ci/github_actions" GithubActions elsif jenkins? require_relative "./ci/jenkins" Jenkins end end
Source
# File lib/bard/ci.rb, line 20 def github_actions? File.exist?(".github/workflows/ci.yml") end
Source
# File lib/bard/ci.rb, line 28 def runner @runner ||= choose_runner_class.new(@project_name, @branch, sha) end