Cleanup .npm folder before running Operations UI tests
Change-Id: Ieb3b6a173b26d118cc1b5ce319829a7fc61ed5ba
Related-task: #PROD-25063 (PROD:25063)
diff --git a/test-operations-ui.groovy b/test-operations-ui.groovy
index b6c8b27..f1a8ea2 100644
--- a/test-operations-ui.groovy
+++ b/test-operations-ui.groovy
@@ -22,9 +22,11 @@
node(slaveNode) {
def img = dockerLib.getImage(env.NPM_DOCKER_IMG, "npm:8.12.0")
try {
- if (fileExists("build/")) {
+ if (fileExists('build') || fileExists('.npm')) {
common.infoMsg('Cleaning test env')
- sh("rm -rf build/")
+ img.inside("-u root:root -v ${env.WORKSPACE}/:/operations-ui/") {
+ sh("rm -rf /operations-ui/build/ /operations-ui/.npm")
+ }
}
stage("checkout") {
if (gerritRef) {