diff --git a/build-k8s-lenz.jenkins b/build-k8s-lenz.jenkins index ed6bbdd..ae2422c 100644 --- a/build-k8s-lenz.jenkins +++ b/build-k8s-lenz.jenkins @@ -139,14 +139,24 @@ pipeline { container (jsNodeID) { script { sh """ + printf '%s\\n' "Installing required packages" apt-get update DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y rpm + printf '%s\\n' "Setting up ROOT user build permissions" + mkdir -p /root/.npm/_logs /root/.npmrc + chmod 755 /root + chown -R 1000:1000 /root/.npm /root/.npmrc + printf '%s\\n' "Changing user to node" su - node - mkdir -p "${workspace}/lens/.npm-cache/_logs" - npm config set cache "${workspace}/lens/.npm-cache" - npm config set loglevel verbose + printf '%s\\n' "Setting up NODE user build permissions" + mkdir -p "/home/node/.npm" + printf '%s\\n' "Configuring NODE" + npm config set prefix="/home/node/.npm" + npm config set unsafe-perm true npm cache verify + printf '%s\\n' "Changing directory" cd "${workspace}/lens" + printf '%s\\n' "Building..." make build """ }