Sha256: f0ab53a0295a13a78e812cee313be3e43379363d6bcab9a2d82c32c19439f300

Contents?: true

Size: 735 Bytes

Versions: 6

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

module Command
  class BuildImage < Base
    NAME = "build-image"
    OPTIONS = [
      app_option(required: true),
      commit_option
    ].freeze
    DESCRIPTION = "Builds and pushes the image to Control Plane"
    LONG_DESCRIPTION = <<~HEREDOC
      - Builds and pushes the image to Control Plane
      - Automatically assigns image numbers, e.g., `app:1`, `app:2`, etc.
      - Uses `.controlplane/Dockerfile`
    HEREDOC

    def call
      dockerfile = config.current[:dockerfile] || "Dockerfile"
      dockerfile = "#{config.app_cpln_dir}/#{dockerfile}"
      progress.puts "- Building dockerfile: #{dockerfile}"

      cp.image_build(latest_image_next, dockerfile: dockerfile)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cpl-0.3.3 lib/command/build_image.rb
cpl-0.3.2 lib/command/build_image.rb
cpl-0.3.1 lib/command/build_image.rb
cpl-0.3.0 lib/command/build_image.rb
cpl-0.2.0 lib/command/build_image.rb
cpl-0.1.0 lib/command/build_image.rb