Class: Environments::Codeship
- Inherits:
-
Object
- Object
- Environments::Codeship
- Defined in:
- lib/flakyci_rspec/environments/codeship.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.is_codeship? ⇒ Boolean
30 31 32 |
# File 'lib/flakyci_rspec/environments/codeship.rb', line 30 def self.is_codeship?() ENV["CI_NAME"] == "codeship" end |
Instance Method Details
#build_id ⇒ Object
22 23 24 |
# File 'lib/flakyci_rspec/environments/codeship.rb', line 22 def build_id() ENV["CI_BUILD_NUMBER"] end |
#build_name ⇒ Object
26 27 28 |
# File 'lib/flakyci_rspec/environments/codeship.rb', line 26 def build_name() ENV["CI_NAME"] end |
#get_infos ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/flakyci_rspec/environments/codeship.rb', line 4 def get_infos() { sha: sha(), build_id: build_id(), ref: get_ref(), build_name: build_name(), env_name: "codeship" } end |
#get_ref ⇒ Object
18 19 20 |
# File 'lib/flakyci_rspec/environments/codeship.rb', line 18 def get_ref() ENV["CI_BRANCH"] end |
#sha ⇒ Object
14 15 16 |
# File 'lib/flakyci_rspec/environments/codeship.rb', line 14 def sha() ENV["CI_COMMIT_ID"] end |