Sha256: 28664b2598b1d78938cf77a5d022ec2a224e2871dd2563f2ff5d1fefe6949b2c

Contents?: true

Size: 510 Bytes

Versions: 22

Compression:

Stored size: 510 Bytes

Contents

module Api
  class DeploysController < BaseController
    require_permission :deploy, :stack

    params do
      requires :sha, String, length: {in: 6..40}
      accepts :force, Boolean, default: false
    end
    def create
      commit = stack.commits.by_sha(params.sha) || param_error!(:sha, 'Unknown revision')
      param_error!(:force, "Can't deploy a locked stack") if !params.force && stack.locked?
      render_resource stack.trigger_deploy(commit, current_user), status: :accepted
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
shipit-engine-0.5.2 app/controllers/api/deploys_controller.rb
shipit-engine-0.5.1 app/controllers/api/deploys_controller.rb
shipit-engine-0.5.0 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.10 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.9 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.8 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.7 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.6 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.5 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.4 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.3 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.2 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.1 app/controllers/api/deploys_controller.rb
shipit-engine-0.4.0 app/controllers/api/deploys_controller.rb
shipit-engine-0.3.1 app/controllers/api/deploys_controller.rb
shipit-engine-0.3.0 app/controllers/api/deploys_controller.rb
shipit-engine-0.2.3 app/controllers/api/deploys_controller.rb
shipit-engine-0.2.2 app/controllers/api/deploys_controller.rb
shipit-engine-0.2.1 app/controllers/api/deploys_controller.rb
shipit-engine-0.2.0 app/controllers/api/deploys_controller.rb