Fix environments handling
This commit is contained in:
parent
99f1385ee0
commit
223041fa1b
|
@ -547,7 +547,7 @@ GitLab.
|
|||
If `environment` is specified and no environment under that name exists, a new
|
||||
one will be created automatically.
|
||||
|
||||
The `environment` name must be a valid [Git reference name][gitref]. Common
|
||||
The `environment` name must contain only letters, digits, '-', '_', '/', '$', '{', '}' and spaces. Common
|
||||
names are `qa`, `staging`, and `production`, but you can use whatever name works
|
||||
with your workflow.
|
||||
|
||||
|
@ -1083,5 +1083,4 @@ CI with various languages.
|
|||
|
||||
[examples]: ../examples/README.md
|
||||
[ce-6323]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6323
|
||||
[gitref]: https://git-scm.com/docs/git-check-ref-format
|
||||
[environment]: ../environments.md
|
||||
|
|
|
@ -96,11 +96,11 @@ module Gitlab
|
|||
end
|
||||
|
||||
def environment_name_regex
|
||||
git_reference_regex
|
||||
@environment_name_regex ||= /\A[a-zA-Z0-9_\\\/\${} -]+\z/.freeze
|
||||
end
|
||||
|
||||
def environment_name_regex_message
|
||||
"be a valid git reference name"
|
||||
"can contain only letters, digits, '-', '_', '/', '$', '{', '}' and spaces"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue