New Environment variable: CI_PROJECT_NAME_SLUG
Description
I have some project names that are not friendly for URLs and domain names (namely, periods):
- Website.com
- Website.ca (similar as above but not same)
- Project.Edison
I use the project name as part of the environment URL definition and without the CI_PROJECT_NAME_SLUG variable the URL won't work. I work around this in the jobs by stripping the troublesome characters out.
Proposal
$CI_PROJECT_NAME_SLUG = $CI_PROJECT_NAME
lowercased, shortened to 63 bytes, and with everything except 0-9
and a-z
replaced with -
. Use in URLs and domain names.
Documentation blurb
Include in table on https://docs.gitlab.com/ce/ci/variables/#predefined-variables-environment-variables:
$CI_PROJECT_NAME_SLUG = $CI_PROJECT_NAME
lowercased, shortened to 63 bytes, and with everything except 0-9
and a-z
replaced with -
. Use in URLs and domain names.