Class: KnapsackPro::Config::CI::Semaphore
- Defined in:
- lib/knapsack_pro/config/ci/semaphore.rb
Instance Method Summary collapse
- #branch ⇒ Object
- #commit_hash ⇒ Object
- #node_build_id ⇒ Object
- #node_index ⇒ Object
- #node_total ⇒ Object
- #project_dir ⇒ Object
Instance Method Details
#branch ⇒ Object
22 23 24 |
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 22 def branch ENV['BRANCH_NAME'] end |
#commit_hash ⇒ Object
18 19 20 |
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 18 def commit_hash ENV['REVISION'] end |
#node_build_id ⇒ Object
14 15 16 |
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 14 def node_build_id ENV['SEMAPHORE_BUILD_NUMBER'] end |
#node_index ⇒ Object
9 10 11 12 |
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 9 def node_index index = ENV['SEMAPHORE_CURRENT_THREAD'] index.to_i - 1 if index end |
#node_total ⇒ Object
5 6 7 |
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 5 def node_total ENV['SEMAPHORE_THREAD_COUNT'] end |
#project_dir ⇒ Object
26 27 28 |
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 26 def project_dir ENV['SEMAPHORE_PROJECT_DIR'] end |