Class: Travis::Artifacts::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/travis/artifacts/test.rb

Instance Method Summary collapse

Instance Method Details

#build_idObject


15
16
17
# File 'lib/travis/artifacts/test.rb', line 15

def build_id
  ENV['TRAVIS_BUILD_ID']
end

#build_numberObject


11
12
13
# File 'lib/travis/artifacts/test.rb', line 11

def build_number
  ENV['TRAVIS_BUILD_NUMBER']
end

#failure?Boolean

Returns:

  • (Boolean)

7
8
9
# File 'lib/travis/artifacts/test.rb', line 7

def failure?
  !success?
end

#job_idObject


23
24
25
# File 'lib/travis/artifacts/test.rb', line 23

def job_id
  ENV['TRAVIS_JOB_ID']
end

#job_numberObject


19
20
21
# File 'lib/travis/artifacts/test.rb', line 19

def job_number
  ENV['TRAVIS_JOB_NUMBER']
end

#success?Boolean

Returns:

  • (Boolean)

3
4
5
# File 'lib/travis/artifacts/test.rb', line 3

def success?
  ENV['TRAVIS_TEST_RESULT'].to_i == 0
end