Sha256: 4b0a0551ec98f563da333e5e0d0dbcb8b91fd1365e2a80446d24ee3d8713f1fa
Contents?: true
Size: 658 Bytes
Versions: 12
Compression:
Stored size: 658 Bytes
Contents
module Shipit module Api class DeploysController < BaseController require_permission :deploy, :stack params do requires :sha, String, length: {in: 6..40} accepts :force, Boolean, default: false accepts :env, Hash, default: {} 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? deploy = stack.trigger_deploy(commit, current_user, env: params.env, force: params.force) render_resource deploy, status: :accepted end end end end
Version data entries
12 entries across 12 versions & 1 rubygems