Skip to content
Snippets Groups Projects

Support for release key in gitlab-ci.yaml

Merged Sean Carroll requested to merge 26013-release-generation-from-within-gitlab-ci-yml-2 into master
All threads resolved!
17 files
+ 674
18
Compare changes
  • Side-by-side
  • Inline
Files
17
+ 35
0
# frozen_string_literal: true
module Gitlab
module Ci
class Config
module Entry
##
# Entry that represents a configuration of release assets.
#
class Assets < ::Gitlab::Config::Entry::Node
include ::Gitlab::Config::Entry::Configurable
include ::Gitlab::Config::Entry::Validatable
include ::Gitlab::Config::Entry::Attributable
ALLOWED_KEYS = %i[links].freeze
attributes ALLOWED_KEYS
entry :links, Entry::Links, description: 'Release assets:links.'
validations do
validates :config, allowed_keys: ALLOWED_KEYS
validates :links, array_of_hashes: true, presence: true
end
helpers :links
def value
@config[:links] = links_value if @config.key?(:links)
@config
end
end
end
end
end
end
Loading