[Lock] Reset lock file content cache in waiting function
Without the reset it cannot be determined that file has been removed on
artifactory in middle of waiting.
Related-To: PRODX-8287
Change-Id: If8f0dde642cfe738b4f6804290de5b10ca61b7c0
diff --git a/src/com/mirantis/mk/Lock.groovy b/src/com/mirantis/mk/Lock.groovy
index 7700419..10efa71 100644
--- a/src/com/mirantis/mk/Lock.groovy
+++ b/src/com/mirantis/mk/Lock.groovy
@@ -111,6 +111,10 @@
throw new TimeoutException("Execution of waitLock timed out after ${this.timeout} seconds")
}
common.infoMsg("'${this.name}' is locked. Retry in ${this.retryInterval} seconds")
+ // Reset the cache so it will re-retrieve the file and its content
+ // otherwise it cannot determine that file has been removed on artifactory
+ // in the middle of waiting
+ this.lockFileContentCache = null
sleep(this.retryInterval*1000)
}
}