title: Using parameters within a shell command in Jenkinsfile for Jenkins pipeline
body: <p>I want to use defined parameters in <code>Jenkinsfile</code> in several shell commands, but I get an exception. In my example I want to execute a simple docker command. The parameter defines the path to docker executable.</p>
  
  <p>This is my very short <code>Jenkinsfile</code>:</p>
  
  <pre><code>pipeline {
    agent any
  
    parameters {
      string(defaultValue: '/Applications/Docker.app/Contents/Resources/bin/docker', description: '', name: 'docker')
    }
  
    stages {
      stage('Test') {
        steps {
          sh 'sudo ${params.docker} ps -a'
        }
      }
    }
  }
  </code></pre>
  
  <p>And I get the following exception:</p>
  
  <pre><code>[e2e-web-tests_master-U4G4QJHPUACAEACYSISPVBCMQBR2LS5EZRVEKG47I2XHRI54NCCQ] Running shell script
  /Users/Shared/Jenkins/Home/workspace/e2e-web-tests_master-U4G4QJHPUACAEACYSISPVBCMQBR2LS5EZRVEKG47I2XHRI54NCCQ@tmp/durable-e394f175/script.sh: line 2: ${params.docker}: bad substitution
  </code></pre>
  
  <p>When I change the <code>Jenkinsfile</code> without using the paramter inside the shell command it passes successfully:</p>
  
  <pre><code>pipeline {
    agent any
  
    parameters {
      string(defaultValue: '/Applications/Docker.app/Contents/Resources/bin/docker', description: '', name: 'docker')
    }
  
    stages {
      stage('Test') {
        steps {
          sh 'sudo /Applications/Docker.app/Contents/Resources/bin/docker ps -a'
        }
      }
    }
  }
  </code></pre>
  
  <p>So, how can I use parameters inside a shell command in Jenkinsfile? I tried <code>string</code> and <code>text</code> as parameter types.</p>