I have declarative pipeline_a executing pipeline_b via build job. Problem is pipeline_b needs to use some files generated by pipeline_a. stash/unstash works for me to share data between stages but stashes saved in pipeline_a do not seem to be visible in pipeline_b.
For share between jobs you can use Copy Artifacts plugin or archive() artifacts of pipeline_a and download it in pipeline_b:
Pipeline_a:
archive('artifactName')
Pipeline_b:
sh("wget ${env.JENKINS_URL}/job/$jobName/$buildNumber/artifact/$artifactName")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With