Sha256: 215e008b5d32f40aac28892a62aa3a3e62be1ada01bb87a2657655ff01548506

Contents?: true

Size: 797 Bytes

Versions: 2

Compression:

Stored size: 797 Bytes

Contents

namespace :shipit do
  desc "Deploy from a running instance. "
  task deploy: :environment do
    begin
      stack = ENV['stack']
      revision = ENV['revision']

      raise ArgumentError.new('The first argument has to be a stack, e.g. shopify/shipit/production') if stack.nil?
      raise ArgumentError.new('The second argument has to be a revision') if revision.nil?

      module Shipit
        class Task
          def write(text)
            p text
            chunks.create!(text: text)
          end
        end
      end

      Shipit::Stack.run_deploy_in_foreground(stack: stack, revision: revision)
    rescue ArgumentError
      p "Use this command as follows:"
      p "bundle exec rake shipit:deploy stack='shopify/shipit/production' revision='$SHA'"
      raise
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shipit-engine-0.28.1 lib/tasks/shipit.rake
shipit-engine-0.28.0 lib/tasks/shipit.rake