Skip to content
Snippets Groups Projects
Commit 78a48d95 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fixed git checkout

parent 394d7357
No related branches found
No related tags found
No related merge requests found
......@@ -62,22 +62,16 @@ def doPrepare(boolean checkoutScm, String gitUrl='') {
// Check out source code
if(checkoutScm) {
if(gitUrl != '') {
sh '''
mkdir /scratch/source
'''
dir("/scratch/source") { node { git gitUrl } }
sh '''
chown msk_jenkins -R /scratch/source
'''
git gitUrl
}
else {
checkout scm
sh '''
sudo -u msk_jenkins git clean -f -d -x
sudo -u msk_jenkins mkdir /scratch/source
sudo -u msk_jenkins cp -r * /scratch/source
'''
}
sh '''
sudo -u msk_jenkins git clean -f -d -x
sudo -u msk_jenkins mkdir /scratch/source
sudo -u msk_jenkins cp -r * /scratch/source
'''
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment