Cleanws stash is not saving .git folder
This commit is contained in:
parent
0e9186fc4a
commit
9698d245fc
1 changed files with 7 additions and 2 deletions
|
|
@ -8,9 +8,14 @@ def conditionalclean(doclean = "${CLEAN_WORKSPACE}" == "true") {
|
|||
if (doclean) {
|
||||
echo "Cleaning workspace"
|
||||
// Save any script files that were loaded into the workspace at first and are required after cleaning the workspace
|
||||
stash allowEmpty: true, includes: "${autobuildroot}/**", name: 'Clean workspace stash', useDefaultExcludes: false
|
||||
def stashname = 'Clean workspace stash'
|
||||
stash(allowEmpty: true,
|
||||
includes: "${autobuildroot}/**,${autobuildroot}/.git/**",
|
||||
name: stashname,
|
||||
useDefaultExcludes: false
|
||||
)
|
||||
cleanWs()
|
||||
unstash name: 'Clean workspace stash'
|
||||
unstash name: stashname
|
||||
}
|
||||
else {
|
||||
echo "Not cleaning workspace"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue