Class: CircleCI::Parallel::Environment Private
- Inherits:
-
Object
- Object
- CircleCI::Parallel::Environment
- Defined in:
- lib/circleci/parallel/environment.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #clean ⇒ Object private
- #configuration ⇒ Object private
- #configure {|configuration| ... } ⇒ Object private
- #current_build ⇒ Object private
- #current_node ⇒ Object private
- #join ⇒ Object private
- #puts(*args) ⇒ Object private
Instance Method Details
#clean ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/circleci/parallel/environment.rb', line 37 def clean FileUtils.rmtree(WORK_DIR) if Dir.exist?(WORK_DIR) end |
#configuration ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/circleci/parallel/environment.rb', line 12 def configuration @configuration ||= Configuration.new end |
#configure {|configuration| ... } ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/circleci/parallel/environment.rb', line 16 def configure yield configuration end |
#current_build ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/circleci/parallel/environment.rb', line 20 def current_build @current_build ||= Build.new(ENV['CIRCLE_BUILD_NUM'].to_i, ENV['CIRCLE_NODE_TOTAL'].to_i) end |
#current_node ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/circleci/parallel/environment.rb', line 24 def current_node @current_node ||= Node.new(current_build, ENV['CIRCLE_NODE_INDEX'].to_i) end |
#join ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 31 |
# File 'lib/circleci/parallel/environment.rb', line 28 def join validate! task.run end |
#puts(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/circleci/parallel/environment.rb', line 33 def puts(*args) Kernel.puts(*args) unless configuration.silent end |