Azure Web App Deployments - Username has $ at beggining

I am struggling to get my username to pass through to the azure web app deployment as it starts with a $ symbol, I have tryed escaping it in every way I know (listed below) and it just isn’t taking it.

Any suggestions ?

'$username'
"$username'
\$username

Edit: syntax got mucked up

Looking at https://github.com/travis-ci/dpl/blob/master/lib/dpl/providers/azure_web_apps.rb, it’s inserted into a URL – so you need to URL encode it: %24username.

You also need to quote it or you’ll get a YAML parsing error (in YAML, a lexeme cannot start with %):

login: '%24username'