Sha256: cdd2acb2c5787dd395bb52ca10001b25c8c03e1725176b8476d9e41346060f31

Contents?: true

Size: 777 Bytes

Versions: 3

Compression:

Stored size: 777 Bytes

Contents

namespace :shipit do
  desc "Deploy from a running instance. "
  task deploy: :environment do
      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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 lib/tasks/shipit.rake
shipit-engine-0.30.0 lib/tasks/shipit.rake
shipit-engine-0.29.0 lib/tasks/shipit.rake