CI / CD Settings Environment Variable cannot contain ampersand (&)
Summary
An environment variable which is set through the gitlab ui, which contains an ampersand (&) in the text, is not being passed correctly to a powershell script.
Steps to reproduce
- Set a variable using the GitLab UI - Navigate to Settings > CI/CD > Environment Variables
- use a key/value containing special characters (in this case an ampersand, however I believe the same happens with dollar signs($) or accent characters(^) e.g. set variable name to MYVAR and value to ABC&123
- execute a powershell script in the pipeline to output the value of the secret variable Write-Host $env:MVAR
The output in the pipeline will show "ABC^&123 (closed)"
Gitlab Version being used is 11.7.0 (2019-01-22)
What is the current bug behavior?
Wrong value is being output to ci script
What is the expected correct behavior?
I expect that escaping should be handled by gitlab when being set through the UI. The environment variable should be set to the value input.