Improve the handling of tags and branches which contains a `/` in triggered pipelines
requested to merge 1068-the-gitlab-rails-ce-and-gitlab-rails-ee-jobs-should-use-gitlab_ref_slug-instead-of-gitlab_-c-e-e_version into master
Second try at https://gitlab.com/charts/gitlab/issues/1068 (!187 (merged) was reverted with !188 (merged) since this broke tag pipelines).
- This should address https://gitlab.com/charts/gitlab/issues/1068 without breaking tag pipelines, once https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24465/commits is merged which effectively makes
$GITLAB_REF_SLUG
and$GITLAB_VERSION
interchangeable in the case of a tag (meaning that the change in this MR won't have any effect in the case of a tag). - We now use
$GITLAB_VERSION
instead of$GITLAB_CE_VERSION
/$GITLAB_EE_VERSION
since there was no reason to include the edition in the variable name. - We now use
$GITLAB_REF_SLUG
ingitlab-rails/Dockerfile.erb
since it has the/
replaced by-
(this is what's done in the downloaded archive name: e.g.https://gitlab.com/gitlab-org/gitlab-ce/repository/twang2218/gitlab-ce-i18n-extract-app/views/search/archive.tar.bz2
downloads agitlab-ce-twang2218-gitlab-ce-i18n-extract-app-views-search-556862c14baaee373fdccc79a6830df890ad5dea.tar.bz2
file)... - We now use
$GITLAB_ASSETS_TAG
passed in the pipeline trigger so that we don't have to mimic thegitlab-{ce,ee}
's slug of the branch name.
Important: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24465 is a prerequisite and must be merged before this MR.
Closes #1068.
Edited by Rémy Coutable