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