class KnapsackPro::Config::CI::Semaphore2
Public Instance Methods
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 25 def branch ENV['SEMAPHORE_GIT_WORKING_BRANCH'] || # nil when workflow is triggered by pushing a Git tag ENV['SEMAPHORE_GIT_BRANCH'] end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 49 def ci_provider "Semaphore CI 2.0" end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 21 def commit_hash ENV['SEMAPHORE_GIT_SHA'] end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 40 def detected # check 2 keys to be sure we are using Semaphore 2.0 ENV.key?('SEMAPHORE') && ENV.key?('SEMAPHORE_WORKFLOW_ID') ? self.class : nil end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 45 def fixed_queue_split false end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 17 def node_build_id ENV['SEMAPHORE_WORKFLOW_ID'] end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 12 def node_index index = ENV['SEMAPHORE_JOB_INDEX'] index.to_i - 1 if index end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 8 def node_total ENV['SEMAPHORE_JOB_COUNT'] end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 30 def project_dir if ENV['HOME'] && ENV['SEMAPHORE_GIT_DIR'] "#{ENV['HOME']}/#{ENV['SEMAPHORE_GIT_DIR']}" end end
Source
# File lib/knapsack_pro/config/ci/semaphore2.rb, line 36 def user_seat ENV['SEMAPHORE_GIT_COMMITTER'] end