title: Some Variables not getting rendered in jenkins pipeline inside single quotes
body: <p>I am using below code  in CASE 1 in my jenkins library  , it is able to render the artifactory password and username  inside the sh block but not able to render the variable docker_repo , if I replace it with code in CASE 2 it works fine but it is an unsafe practice , Any idea why it is happening ? and how to overcome it ?</p>
  <p>CASE 1</p>
  <pre><code>def dockerAuth(String creds = 'mysecret',String docker_repo = ARTF_URL) {
      withCredentials([usernamePassword(credentialsId: creds,
                       usernameVariable: 'ARTIFACTORY_USER',
                       passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
          //opts = '-u $ARTIFACTORY_USER -p $ARTIFACTORY_PASSWORD'
          sh 'sudo docker login -u $ARTIFACTORY_USER -p $ARTIFACTORY_PASSWORD $docker_repo'
  
  
      }
  }
  </code></pre>
  <p>CASE 2</p>
  <pre><code>def dockerAuth(String creds = 'mysecret',String docker_repo = ARTF_URL) {
          withCredentials([usernamePassword(credentialsId: creds,
                           usernameVariable: 'ARTIFACTORY_USER',
                           passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
              //opts = '-u $ARTIFACTORY_USER -p $ARTIFACTORY_PASSWORD'
              sh &quot;sudo docker login -u ${ARTIFACTORY_USER} -p ${ARTIFACTORY_PASSWORD} ${docker_repo}&quot;
      
      
          }
      }
  </code></pre>