Using file-variable in gitlab-ci.yml results in string instead of file-path
Summary
If I try passing a file-variable through another variable the content gets passed instead of the file
Steps to reproduce
- Add a file variable in Settings => CI/CD => Variables
- Try passing the name as content:
#!gitlab-ci.yml
---
stages:
- test
.template: &template
stage: test
image: bash
variables:
ADDITIONAL_FILES: "/usr/bin/env"
script:
- set -x
- test -f "${ADDITIONAL_FILES}"
- test -f "${SECRET_FILE}"
file passing success:
extends: .template
file passing failure:
extends: .template
variables:
ADDITIONAL_FILES: "${SECRET_FILE}"
Example Project
https://gitlab.com/norpol/gitlab-manual-parallel/-/pipelines/370460294
What is the current bug behavior?
File is rendered as a string instead of a path to the file
What is the expected correct behavior?
Variable should still point to a file instead of being rendered
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com


