Module: Dockerspec::Helper::CI

Included in:
Builder
Defined in:
lib/dockerspec/helper/ci.rb

Overview

Some helper methods for detecting Continuous Integration environments.

Instance Method Summary collapse

Instance Method Details

#ci?Boolean

Returns whether we are running on a Continuous Integration machine.

Returns:

  • (Boolean)

    true if we are inside a CI.



34
35
36
# File 'lib/dockerspec/helper/ci.rb', line 34

def ci?
  ENV['CI'] == 'true'
end

#circle_ci?Boolean

Returns whether we are running on CircleCI.

Returns:

  • (Boolean)

    true if we are inside CircleCI.



56
57
58
# File 'lib/dockerspec/helper/ci.rb', line 56

def circle_ci?
  ENV['CIRCLECI'] == 'true'
end

#travis_ci?Boolean

Returns whether we are running on Travis CI.

Returns:

  • (Boolean)

    true if we are inside Travis CI.



45
46
47
# File 'lib/dockerspec/helper/ci.rb', line 45

def travis_ci?
  ENV['TRAVIS'] == 'true'
end