class KnapsackPro::Config::CI::GitlabCI
Public Instance Methods
branch()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 29 def branch ENV['CI_COMMIT_REF_NAME'] || # Gitlab Release 9.0+ ENV['CI_BUILD_REF_NAME'] # Gitlab Release 8.x end
ci_provider()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 51 def ci_provider "Gitlab CI" end
commit_hash()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 24 def commit_hash ENV['CI_COMMIT_SHA'] || # Gitlab Release 9.0+ ENV['CI_BUILD_REF'] # Gitlab Release 8.x end
detected()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 43 def detected ENV.key?('GITLAB_CI') ? self.class : nil end
fixed_queue_split()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 47 def fixed_queue_split true end
node_build_id()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 19 def node_build_id ENV['CI_PIPELINE_ID'] || # Gitlab Release 9.0+ ENV['CI_BUILD_ID'] # Gitlab Release 8.x end
node_index()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 12 def node_index return unless ENV['GITLAB_CI'] # GitLab 11.5 index = ENV['CI_NODE_INDEX'] index.to_i - 1 if index end
node_total()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 8 def node_total ENV['CI_NODE_TOTAL'] end
project_dir()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 34 def project_dir ENV['CI_PROJECT_DIR'] end
user_seat()
click to toggle source
# File lib/knapsack_pro/config/ci/gitlab_ci.rb, line 38 def user_seat ENV['GITLAB_USER_NAME'] || # Gitlab Release 10.0 ENV['GITLAB_USER_EMAIL'] # Gitlab Release 8.12 end