title: How do I have to execute a managed script in a Jenkins pipeline
body: <p>I'm creating a jenkins pipeline. We have a bash script wich need to be executed but which is not in the repository itself.</p>
  
  <p>How do I have to execute this script? I tried:</p>
  
  <ul>
  <li><p>configFileProvider: use the configFileProvider to get the script in a variable. The execution did not work and I'm also thinking this is not the way to do it? This is meant for config files and not real scripts?</p></li>
  <li><p>I have a shared library which contains <code>resources/</code>. From here I've copied the script and executed it with <code>sh</code> after copying the content in a file.. This went well but I have the script in my workspace which I do not prefer. I want to execute commands on my workspace but when I perform git commit's etc. I don't want the file to be in my workspace if that's possible.</p></li>
  </ul>
  
  <p>What is the right way to execute a managed script (from managed scripts or from in git) in my jenkins pipeline?</p>
  
  <p>Without pipelines I use: Managed scripts. When I execute it I see in the logs:</p>
  
  <pre><code>executing script 'test-xxx.sh'
  [test-xxx] $ /bin/bash /tmp/build_step_template3284004xxx.sh param1 param2 param3
  </code></pre>
  
  <p>This is the ideal solution I want to replicate in Jenkins pipelines.
  My script which is NOT in my workspace but is executed on my workspace and is temporary.</p>