title: String manipulation of `CI_COMMIT_TAG` used by `environment:url` in GitLab pipeline
body: <p>In short:
  Find a way to do simple parsing of a variable that is already available to <code>environment:url</code> as part of a pipeline job. </p>
  
  <p>The particulars: A job that is triggered by a git tag following a git-flow release finish, such as <code>v1.32.7</code>. GitLab makes this available in <code>CI_BUILD_TAG</code>. What I would like is to to be able to only use the major version part, e.g. <code>v1</code> in <code>environment:name</code> and <code>environment:url</code>.</p>
  
  <p>Does anyone have a clever way of solving this? I've considered maybe having hooks that insert this value into the code itself, but I'm curious as to what solutions others have arrived at.</p>
  
  <hr>
  
  <p>I'm aware that <code>GitLab</code> has strict limitations as to where variables can be expanded, and which variables can be used when. Here is an overview: <a href="https://docs.gitlab.com/ee/ci/variables/where_variables_can_be_used.html#gitlab-internal-variable-expansion-mechanism" rel="nofollow noreferrer">https://docs.gitlab.com/ee/ci/variables/where_variables_can_be_used.html#gitlab-internal-variable-expansion-mechanism</a></p>
  
  <p>My question is regarding the use of data that is already available to GitLab, such as the variables in question. And not the act of transferring data evaluated by runners to GitLab, something that is fairly problematic given the architecture, and otherwise discussed here:</p>
  
  <ul>
  <li><a href="https://gitlab.com/gitlab-org/gitlab-ce/issues/27921" rel="nofollow noreferrer">https://gitlab.com/gitlab-org/gitlab-ce/issues/27921</a></li>
  <li><a href="https://gitlab.com/gitlab-org/gitlab-ce/issues/28314" rel="nofollow noreferrer">https://gitlab.com/gitlab-org/gitlab-ce/issues/28314</a></li>
  </ul>