title: Jenkins Pipeline ${params.Environment} bad substitution
body: <p>I am trying to send commands to a docker container within docker run via a Jenkins pipeline.
  The Jenkins machine is at a different server and the docker image is in a different server.
  When I hard code the environment param, the scripts execute as expected. But whenever I try to replace it with the params, it errors out saying :</p>
  <p>bash: ${params.Environment} bad substitution</p>
  <p>This is my pipeline script</p>
  <pre><code>pipeline {
      agent any 
         parameters {
            choice(
                name: 'Environment',
                choices: ['qa','dev'],
                description: 'Passing the Environment'
              )
         }
         stages {
            stage('Environment') {
               steps {
                   echo &quot; The environment is ${params.Environment}&quot;
               }
            }
            stage('run') {
               steps {
                  sh 'ssh 10.x.x.x \'sudo docker run --name docker_container_name docker_image_name sh -c &quot;cd mytests ; pip3 install -r requirements.txt ; python3 runTests.py -env  ${params.Environment} &quot;\''
               }
           }
        }
      }
  </code></pre>