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
24
25
26
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 24
def branch
ENV['BRANCH_NAME']
end
|
#ci_provider ⇒ Object
40
41
42
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 40
def ci_provider
"Semaphore CI 1.0"
end
|
#commit_hash ⇒ Object
20
21
22
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 20
def commit_hash
ENV['REVISION']
end
|
#detected ⇒ Object
32
33
34
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 32
def detected
ENV.key?('SEMAPHORE_BUILD_NUMBER') ? self.class : nil
end
|
#fixed_queue_split ⇒ Object
36
37
38
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 36
def fixed_queue_split
false
end
|
#node_build_id ⇒ Object
16
17
18
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 16
def node_build_id
ENV['SEMAPHORE_BUILD_NUMBER']
end
|
#node_index ⇒ Object
11
12
13
14
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 11
def node_index
index = ENV['SEMAPHORE_CURRENT_THREAD']
index.to_i - 1 if index
end
|
#node_total ⇒ Object
7
8
9
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 7
def node_total
ENV['SEMAPHORE_THREAD_COUNT']
end
|
#project_dir ⇒ Object
28
29
30
|
# File 'lib/knapsack_pro/config/ci/semaphore.rb', line 28
def project_dir
ENV['SEMAPHORE_PROJECT_DIR']
end
|