title: Concat variable names in GitLab
body: <p>We use a Gitlab Project in a team. Each developer has his own Kubernetes cluster in the cloud and an own branch within GitLab. We use GitLab-CI to automatically build new containers and deploy them to our Kubernetes clusters.</p>
  
  <p>At the moment we have a <code>.gitlab-ci.yml</code> looks something like this:</p>
  
  <pre><code>variables:
      USERNAME: USERNAME
      CI_K8S_PROJECT: ${USERNAME_CI_K8S_PROJECT}
      REGISTRY_JSON_KEY_FILE: ${USERNAME_REGISTRY_JSON_KEY_FILE}
      [...]
  
  stages:
    - build
    - deploy
    - remove
  
  build-zeppelin:
    stage: build
    image: docker:latest
    variables:
      image_name: "zeppelin"
    only:
      - ${USERNAME}@Gitlab-Repo
    tags:
      - cloudrunner
    script:
      - docker login -u _json_key -p "${REGISTRY_JSON_KEY_FILE?}" https://eu.gcr.io
      - image_name_fqdn="eu.gcr.io/${CI_K8S_PROJECT?}/${image_name?}:latest"
      - docker build -t ${image_name_fqdn?} .
      - docker push ${image_name_fqdn?} 
      - echo "Your new image is '${image_name_fqdn?}'. Have fun!"
  
  [...]
  </code></pre>
  
  <p>So in the beginning we reference the important information by using a USERNAME-prefix. This works quite well, but is problematic, since we need to correct them after every pull request from another user.</p>
  
  <p>So we search for a way to keep the gitlab-ci file the same to every developer while still referencing some gitlab-variables different for every developer.</p>
  
  <hr>
  
  <p><strong>Things we thought about, that don't seem to work:</strong></p>
  
  <p>Use multiple yml files and import them into each other => <a href="https://stackoverflow.com/questions/528281/how-can-i-include-an-yaml-file-inside-another">not supported</a>. </p>
  
  <p>Try to combine Gitlab Environment variables as Prefix:</p>
  
  <pre><code>CI_K8S_PROJECT: ${${GITLAB_USER_ID}_CI_K8S_PROJECT}
  </code></pre>
  
  <p>or </p>
  
  <pre><code>INDIVIDUAL_CI_K8S_PROJECT: ${GITLAB_USER_ID}_CI_K8S_PROJECT
  CI_K8S_PROJECT: ${INDIVIDUAL_CI_K8S_PROJECT}
  </code></pre>