Directory permissions were preventing application from compiling

This commit is contained in:
Hyatt 2022-10-02 16:02:03 -05:00
parent db44f58178
commit b92d532c4b
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -139,14 +139,24 @@ pipeline {
container (jsNodeID) { container (jsNodeID) {
script { script {
sh """ sh """
printf '%s\\n' "Installing required packages"
apt-get update apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y rpm 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 su - node
mkdir -p "${workspace}/lens/.npm-cache/_logs" printf '%s\\n' "Setting up NODE user build permissions"
npm config set cache "${workspace}/lens/.npm-cache" mkdir -p "/home/node/.npm"
npm config set loglevel verbose printf '%s\\n' "Configuring NODE"
npm config set prefix="/home/node/.npm"
npm config set unsafe-perm true
npm cache verify npm cache verify
printf '%s\\n' "Changing directory"
cd "${workspace}/lens" cd "${workspace}/lens"
printf '%s\\n' "Building..."
make build make build
""" """
} }