Added option to handling workspace getting for concurrency builds
Change-Id: I488894dc22cf37617a2eddbb79a3afb614463926
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index 1732da4..97b28c8 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -26,9 +26,15 @@
* Currently implemented by calling pwd so it won't return relevant result in
* dir context
*/
-def getWorkspace() {
+def getWorkspace(includeBuildNum=false) {
def workspace = sh script: 'pwd', returnStdout: true
workspace = workspace.trim()
+ if(includeBuildNum){
+ if(!workspace.endsWith("/")){
+ workspace += "/"
+ }
+ workspace += env.BUILD_NUMBER
+ }
return workspace
}