title: Groovy sh calling docker build is adding newlines to my command
body: <p>Hopefully this is a straightforward issue. I have a groovy method I'm calling from within a Jenkinsfile that is supposed to execute a <code>docker build</code> shell command. The line is as follows:</p>
  <pre><code>sh &quot;docker build --build-arg \&quot;VERSION=${tag}\&quot; -t \&quot;${project}:${tag}\&quot; .&quot;
  </code></pre>
  <p>However, when I run this from Jenkins, it seems to break this command into newlines, confusing docker:</p>
  <pre><code>17:26:05.151  docker build --build-arg &quot;VERSION=&lt;tag&gt;
  17:26:05.151  &quot; -t &quot;&lt;project&gt;:&lt;tag&gt;
  17:26:05.151  &quot; .
  17:26:05.451  invalid argument &quot;&lt;project&gt;:&lt;tag&gt;\n&quot; for &quot;-t, --tag&quot; flag: invalid reference format
  17:26:05.451  See 'docker build --help'.
  </code></pre>
  <p>The double quotes around the variables were necessary to get the full command in in some form. Without them, the output cuts off, like this:</p>
  <pre><code>17:17:24.368  ++ docker build --build-arg VERSION=&lt;tag&gt;
  17:17:24.368  &quot;docker build&quot; requires exactly 1 argument.
  </code></pre>
  <p>Something is definitely wrong with how I'm translating bash to groovy, but I'm not sure what.</p>