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!
Compare and Show latest version
2 files
+ 11
134
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -63,14 +63,6 @@ class Job < ::Gitlab::Config::Entry::Node
errors.add(:dependencies, "the #{missing_needs.join(", ")} should be part of needs")
end
end
validate do
next unless has_commit_tag?
unless only_tags_present?
errors.add(:config, '`only: tags` must be specified with $CI_COMMIT_TAG')
end
end
end
entry :before_script, Entry::Script,
@@ -224,16 +216,6 @@ def has_rules?
@config.try(:key?, :rules)
end
def has_commit_tag?
return false unless @config.try(:key?, :release)
@config.dig(:release, :tag_name)&.include?('$CI_COMMIT_TAG')
end
def only_tags_present?
@config.try(:key?, :only) && @config[:only].map(&:to_sym).include?(:tags)
end
def ignored?
allow_failure.nil? ? manual_action? : allow_failure
end
Loading