Resolve variables inside string with single/double quotes.
Summary
When trying to pass an variable to a script that needs string entries that needs to be enclosured with single/double quotes it doesn't return the value.
For example
slack.sh 'Notification Message' '#channel'
Script: https://github.com/rockymadden/slack-cli
Steps to reproduce
Create a project and, in the .gitlab-ci.yml
file, add the following:
Test:
stage: notification
variables:
MESSAGE: '$CI_COMMIT_REF_NAME'
script:
- bash slack.sh chat send 'My message with variable: $MESSAGE' '#channel'
Actual behavior
Doesn't resolve the variable $MESSAGE
Expected behavior
Send the value of the CI_COMMIT_REF_NAME e.g - 'My message with variable: Master'
GitlabRunner Version
gitlab-ci-multi-runner 9.4.2 (6d06f2e)
GitLab Enterprise Edition 9.3.1-ee a15332b