Class: KnapsackPro::Config::CI::Circle
- Defined in:
- lib/knapsack_pro/config/ci/circle.rb
Instance Method Summary collapse
- #branch ⇒ Object
- #ci_provider ⇒ Object
- #commit_hash ⇒ Object
- #detected ⇒ Object
- #fixed_queue_split ⇒ Object
- #node_build_id ⇒ Object
- #node_index ⇒ Object
- #node_total ⇒ Object
- #project_dir ⇒ Object
- #test_queue_id ⇒ Object
- #user_seat ⇒ Object
Methods inherited from Base
Instance Method Details
#branch ⇒ Object
23 24 25 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 23 def branch ENV['CIRCLE_BRANCH'] end |
#ci_provider ⇒ Object
43 44 45 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 43 def ci_provider "CircleCI" end |
#commit_hash ⇒ Object
19 20 21 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 19 def commit_hash ENV['CIRCLE_SHA1'] end |
#detected ⇒ Object
35 36 37 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 35 def detected ENV.key?('CIRCLECI') ? self.class : nil end |
#fixed_queue_split ⇒ Object
39 40 41 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 39 def fixed_queue_split false end |
#node_build_id ⇒ Object
15 16 17 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 15 def node_build_id ENV['CIRCLE_BUILD_NUM'] end |
#node_index ⇒ Object
11 12 13 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 11 def node_index ENV['CIRCLE_NODE_INDEX'] end |
#node_total ⇒ Object
7 8 9 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 7 def node_total ENV['CIRCLE_NODE_TOTAL'] end |
#project_dir ⇒ Object
27 28 29 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 27 def project_dir ENV['CIRCLE_WORKING_DIRECTORY'] end |
#test_queue_id ⇒ Object
47 48 49 50 51 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 47 def test_queue_id # CIRCLE_PIPELINE_NUMBER does not exist in Circle, set it with: # `CIRCLE_PIPELINE_NUMBER: << pipeline.number >>` ENV['CIRCLE_PIPELINE_NUMBER'] end |
#user_seat ⇒ Object
31 32 33 |
# File 'lib/knapsack_pro/config/ci/circle.rb', line 31 def user_seat ENV['CIRCLE_USERNAME'] || ENV['CIRCLE_PR_USERNAME'] end |