Sha256: b26c66d10bb4f584933a91b89be4f63d67096cc26e5ce4f9d1f16d4cea53f581

Contents?: true

Size: 966 Bytes

Versions: 15

Compression:

Stored size: 966 Bytes

Contents

# frozen_string_literal: true

module Buildkite
  module Pipelines
    module Steps
      class Group < Abstract
        attribute :label
        attribute :key
        attribute :skip
        attribute :if, as: :condition
        attribute :depends_on, append: true
        attribute :allow_dependency_failure

        attr_reader :steps

        def initialize(pipeline, **args)
          @pipeline = pipeline
          @context = StepContext.new(self, **args)
          @steps = Buildkite::Builder::StepCollection.new
        end

        def method_missing(method_name, ...)
          if @pipeline.dsl.respond_to?(method_name)
            @pipeline.dsl.public_send(method_name, ...)
          else
            super
          end
        end

        def respond_to_missing?(...)
          @pipeline.dsl.respond_to?(...) || super
        end

        def to_h
          super.merge(group: nil, steps: steps.to_definition)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
buildkite-builder-4.15.1 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.15.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.14.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.13.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.12.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.11.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.10.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.8.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.7.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.6.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.5.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.4.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.3.0 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.2.5 lib/buildkite/pipelines/steps/group.rb
buildkite-builder-4.2.4 lib/buildkite/pipelines/steps/group.rb