Skip to content

Instantly share code, notes, and snippets.

@solvingj
Last active November 16, 2020 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solvingj/caac293881e510c2925df6e508d7f5b4 to your computer and use it in GitHub Desktop.
Save solvingj/caac293881e510c2925df6e508d7f5b4 to your computer and use it in GitHub Desktop.
Jenkinsfile stash unstash
pipeline{
stages {
stage('Checkout') {
steps {
checkout([
$class: '<repo_scm_type>',
locations: [[
credentialsId: '<repo_credentials>',
local: '.',
remote: '<repo_url>']],
workspaceUpdater: [$class: 'UpdateUpdater']])
stash includes: '*', name: 'repo_root'
}
}
stage('Build'){
parallel {
stage('<stage_name>'){
steps {
unstash 'repo_root'
sh 'build.sh'
}
}
}
}
}
}
@eprk1
Copy link

eprk1 commented Nov 14, 2020

there is a typo. missing ":" after name in stash includes: '*', name 'repo_root'

@solvingj
Copy link
Author

thanks @eprk1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment