Class: KnapsackPro::Config::CI::Semaphore
- Inherits:
-
Base
- Object
- Base
- KnapsackPro::Config::CI::Semaphore
show all
- Defined in:
- lib/knapsack_pro/config/ci/semaphore.rb
Overview
Instance Method Summary
collapse
Methods inherited from Base
#node_retry_count, #user_seat
Instance Method Details
#branch ⇒ Object
26
27
28
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 26
def branch
ENV['BRANCH_NAME']
end
|
#ci_provider ⇒ Object
42
43
44
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 42
def ci_provider
"Semaphore CI 1.0"
end
|
#commit_hash ⇒ Object
22
23
24
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 22
def commit_hash
ENV['REVISION']
end
|
#detected ⇒ Object
34
35
36
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 34
def detected
ENV.key?('SEMAPHORE_BUILD_NUMBER') ? self.class : nil
end
|
#fixed_queue_split ⇒ Object
38
39
40
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 38
def fixed_queue_split
false
end
|
#node_build_id ⇒ Object
18
19
20
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 18
def node_build_id
ENV['SEMAPHORE_BUILD_NUMBER']
end
|
#node_index ⇒ Object
13
14
15
16
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 13
def node_index
index = ENV['SEMAPHORE_CURRENT_THREAD']
index.to_i - 1 if index
end
|
#node_total ⇒ Object
9
10
11
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 9
def node_total
ENV['SEMAPHORE_THREAD_COUNT']
end
|
#project_dir ⇒ Object
30
31
32
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 30
def project_dir
ENV['SEMAPHORE_PROJECT_DIR']
end
|