Module: Integrations::Base::Ci
- Extended by:
- ActiveSupport::Concern
- Included in:
- Integrations::Bamboo, Integrations::Buildkite, DroneCi, Jenkins, MockCi, Teamcity
- Defined in:
- app/models/concerns/integrations/base/ci.rb
Instance Method Summary collapse
-
#build_page(sha, ref) ⇒ Object
Return complete url to build page.
-
#commit_status(sha, ref) ⇒ Object
Return string with build status or :error symbol.
- #valid_token?(token) ⇒ Boolean
Instance Method Details
#build_page(sha, ref) ⇒ Object
Return complete url to build page
Ex.
http://jenkins.example.com:8888/job/test1/scm/bySHA1/12d65c
32 33 34 |
# File 'app/models/concerns/integrations/base/ci.rb', line 32 def build_page(sha, ref) # override this method in the including class end |
#commit_status(sha, ref) ⇒ Object
Return string with build status or :error symbol
Allowed states: ‘success’, ‘failed’, ‘running’, ‘pending’, ‘skipped’
Ex.
@integration.commit_status('13be4ac', 'master')
# => 'success'
@integration.commit_status('2abe4ac', 'dev')
# => 'running'
49 50 51 |
# File 'app/models/concerns/integrations/base/ci.rb', line 49 def commit_status(sha, ref) # override this method in the including class end |
#valid_token?(token) ⇒ Boolean
21 22 23 24 25 |
# File 'app/models/concerns/integrations/base/ci.rb', line 21 def valid_token?(token) respond_to?(:token) && self.token.present? && ActiveSupport::SecurityUtils.secure_compare(token, self.token) end |