Skip to content

Commit

Permalink
Remove unnecessary files in npm installer (#2246)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Oct 5, 2023
1 parent a0d0f8e commit eb0719e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''
}
}
Expand Down

0 comments on commit eb0719e

Please sign in to comment.