Welcome to mirror list, hosted at ThFree Co, Russian Federation.

deployable_policy.rb « ci « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f0105b001f216d9a2da92dfa3233bac51e86d6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Ci
  module DeployablePolicy
    extend ActiveSupport::Concern

    included do
      prepend_mod_with('Ci::DeployablePolicy') # rubocop: disable Cop/InjectEnterpriseEditionModule

      condition(:outdated_deployment) do
        @subject.outdated_deployment?
      end

      rule { outdated_deployment }.prevent :update_build
    end
  end
end