Class: Knapsack::Config::Env
- Inherits:
-
Object
- Object
- Knapsack::Config::Env
- Defined in:
- lib/knapsack/config/env.rb
Class Method Summary collapse
- .ci_node_index ⇒ Object
- .ci_node_total ⇒ Object
- .log_level ⇒ Object
- .report_path ⇒ Object
- .test_dir ⇒ Object
- .test_file_pattern ⇒ Object
Class Method Details
.ci_node_index ⇒ Object
13 14 15 |
# File 'lib/knapsack/config/env.rb', line 13 def ci_node_index gitlab_ci_node_index || ENV['CI_NODE_INDEX'] || ENV['CIRCLE_NODE_INDEX'] || semaphore_job_index || semaphore_current_thread || ENV['BUILDKITE_PARALLEL_JOB'] || snap_ci_worker_index || ENV['BITBUCKET_PARALLEL_STEP'] || 0 end |
.ci_node_total ⇒ Object
9 10 11 |
# File 'lib/knapsack/config/env.rb', line 9 def ci_node_total ENV['CI_NODE_TOTAL'] || ENV['CIRCLE_NODE_TOTAL'] || ENV['SEMAPHORE_JOB_COUNT'] || ENV['SEMAPHORE_THREAD_COUNT'] || ENV['BUILDKITE_PARALLEL_JOB_COUNT'] || ENV['SNAP_WORKER_TOTAL'] || ENV['BITBUCKET_PARALLEL_STEP_COUNT'] || 1 end |
.log_level ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/knapsack/config/env.rb', line 25 def log_level { "debug" => Knapsack::Logger::DEBUG, "info" => Knapsack::Logger::INFO, "warn" => Knapsack::Logger::WARN, }[ENV['KNAPSACK_LOG_LEVEL']] || Knapsack::Logger::INFO end |
.report_path ⇒ Object
5 6 7 |
# File 'lib/knapsack/config/env.rb', line 5 def report_path ENV['KNAPSACK_REPORT_PATH'] end |
.test_dir ⇒ Object
21 22 23 |
# File 'lib/knapsack/config/env.rb', line 21 def test_dir ENV['KNAPSACK_TEST_DIR'] end |
.test_file_pattern ⇒ Object
17 18 19 |
# File 'lib/knapsack/config/env.rb', line 17 def test_file_pattern ENV['KNAPSACK_TEST_FILE_PATTERN'] end |