Sha256: 5add742a759a39888bdcc8eb56547908622ceebdf26989f1361affe6680db563

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

namespace :slack do
  namespace :deploy do

    desc 'Notify about starting deploy'
    task :starting do
      Slackistrano::Capistrano.new(self).run(:starting)
    end

    desc 'Notify about updating deploy'
    task :updating do
      Slackistrano::Capistrano.new(self).run(:updating)
    end

    desc 'Notify about reverting deploy'
    task :reverting do
      Slackistrano::Capistrano.new(self).run(:reverting)
    end

    desc 'Notify about updated deploy'
    task :updated do
      Slackistrano::Capistrano.new(self).run(:updated)
    end

    desc 'Notify about reverted deploy'
    task :reverted do
      Slackistrano::Capistrano.new(self).run(:reverted)
    end

    desc 'Notify about failed deploy'
    task :failed do
      Slackistrano::Capistrano.new(self).run(:failed)
    end

    desc 'Test Slack integration'
    task :test => %i[starting updating updated reverting reverted failed] do
      # all tasks run as dependencies
    end

  end
end

unless fetch(:use_custom_slackistrano_hooks, false)
  before 'deploy:starting',           'slack:deploy:starting'
  before 'deploy:updating',           'slack:deploy:updating'
  before 'deploy:reverting',          'slack:deploy:reverting'
  after  'deploy:finishing',          'slack:deploy:updated'
  after  'deploy:finishing_rollback', 'slack:deploy:reverted'
  after  'deploy:failed',             'slack:deploy:failed'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slackistrano-4.0.2 lib/slackistrano/tasks/slack.rake