Sha256: 64e4597319d325203a4cd4295d5f652803b103cb91699577320f1c9fcc4fb220

Contents?: true

Size: 899 Bytes

Versions: 13

Compression:

Stored size: 899 Bytes

Contents

Houston.config do
  on "deploy:completed" do |deploy|
    next if deploy.build_release.ignore?

    deployer = deploy.user
    if deployer
      message = "#{deployer.first_name}, your deploy of #{deploy.project.slug} " <<
                "to #{deploy.environment_name} just finished. " <<
                slack_link_to("Click here to write release notes",
                  Rails.application.routes.url_helpers.new_release_url(
                    deploy.project.to_param,
                    deploy.environment_name,
                    host: Houston.config.host,
                    deploy_id: deploy.id,
                    auth_token: deployer.authentication_token))
      slack_send_message_to message, deployer
    end

    Houston.try({max_tries: 3}, Net::OpenTimeout) do
      DeployNotification.new(deploy).deliver! # <-- after extracting releases, move this to Releases
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
houston-core-0.7.0.beta3 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.7.0.beta2 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.7.0.beta templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.6.3 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.6.2 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.6.1 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.6.0 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.5.6 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.5.5 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.5.4 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.5.3 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.5.2 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb
houston-core-0.5.1 templates/new-instance/config/triggers/deploy/notify_deployer_when_finished.rb