Bad variable evaluation for dynamic environment url
Summary
I have a YAML-defined global variable composed of two other variables that I'm trying to use in a dynamic environment url. When used in a job script, the variable evaluates correctly. But, when used as part of the url of a dynamic environment, the literal string instead of its evaluated form shows up.
Steps to reproduce
Here's my CI YAML file distilled down to the relevant bits.
variables:
COMPOSE_PROJECT_NAME: $DOCKER_PROJECT_NAME-$CI_COMMIT_REF_NAME
.deploy: &deploy
stage: deploy
variables:
GIT_STRATEGY: none
script:
- echo $COMPOSE_PROJECT_NAME
environment:
name: $CI_COMMIT_REF_NAME
url: https://$COMPOSE_PROJECT_NAME.rms-dev.ucalgary.ca/
Actual behaviour
The script outputs db-master
for my example project. But, the environment url comes out as https://$docker_project_name-$ci_commit_ref_name.rms-dev.ucalgary.ca/
. The literal value for COMPOSE_PROJECT_NAME
in lowercase is being filled in instead of evaluating the variables.
Expected behavior
I expect the environment url to be https://db-master.rms-dev.ucalgary.ca/
.
Relevant logs and/or screenshots
Environment description
Local installation of GitLab 9.1.4 (fed799a) on RHEL 7.3.
Used GitLab Runner version
Version: 9.2.0
Git revision: adfc387
Git branch: 9-2-stable
GO version: go1.7.5
Built: Mon, 22 May 2017 16:00:24 +0000
OS/Arch: linux/amd64