Commit 223041fa authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix environments handling

parent 99f1385e
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment