Skip to content

Commit

Permalink
Merge branch 'dev' into tune-jas
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Nov 9, 2023
2 parents cd8fae8 + a5e2d33 commit 7990459
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
29 changes: 18 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ node("docker") {

cliExecutableName = 'jf'
identifier = 'v2-jf'
nodeVersion = 'v8.17.0'

repo = 'jfrog-cli'
sh 'rm -rf temp'
sh 'mkdir temp'
def goRoot = tool 'go-1.20.10'
env.GOROOT="$goRoot"
env.PATH+=":${goRoot}/bin"
env.PATH+=":${goRoot}/bin:/tmp/node-${nodeVersion}-linux-x64/bin"
env.GO111MODULE="on"
env.CI=true
env.JFROG_CLI_LOG_LEVEL="DEBUG"
Expand All @@ -45,6 +46,10 @@ node("docker") {
}
}

stage('install npm') {
installNpm(nodeVersion)
}

stage('jf release phase') {
runRelease(architectures)
}
Expand Down Expand Up @@ -396,19 +401,9 @@ 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
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
npm publish
Expand All @@ -417,6 +412,18 @@ def publishNpmPackage(jfrogCliRepoDir) {
}
}

def installNpm(nodeVersion) {
dir('/tmp') {
sh """#!/bin/bash
apt update
apt install wget -y
echo "Downloading npm..."
wget https://nodejs.org/dist/${nodeVersion}/node-${nodeVersion}-linux-x64.tar.xz
tar -xf node-${nodeVersion}-linux-x64.tar.xz
"""
}
}

def publishChocoPackageWithRetries(version, jfrogCliRepoDir, architectures) {
def maxAttempts = 10
def currentAttempt = 1
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v24.0.6+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE=
github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM=
github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
Expand Down

0 comments on commit 7990459

Please sign in to comment.