From b4db7f4f0c820785cc19ed00b7f2237b9f153eba Mon Sep 17 00:00:00 2001 From: Or Toren Date: Mon, 6 Jan 2025 09:16:34 +0200 Subject: [PATCH] JF_APPLICATION_KEY --- go.mod | 6 +++--- go.sum | 7 +++++-- utils/consts.go | 1 + utils/params.go | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index a44a8085d..06edc5805 100644 --- a/go.mod +++ b/go.mod @@ -118,12 +118,12 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect ) -replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.13.9-0.20250106070938-333ac33ce675 +replace github.com/jfrog/jfrog-cli-security => github.com/orto17/jfrog-cli-security v0.0.0-20250106071330-575521ecca16 -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 dev +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/orto17/jfrog-cli-core/v2 v2.0.0-20250106064835-4987fc040d3d // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go dev -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20241230154616-e342ed5065f1 +replace github.com/jfrog/jfrog-client-go => github.com/orto17/jfrog-client-go v0.0.0-20250105135705-d0d16a2c04fa // replace github.com/jfrog/froggit-go => github.com/jfrog/froggit-go dev diff --git a/go.sum b/go.sum index 1ce2e27a1..1e254fa12 100644 --- a/go.sum +++ b/go.sum @@ -160,8 +160,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/ktrysmt/go-bitbucket v0.9.80 h1:S+vZTXKx/VG5yCaX4I3Bmwo8lxWr4ifvuHdTboHTMMc= github.com/ktrysmt/go-bitbucket v0.9.80/go.mod h1:b8ogWEGxQMWoeFnT1ZE4aHIPGindI+9z/zAW/OVFjk0= -github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= -github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -192,6 +192,9 @@ github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9l github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/orto17/jfrog-cli-core/v2 v2.0.0-20250106064835-4987fc040d3d/go.mod h1:LfKvCRXbvwgE0V6aX3/GabkzCedghXq0Y6lmsEuxr44= +github.com/orto17/jfrog-cli-security v0.0.0-20250106071330-575521ecca16/go.mod h1:L0NSfgYh8GPpI7upJXQ5lxl8MDhORj+9r+r4aC+vz5I= +github.com/orto17/jfrog-client-go v0.0.0-20250105135705-d0d16a2c04fa/go.mod h1:2ySOMva54L3EYYIlCBYBTcTgqfrrQ19gtpA/MWfA/ec= github.com/owenrumney/go-sarif v1.1.1/go.mod h1:dNDiPlF04ESR/6fHlPyq7gHKmrM0sHUvAGjsoh8ZH0U= github.com/owenrumney/go-sarif/v2 v2.3.1 h1:77opmuqxQZE1UF6TylFz5XllVEI72WijgwpwNw4JTmY= github.com/owenrumney/go-sarif/v2 v2.3.1/go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w= diff --git a/utils/consts.go b/utils/consts.go index 97b064e6a..455b7e658 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -33,6 +33,7 @@ const ( JFrogTokenEnv = "JF_ACCESS_TOKEN" JfrogUseConfigProfileEnv = "JF_USE_CONFIG_PROFILE" JfrogConfigProfileEnv = "JF_CONFIG_PROFILE" + JfrogApplicationKey = "JF_APPLICATION_KEY" // Git environment variables GitProvider = "JF_GIT_PROVIDER" diff --git a/utils/params.go b/utils/params.go index cbc6cfe96..24d37cdc3 100644 --- a/utils/params.go +++ b/utils/params.go @@ -594,6 +594,7 @@ func extractJFrogCredentialsFromEnvs() (*coreconfig.ServerDetails, error) { } else { return nil, fmt.Errorf("%s and %s or %s environment variables are missing", JFrogUserEnv, JFrogPasswordEnv, JFrogTokenEnv) } + server.ApplicationKey = getTrimmedEnv(JfrogApplicationKey) return &server, nil }