diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /lib/gitlab/regex.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index db531f06f11..c8b04ce2a5c 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -79,6 +79,12 @@ module Gitlab "Must start with a letter, and cannot end with '-'" end + # Pod name adheres to DNS Subdomain Names(RFC 1123) naming convention + # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names + def kubernetes_dns_subdomain_regex + /\A[a-z0-9]([a-z0-9\-\.]*[a-z0-9])?\z/ + end + def environment_slug_regex @environment_slug_regex ||= /\A[a-z]([a-z0-9-]*[a-z0-9])?\z/.freeze end @@ -121,7 +127,7 @@ module Gitlab # Based on Jira's project key format # https://confluence.atlassian.com/adminjiraserver073/changing-the-project-key-format-861253229.html def jira_issue_key_regex - @jira_issue_key_regex ||= /[A-Z][A-Z_0-9]+-\d+\b/ + @jira_issue_key_regex ||= /[A-Z][A-Z_0-9]+-\d+/ end def jira_transition_id_regex |