Sha256: 458975c22278b52917b50a3599520179f3159b2c3e34d69014b96373381920fa

Contents?: true

Size: 1.54 KB

Versions: 5

Compression:

Stored size: 1.54 KB

Contents

require 'rake_factory'
require 'docker'

require_relative '../tasks'

module RakeDocker
  module TaskSets
    class Image < RakeFactory::TaskSet
      prepend RakeFactory::Namespaceable

      parameter :image_name, required: true
      parameter :repository_name, required: true
      parameter :repository_url, required: true

      parameter :work_directory, required: true

      parameter :copy_spec, default: []
      parameter :create_spec, default: []

      parameter :argument_names, default: []

      parameter :tags, required: true

      parameter :credentials

      parameter :build_args
      parameter :platform

      parameter :clean_task_name, default: :clean
      parameter :prepare_task_name, default: :prepare
      parameter :build_task_name, default: :build
      parameter :tag_task_name, default: :tag
      parameter :push_task_name, default: :push
      parameter :publish_task_name, default: :publish

      task Tasks::Clean, name: RakeFactory::DynamicValue.new { |ts|
        ts.clean_task_name
      }
      task Tasks::Prepare, name: RakeFactory::DynamicValue.new { |ts|
        ts.prepare_task_name
      }
      task Tasks::Build, name: RakeFactory::DynamicValue.new { |ts|
        ts.build_task_name
      }
      task Tasks::Tag, name: RakeFactory::DynamicValue.new { |ts|
        ts.tag_task_name
      }
      task Tasks::Push, name: RakeFactory::DynamicValue.new { |ts|
        ts.push_task_name
      }
      task Tasks::Publish, name: RakeFactory::DynamicValue.new { |ts|
        ts.publish_task_name
      }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rake_docker-2.18.0.pre.3 lib/rake_docker/task_sets/image.rb
rake_docker-2.18.0.pre.2 lib/rake_docker/task_sets/image.rb
rake_docker-2.18.0.pre.1 lib/rake_docker/task_sets/image.rb
rake_docker-2.17.0 lib/rake_docker/task_sets/image.rb
rake_docker-2.16.0.pre.1 lib/rake_docker/task_sets/image.rb