Sha256: 499ea0727d3efdd2b6579642ae70d7f9ba64c1c23d009c447bf44e9a8cac8520

Contents?: true

Size: 986 Bytes

Versions: 23

Compression:

Stored size: 986 Bytes

Contents

# frozen_string_literal: true

module KnapsackPro
  module Config
    module CI
      class Buildkite < Base
        def node_total
          ENV['BUILDKITE_PARALLEL_JOB_COUNT']
        end

        def node_index
          ENV['BUILDKITE_PARALLEL_JOB']
        end

        def node_build_id
          ENV['BUILDKITE_BUILD_NUMBER']
        end

        def node_retry_count
          ENV['BUILDKITE_RETRY_COUNT']
        end

        def commit_hash
          ENV['BUILDKITE_COMMIT']
        end

        def branch
          ENV['BUILDKITE_BRANCH']
        end

        def project_dir
          ENV['BUILDKITE_BUILD_CHECKOUT_PATH']
        end

        def user_seat
          ENV['BUILDKITE_BUILD_AUTHOR'] || ENV['BUILDKITE_BUILD_CREATOR']
        end

        def detected
          ENV.key?('BUILDKITE') ? self.class : nil
        end

        def fixed_queue_split
          true
        end

        def ci_provider
          "Buildkite"
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
knapsack_pro-7.13.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.12.1 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.12.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.11.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.10.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.9.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.8.2 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.8.1 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.8.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.7.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.6.2 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.6.1 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.6.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.1.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.0.1 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-7.0.0 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-6.0.4 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-6.0.3 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-6.0.2 lib/knapsack_pro/config/ci/buildkite.rb
knapsack_pro-6.0.1 lib/knapsack_pro/config/ci/buildkite.rb