Bug when interpolating routes with vars when vars contains a slash (like an URL) in Blue/Green mode
When using this template with a manifest that contains multiple routes AND a var that contains a `/` (slash) AND in Blue/Green mode, the deployment fail with a looping error message like: ```shell [INFO] --- cf push [INFO] --- tmpappname: myapp-integration-tmp [INFO] --- appname: myapp-integration [INFO] --- hostname: myapp-integration-tmp [INFO] --- manifest: ./manifest.yml sed: bad option in substitution expression App 'myapp-integration-tmp' not found. App 'myapp-integration-tmp' does not exist. sed: bad option in substitution expression App 'myapp-integration-tmp' not found. App 'myapp-integration-tmp' does not exist. App 'myapp-integration-tmp' not found. App 'myapp-integration-tmp' does not exist. sed: bad option in substitution expression App 'myapp-integration-tmp' not found. App 'myapp-integration-tmp' does not exist. sed: bad option in substitution expression ``` ### How to reproduce A manifest.yml with routes: ```yaml routes: - route: ((hostname)).foo.bar - route: ((hostname)).dc1.foor.bar ``` A cf-vars.yml with one variable having a value containg a slash (whatevers the quotes): ```yaml FOO_URL_DOUBLE_QUOTES: "https://for.bar" FOO_URL_SIMPLE_QUOTES: 'https://for.bar' FOO_URL: https://for.bar FOO_URL_ENV: ${URL} ``` Blue/Green deployment enabled in .gitlab-ci.yml ```yaml variables: CF_INTEG_ZERODOWNTIME: "true" ``` ### How to fix In the `interpolate_routes_with_vars()` function, replace ```yaml echo "$r" | sed -E "s/\(\(${key}\)\)/${value}/" ``` with ```yaml echo "$r" | sed -E "s/\(\(${key}\)\)/${value//\//\\/}/" ``` to escape the slashes like suggested [here](https://stackoverflow.com/a/27788661) I will submit a Merge Request, when my other one (!55) will be merged. Thanks
issue