jobs/common: added cleanup function restoring unstaged changes
with the script updating the source revisions some unstaged changes reside in the repository. A following job will be unable to succeed as the clone will fail. Thus, adding this function which now can be used in the specific jobs. Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
3364307149
commit
246c859a35
|
|
@ -144,6 +144,13 @@ def gitCheckout(gitUrl, branchTag, repoDir, hasSubmodules) {
|
|||
println "Last 3 git commits:\n-----------------------------\n${gitHistory}"
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
def cleanupRepository(repoDir) {
|
||||
println "cleanup repository (e.g. temporary source revision updates)..."
|
||||
dir("${repoDir}") {
|
||||
sh("git restore .")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue