Skip to content

Instantly share code, notes, and snippets.

@Dev1an
Created September 9, 2024 15:39
Show Gist options
  • Save Dev1an/fa0277aec63d872dafed1c5f6f5deae0 to your computer and use it in GitHub Desktop.
Save Dev1an/fa0277aec63d872dafed1c5f6f5deae0 to your computer and use it in GitHub Desktop.
Jenkins - pass files across jobs
def buildResult = build job: "/PackagePublishers/ArtifactPassingChild", propagate: true
println buildResult.number
copyArtifacts(projectName: '/PackagePublishers/ArtifactPassingChild', selector: specific("${buildResult.number}"))
sh "mkdir one && echo 'Hello world' > one/textfile.txt"
sh "ls"
archiveArtifacts artifacts: 'one/textfile.txt', fingerprint: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment