From 72ec834353f30d14bec5dc4bf7c65c05d4fc0d19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Jan 2026 15:09:34 +0100 Subject: [PATCH 01/13] JGC-439 - Fix darwin skip --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 49377b0f8..63b3ae0db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -336,7 +336,7 @@ def uploadCli(architectures) { def currentBuild = architectures[i] stage("Build and upload ${currentBuild.pkg}") { // MacOS binaries should be downloaded from GitHub packages, as they are signed there. - if (currentBuild.goos == 'darwin') { + if (currentBuild.goos == 'darwin' && params.RUN_DARWIN_WORKFLOW) { uploadSignedDarwinBinaries(currentBuild.goarch,currentBuild.pkg) } else { buildAndUpload(currentBuild.goos, currentBuild.goarch, currentBuild.pkg, currentBuild.fileExtension) From 86b0b0cfe2ad1cbc102546c84473bd8badca4e78 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Jan 2026 15:39:30 +0100 Subject: [PATCH 02/13] JGC-439 - Fix darwin skip --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 63b3ae0db..4200d83e9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -336,8 +336,10 @@ def uploadCli(architectures) { def currentBuild = architectures[i] stage("Build and upload ${currentBuild.pkg}") { // MacOS binaries should be downloaded from GitHub packages, as they are signed there. - if (currentBuild.goos == 'darwin' && params.RUN_DARWIN_WORKFLOW) { - uploadSignedDarwinBinaries(currentBuild.goarch,currentBuild.pkg) + if (currentBuild.goos == 'darwin') { + if (params.RUN_DARWIN_WORKFLOW) { + uploadSignedDarwinBinaries(currentBuild.goarch,currentBuild.pkg) + } } else { buildAndUpload(currentBuild.goos, currentBuild.goarch, currentBuild.pkg, currentBuild.fileExtension) } From 98fc0050bfc28d6c0c139da9d9ad4a4ec67c7e82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 10:12:54 +0100 Subject: [PATCH 03/13] JGC-439 - Fix go version --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4200d83e9..21ce5499b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,7 +46,7 @@ node("docker-ubuntu20-xlarge") { repo = 'jfrog-cli' sh 'rm -rf temp' sh 'mkdir temp' - def goRoot = tool 'go-1.25.4' + def goRoot = tool 'go-1.25.5' env.GOROOT="$goRoot" env.PATH+=":${goRoot}/bin:/tmp/node-${nodeVersion}-linux-x64/bin" env.GO111MODULE="on" From ba17a212ee348eacc538cc1499cbac7536ee70df Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 10:32:28 +0100 Subject: [PATCH 04/13] JGC-439 - Fix go version --- build/docker/slim/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/docker/slim/Dockerfile b/build/docker/slim/Dockerfile index 99d6f2ae6..f6d2b57b2 100644 --- a/build/docker/slim/Dockerfile +++ b/build/docker/slim/Dockerfile @@ -1,6 +1,6 @@ ARG repo_name_21 # Remove ${repo_name_21} to pull from Docker Hub. -FROM ${repo_name_21}/jfrog-docker/golang:1.25.4-alpine as builder +FROM ${repo_name_21}/jfrog-docker/golang:1.25.5-alpine as builder ARG image_name=jfrog-cli ARG cli_executable_name WORKDIR /${image_name} From 733a70f3afd9fe0cf6cb8858e4bdf7da9fbdb110 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 10:51:41 +0100 Subject: [PATCH 05/13] JGC-439 - Fix go version --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 21ce5499b..e1ffbf25e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,6 +62,7 @@ node("docker-ubuntu20-xlarge") { dir("$repo") { if (params.BRANCH?.trim()) { sh "git checkout ${params.BRANCH}" + sh "git pull" } } } From c17352786483d762c03482a13a2cb37e6afef7de Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 11:16:13 +0100 Subject: [PATCH 06/13] JGC-439 - Fix git checkout --- Jenkinsfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1ffbf25e..6859d3c62 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,8 +39,6 @@ node("docker-ubuntu20-xlarge") { identifier = 'v2-jf' nodeVersion = 'v8.17.0' - masterBranch = 'master' - releaseVersion = '' repo = 'jfrog-cli' @@ -62,7 +60,6 @@ node("docker-ubuntu20-xlarge") { dir("$repo") { if (params.BRANCH?.trim()) { sh "git checkout ${params.BRANCH}" - sh "git pull" } } } @@ -213,7 +210,6 @@ def runRelease(architectures) { def setReleaseVersion() { dir("$cliWorkspace/$repo") { - sh "git checkout $masterBranch" sh "build/build.sh" releaseVersion = getCliVersion("./jf") } From 2db53bd6e0ccae7db9be1f8a7dfb0e75ff39ffbb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 11:58:49 +0100 Subject: [PATCH 07/13] JGC-439 - Fix git checkout --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6859d3c62..b263a80c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -432,6 +432,7 @@ def build(goos, goarch, pkg, fileName) { // Remove goos and goarch env var to prevent interfering with following builds. env.GOOS="" env.GOARCH="" + env.JFROG_CLI_REPORT_USAGE="false" if (goos == 'windows') { dir("${jfrogCliRepoDir}build/sign") { From 6cd089b2a62b83ad8c95af80e9e840be065a7c34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 12:04:49 +0100 Subject: [PATCH 08/13] JGC-439 - Fix git checkout --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b263a80c6..eed7b9906 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,7 +49,8 @@ node("docker-ubuntu20-xlarge") { env.PATH+=":${goRoot}/bin:/tmp/node-${nodeVersion}-linux-x64/bin" env.GO111MODULE="on" env.CI=true - env.JFROG_CLI_LOG_LEVEL="DEBUG" + env.JFROG_CLI_LOG_LEVEL="INFO" + env.JFROG_CLI_REPORT_USAGE="false" dir('temp') { sh "cat /etc/lsb-release" @@ -432,7 +433,6 @@ def build(goos, goarch, pkg, fileName) { // Remove goos and goarch env var to prevent interfering with following builds. env.GOOS="" env.GOARCH="" - env.JFROG_CLI_REPORT_USAGE="false" if (goos == 'windows') { dir("${jfrogCliRepoDir}build/sign") { From 2e39dbc0c6289057c3d728011b166101e879231e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 12:37:12 +0100 Subject: [PATCH 09/13] JGC-439 - Add logging for script uploads in Jenkinsfile --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index eed7b9906..2c7f9cefd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -159,6 +159,7 @@ def runRelease(architectures) { stage("Publish latest scripts") { withCredentials([string(credentialsId: 'jfrog-cli-automation', variable: 'JFROG_CLI_AUTOMATION_ACCESS_TOKEN')]) { options = "--url https://releases.jfrog.io/artifactory --access-token=$JFROG_CLI_AUTOMATION_ACCESS_TOKEN" + print "Copying latest scripts from jfrog-cli/$identifier/$version/scripts/ to jfrog-cli/$identifier/scripts/" sh """#!/bin/bash $builderPath rt cp jfrog-cli/$identifier/$version/scripts/getCli.sh jfrog-cli/$identifier/scripts/ --flat $options --fail-no-op $builderPath rt cp jfrog-cli/$identifier/$version/scripts/install-cli.sh jfrog-cli/$identifier/scripts/ --flat $options --fail-no-op @@ -395,30 +396,35 @@ def pushDockerImageVersion(name, version) { } def uploadGetCliToJfrogRepo21() { + print "Uploading $jfrogCliRepoDir/build/getcli/${cliExecutableName}.sh to ecosys-jfrog-cli/$identifier/$version/scripts/getCli.sh" sh """#!/bin/bash $builderPath rt u $jfrogCliRepoDir/build/getcli/${cliExecutableName}.sh ecosys-jfrog-cli/$identifier/$version/scripts/getCli.sh --flat """ } def uploadInstallCliToJfrogRepo21() { + print "Uploading $jfrogCliRepoDir/build/installcli/${cliExecutableName}.sh to ecosys-jfrog-cli/$identifier/$version/scripts/install-cli.sh" sh """#!/bin/bash $builderPath rt u $jfrogCliRepoDir/build/installcli/${cliExecutableName}.sh ecosys-jfrog-cli/$identifier/$version/scripts/install-cli.sh --flat """ } def uploadSetupCliToJfrogRepo21() { + print "Uploading $jfrogCliRepoDir/build/setupcli/${cliExecutableName}.sh to ecosys-jfrog-cli/$identifier/$version/scripts/setup-cli.sh" sh """#!/bin/bash $builderPath rt u $jfrogCliRepoDir/build/setupcli/${cliExecutableName}.sh ecosys-jfrog-cli/$identifier/$version/scripts/setup-cli.sh --flat """ } def uploadGitLabSetupToJfrogRepo21() { + print "Uploading $jfrogCliRepoDir/build/gitlab/(*) to ecosys-jfrog-cli/$identifier/$version/scripts/gitlab/{1}" sh """#!/bin/bash $builderPath rt u "$jfrogCliRepoDir/build/gitlab/(*)" "ecosys-jfrog-cli/$identifier/$version/scripts/gitlab/{1}" """ } def uploadBinaryToJfrogRepo21(pkg, fileName) { + print "Uploading $jfrogCliRepoDir/$fileName to ecosys-jfrog-cli/$identifier/$version/$pkg/" sh """#!/bin/bash $builderPath rt u $jfrogCliRepoDir/$fileName ecosys-jfrog-cli/$identifier/$version/$pkg/ --flat """ From 286524acf7b3d817b9b87ede2bb9b26db9070a51 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 13:09:29 +0100 Subject: [PATCH 10/13] JGC-439 - Add build logging for file and architecture in Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 2c7f9cefd..8df527ce6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -434,6 +434,7 @@ def build(goos, goarch, pkg, fileName) { dir("${jfrogCliRepoDir}") { env.GOOS="$goos" env.GOARCH="$goarch" + print "Building $fileName on $goos $goarch" sh "build/build.sh $fileName" sh "chmod +x $fileName" // Remove goos and goarch env var to prevent interfering with following builds. From 0eef761ac14b45f5c322e6bfb5adf04c8dd71d0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 13:18:13 +0100 Subject: [PATCH 11/13] JGC-439 - Enhance release bundle creation in Jenkinsfile with error handling and logging --- Jenkinsfile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8df527ce6..26e355f7b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -465,7 +465,21 @@ def buildAndUpload(goos, goarch, pkg, fileExtension) { } def distributeToReleases(stage, version, rbcSpecName) { - sh """$builderPath ds rbc $stage-rb-$identifier $version --spec=${cliWorkspace}/${repo}/build/release_specs/$rbcSpecName --spec-vars="VERSION=$version;IDENTIFIER=$identifier" --sign""" + sh """#!/bin/bash + output=$($builderPath ds rbc $stage-rb-$identifier $version --spec=${cliWorkspace}/${repo}/build/release_specs/$rbcSpecName --spec-vars="VERSION=$version;IDENTIFIER=$identifier" --sign 2>&1) + exit_code=$? + if [[ $exit_code -ne 0 ]]; then + if echo "$output" | grep -q "already exists"; then + echo "Release bundle creation skipped - already exists" + exit 0 + else + echo "$output" + exit $exit_code + fi + else + echo "$output" + fi + """ sh "$builderPath ds rbd $stage-rb-$identifier $version --site=releases.jfrog.io --sync" } From 35a35fde73f7938ad9cc2a4ea122f6ab14b6ff35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 13:20:10 +0100 Subject: [PATCH 12/13] JGC-439 - Refactor error handling and logging in release bundle creation script within Jenkinsfile --- Jenkinsfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 26e355f7b..fb532c7db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -466,18 +466,18 @@ def buildAndUpload(goos, goarch, pkg, fileExtension) { def distributeToReleases(stage, version, rbcSpecName) { sh """#!/bin/bash - output=$($builderPath ds rbc $stage-rb-$identifier $version --spec=${cliWorkspace}/${repo}/build/release_specs/$rbcSpecName --spec-vars="VERSION=$version;IDENTIFIER=$identifier" --sign 2>&1) - exit_code=$? - if [[ $exit_code -ne 0 ]]; then - if echo "$output" | grep -q "already exists"; then + output=\$($builderPath ds rbc $stage-rb-$identifier $version --spec=${cliWorkspace}/${repo}/build/release_specs/$rbcSpecName --spec-vars="VERSION=$version;IDENTIFIER=$identifier" --sign 2>&1) + exit_code=\$? + if [[ \$exit_code -ne 0 ]]; then + if echo "\$output" | grep -q "already exists"; then echo "Release bundle creation skipped - already exists" exit 0 else - echo "$output" - exit $exit_code + echo "\$output" + exit \$exit_code fi else - echo "$output" + echo "\$output" fi """ sh "$builderPath ds rbd $stage-rb-$identifier $version --site=releases.jfrog.io --sync" From 44fd2c0f1476d459cb5c4183f19a3888da083824 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 13:57:58 +0100 Subject: [PATCH 13/13] JGC-439 - Improve NPM package publishing in Jenkinsfile with enhanced error handling for existing versions --- Jenkinsfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fb532c7db..b73a1b4d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -489,7 +489,19 @@ def publishNpmPackage(jfrogCliRepoDir) { sh '''#!/bin/bash echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc echo "registry=https://registry.npmjs.org" >> .npmrc - npm publish + output=$(npm publish 2>&1) + exit_code=$? + if [[ $exit_code -ne 0 ]]; then + if echo "$output" | grep -qi "You cannot publish over the previously published versions"; then + echo "NPM package publish skipped - already exists" + exit 0 + else + echo "$output" + exit $exit_code + fi + else + echo "$output" + fi ''' } }