Sha256: cd2056f3d8e85e4cf25ab2e3a0345ff30b47ca8b34b412b7217766495fad45bf

Contents?: true

Size: 793 Bytes

Versions: 4

Compression:

Stored size: 793 Bytes

Contents

class Jets::CLI
  class Stop < Jets::CLI::Ci::Base
    def run
      are_you_sure?
      check_build_id!
      run_with_exception_handling do
        stopped = stop_build
        if stopped
          log.info <<~EOL
            Deploy has been stopped: #{build_id}
            If the deploy has already started the CloudFormation update it will continue.
            Please check the logs.

          EOL
          show_console_log_url(build_id)
        end
      end
    end

    def stack_name
      "#{Jets.project.namespace}-remote"
    end
    alias_method :project_name, :stack_name

    def are_you_sure?
      unless @options[:yes]
        sure? "Will attempt to stop the deploy for project #{project_name.color(:green)} build_id #{build_id.color(:green)}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jets-6.0.5 lib/jets/cli/stop.rb
jets-6.0.4 lib/jets/cli/stop.rb
jets-6.0.3 lib/jets/cli/stop.rb
jets-6.0.2 lib/jets/cli/stop.rb