Environment seeding validation fails
Summary
Following https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18263 opened by @zj
On a fresh local install of gitlab-ce, environment seeding may fail because a branch name isn't valid:
== Seed from /Users/xxx/projects/gitlab-development-kit/gitlab/db/fixtures/development/19_environments.rb
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Name can contain only letters, digits, '-', '_', '/', '$', '{', '}', '.', and spaces, but it cannot start or end with '/'
(eval):59:in `find_or_create_environment!'
(eval):48:in `create_deployment!'
(eval):38:in `block in create_merge_request_review_deployments!'
(eval):35:in `each'
(eval):35:in `create_merge_request_review_deployments!'
(eval):14:in `seed!'
(eval):72:in `block (4 levels) in run_file'
(eval):70:in `each'
(eval):70:in `block (3 levels) in run_file'
Steps to reproduce
Hard to reproduce because the seed is based on a sample(4) i.e it's random :/