title: Jenkins groovy pipeline - calling build step for another pipeline
body: <h2>edit:</h2>
  
  <p>according to Andrew Bayer you're not supposed to inject declarative pipelines in to others. Support might come for it in the future but not might not come at all.</p>
  
  <hr>
  
  <p>I'm currently trying to start a pipeline within a pipeline but I'm wondering what I need to do to make it work. The documentation on the jenkins webpage says that if the new job or pipeline is in the same folder as the first one you can call it from either direct name or absolute path. I've tried all different ways, currently I'm trying absolute path to a file I just checked exists one second earlier but it says that it doesn't exist. </p>
  
  <p>I wonder what the correct way to link different pipelines together are. </p>
  
  <pre><code>steps {
      echo "hello ${env.WORKSPACE}"
      sh "ls ${env.WORKSPACE}"
      sh "ls ${env.WORKSPACE}/jenkins"
      build(job: "${env.WORKSPACE}/jenkins/css-core-pipeline", parameters: [[$class: 'StringParameterValue', name: 'param1', value: "$pass1" ]])
    }
  </code></pre>
  
  <blockquote>
    <p>[Pipeline] echo </p>
    
    <p>hello /home/jenkins/workspace/hellopipeline</p>
    
    <p>[Pipeline] sh</p>
    
    <p>[hellopipeline] Running shell script</p>
    
    <p>.+ ls /home/jenkins/workspace/hellopipeline</p>
    
    <p>README.md</p>
    
    <p>.</p>
    
    <p>.</p>
    
    <p>.</p>
    
    <p>jenkins</p>
    
    <p>[Pipeline] sh</p>
    
    <p>[hellopipeline] Running shell script</p>
    
    <p>.+ ls /home/jenkins/workspace/hellopipeline/jenkins</p>
    
    <p>css-ce-pipeline</p>
    
    <p>css-core-pipeline</p>
    
    <p>css-dev-pipeline</p>
    
    <p>css-prod-pipeline</p>
    
    <p>manual.md</p>
    
    <p>.</p>
    
    <p>.</p>
    
    <p>.</p>
    
    <p>ERROR: No item named /home/jenkins/workspace/hellopipeline/jenkins/css-core-pipeline found</p>
    
    <p>Finished: FAILURE</p>
  </blockquote>