summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/build/policy/specification.rb
blob: 9ca3582b9b0c96ae7047853f990c148c86e98bf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Gitlab
  module Ci
    module Build
      module Policy
        ##
        # Abstract class that defines an intereface of job policy
        # specification.
        #
        # Used for job's only/except policy configuration.
        #
        class Specification
          UnknownPolicyError = Class.new(StandardError)

          def initialize(spec)
            @spec = spec
          end

          def satisfied_by?(pipeline, **metadata)
            raise NotImplementedError
          end
        end
      end
    end
  end
end