Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thekitp/48da3275a1d8f1ac64d26f3c41297598 to your computer and use it in GitHub Desktop.
Save thekitp/48da3275a1d8f1ac64d26f3c41297598 to your computer and use it in GitHub Desktop.
jenkins workflow using 'stash' to pass files between two docker containers
node{
docker.image('buildpack-deps:jessie-scm').inside {
sh "echo 'hello' >> a.txt"
stash includes: 'a.txt', name: 'pom'
}
docker.image('buildpack-deps:jessie-scm').inside {
unstash 'pom'
sh "cat a.txt"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment