Skip to content

Improve the handling of tags and branches which contains a `/` in triggered pipelines

Second try at https://gitlab.com/charts/gitlab/issues/1068 (!187 (merged) was reverted with !188 (merged) since this broke tag pipelines).

  1. 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).
  2. 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.
  3. We now use $GITLAB_REF_SLUG in gitlab-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 a gitlab-ce-twang2218-gitlab-ce-i18n-extract-app-views-search-556862c14baaee373fdccc79a6830df890ad5dea.tar.bz2 file)...
  4. We now use $GITLAB_ASSETS_TAG passed in the pipeline trigger so that we don't have to mimic the gitlab-{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

Merge request reports