Sha256: 13fb2ce8e41e9b312b71b97fe2aeaa49716cb6adde73f997eec9f9cc5ef01bc6

Contents?: true

Size: 799 Bytes

Versions: 27

Compression:

Stored size: 799 Bytes

Contents

# https://docs.gitlab.com/ce/ci/variables/
module KnapsackPro
  module Config
    module CI
      class GitlabCI < Base
        def node_total
          # not provided by Gitlab CI
        end

        def node_index
          # not provided by Gitlab CI
        end

        def node_build_id
          ENV['CI_JOB_ID'] || # Gitlab Release 9.0+
          ENV['CI_BUILD_ID']  # Gitlab Release 8.x
        end

        def commit_hash
          ENV['CI_COMMIT_SHA'] || # Gitlab Release 9.0+
          ENV['CI_BUILD_REF'] # Gitlab Release 8.x
        end

        def branch
          ENV['CI_COMMIT_REF_NAME'] || # Gitlab Release 9.0+
          ENV['CI_BUILD_REF_NAME'] # Gitlab Release 8.x
        end

        def project_dir
          ENV['CI_PROJECT_DIR']
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
knapsack_pro-1.1.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-1.0.2 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-1.0.1 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-1.0.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.57.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.56.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.55.2 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.55.1 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.55.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.54.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.53.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.52.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.51.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.50.1 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.50.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.49.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.48.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.47.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.46.0 lib/knapsack_pro/config/ci/gitlab_ci.rb
knapsack_pro-0.45.0 lib/knapsack_pro/config/ci/gitlab_ci.rb