title: Receiving a Syntax error: "(" unexpected on my Jenkins file (groovy)
body: <p>I am trying to use the following bit of code in a groovy file which I'm running on Jenkins:</p>
  
  <pre><code>String cmd = "helm package my-test-chart ; file = sh (script: 'ls*.tgz',returnStdout: true).trim()"
  </code></pre>
  
  <p>But I receive the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code> Syntax error: "(" unexpected [Pipeline] }
   [Pipeline] // stage
   [Pipeline] }
   [Pipeline] // node
   [Pipeline] End of Pipeline
   ERROR: script returned exit code 2
   Finished: FAILURE
  </code></pre>
  
  <p>Any help will be appreciated thank you</p>