From eb0719ef71f7c55b60d0559e47fc369dddfae54a Mon Sep 17 00:00:00 2001 From: Yahav Itzhak Date: Thu, 5 Oct 2023 18:09:43 +0300 Subject: [PATCH] Remove unnecessary files in npm installer (#2246) --- Jenkinsfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f2d904873..316bd4446 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -395,18 +395,22 @@ def distributeToReleases(stage, version, rbcSpecName) { } def publishNpmPackage(jfrogCliRepoDir) { + dir('/tmp') { + sh '''#!/bin/bash + apt update + apt install wget -y + echo "Downloading npm..." + wget https://nodejs.org/dist/v8.17.0/node-v8.17.0-linux-x64.tar.xz + tar -xvf node-v8.17.0-linux-x64.tar.xz + ''' + } dir(jfrogCliRepoDir+"build/npm/$identifier") { withCredentials([string(credentialsId: 'npm-authorization', variable: 'NPM_AUTH_TOKEN')]) { sh '''#!/bin/bash - apt update - apt install wget -y - echo "Downloading npm..." - wget https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz - tar -xvf node-v8.11.1-linux-x64.tar.xz - export PATH=$PATH:$PWD/node-v8.11.1-linux-x64/bin/ + export PATH=/tmp/node-v8.17.0-linux-x64/bin:$PATH echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc echo "registry=https://registry.npmjs.org" >> .npmrc - ./node-v8.11.1-linux-x64/bin/npm publish + npm publish ''' } }