I have variable name URL_DEV in Gitlab Variables (Settings > CI/CD > Variables). I want to get the value using ${CI_ENVIRONMENT_NAME}. Example : echo URL_${CI_ENVIRONMENT_NAME} should provide the value from Gitlab Variables, but it is giving output as URL_DEV but not printing the value.
#Tried below commands
$ echo $URL_${CI_ENVIRONMENT_NAME}
output: DEV
$APP="URL_${CI_ENVIRONMENT_NAME}"
echo $APP
output: URL_DEV
$APP="URL_${CI_ENVIRONMENT_NAME}"
echo $(echo $APP)
output: URL_DEV
Expected Output should be value from the variables
echo $URL_${CI_ENVIRONMENT_NAME}
expected output: https://www.example.com