Sha256: 08e1765554ad77eb5ef129fe86f755ddbe877780cd7f6294c61a71a84defef0a

Contents?: true

Size: 546 Bytes

Versions: 11

Compression:

Stored size: 546 Bytes

Contents

module Kontena
  module Callbacks
    class CreateInitialGridAfterDeploy < Kontena::Callback

      include Kontena::Cli::Common

      matches_commands 'master create'

      def after
        return unless command.exit_code == 0
        return unless config.current_master
        return unless config.current_master.name == command.result[:name]

        cmd = "grid create --silent test"
        ENV["DEBUG"] && $stderr.puts("Running: #{cmd}")
        Retriable.retriable do
          Kontena.run(cmd)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kontena-cli-1.2.2 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.2.rc2 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.2.rc1 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.1 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.1.rc1 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.0 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.0.rc3 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.0.rc2 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.0.rc1 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.0.pre3 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb
kontena-cli-1.2.0.pre2 lib/kontena/callbacks/master/deploy/55_create_initial_grid_after_deploy.rb