Sha256: 02b958b5b4fce6dbf55be73e0c5274d3501416355f210ced0f4c144a8a47de18

Contents?: true

Size: 618 Bytes

Versions: 1

Compression:

Stored size: 618 Bytes

Contents

module PredragsDummyPipelines

  class Pipeline
    def initialize(actions)
      @build   = Exec.new(actions["build"], "build")
      deploys  = actions.select {|a,b| a != "build"}
      @deploys = deploys.map {|key, value| Exec.new(value, key)}
    end

    def run
      @build.run
      @deploys.map {|deploy|  deploy.run  }
    end

    def show
      puts @build.show
      @deploys.map {|deploy| puts deploy.show }
    end

    def build_results
      @build.results
    end

    def deploy_results
      @deploys.map {|deploy| deploy.results}
    end

    def success?
      @build.success?
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
predrags_dummy_pipelines-0.7.5 lib/predrags_dummy_pipelines/pipeline.rb