diff --git a/artifactory/cli.go b/artifactory/cli.go index 8f10541a1..dd4026cb5 100644 --- a/artifactory/cli.go +++ b/artifactory/cli.go @@ -1148,7 +1148,7 @@ func BuildDockerCreateCmd(c *cli.Context) error { return err } buildDockerCreateCommand := container.NewBuildDockerCreateCommand() - if err := buildDockerCreateCommand.SetImageNameWithDigest(imageNameWithDigestFile); err != nil { + if err = buildDockerCreateCommand.SetImageNameWithDigest(imageNameWithDigestFile); err != nil { return err } buildDockerCreateCommand.SetRepo(sourceRepo).SetServerDetails(artDetails).SetBuildConfiguration(buildConfiguration) diff --git a/build/npm/v2-jf/package-lock.json b/build/npm/v2-jf/package-lock.json index 5de4ed2f7..bf68fb413 100644 --- a/build/npm/v2-jf/package-lock.json +++ b/build/npm/v2-jf/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.61.2", + "version": "2.62.0", "lockfileVersion": 1 } diff --git a/build/npm/v2-jf/package.json b/build/npm/v2-jf/package.json index b66d58eac..0ebcb0726 100644 --- a/build/npm/v2-jf/package.json +++ b/build/npm/v2-jf/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.61.2", + "version": "2.62.0", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/build/npm/v2/package-lock.json b/build/npm/v2/package-lock.json index 18c54af7f..24eb86e4b 100644 --- a/build/npm/v2/package-lock.json +++ b/build/npm/v2/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2", - "version": "2.61.2", + "version": "2.62.0", "lockfileVersion": 2 } diff --git a/build/npm/v2/package.json b/build/npm/v2/package.json index c0478382b..0eadc8e30 100644 --- a/build/npm/v2/package.json +++ b/build/npm/v2/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2", - "version": "2.61.2", + "version": "2.62.0", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/general/ai/cli.go b/general/ai/cli.go index 25a0de0db..b1dd74cfc 100644 --- a/general/ai/cli.go +++ b/general/ai/cli.go @@ -132,12 +132,16 @@ func sendRequestToCliAiServer(content interface{}, apiCommand ApiCommand) (respo return } if err = errorutils.CheckResponseStatus(resp, http.StatusOK); err != nil { - if resp.StatusCode == http.StatusInternalServerError { - err = errorutils.CheckErrorf("AI model Endpoint is not available.\n" + err.Error()) - } else if resp.StatusCode == http.StatusNotFound { - err = errorutils.CheckErrorf("CLI-AI app server is no available. Note that the this command is supported while inside JFrog's internal network only.\n" + err.Error()) + switch resp.StatusCode { + case http.StatusInternalServerError: + err = errorutils.CheckErrorf("AI model Endpoint is not available. Please try again later.") + case http.StatusNotFound: + err = errorutils.CheckErrorf("CLI-AI app server is not available. Note that the this command is supported while inside JFrog's internal network only.\n" + err.Error()) + case http.StatusNotAcceptable: + err = errorutils.CheckErrorf("CLI-AI app server is not available. Please try again later.") + default: + return } - return } if apiCommand == questionApi { defer func() { diff --git a/go.mod b/go.mod index 5557735fa..ac2345320 100644 --- a/go.mod +++ b/go.mod @@ -16,13 +16,13 @@ require ( github.com/docker/docker v27.1.1+incompatible github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1 github.com/jfrog/archiver/v3 v3.6.1 - github.com/jfrog/build-info-go v1.9.30 - github.com/jfrog/gofrog v1.7.4 - github.com/jfrog/jfrog-cli-artifactory v0.1.1 - github.com/jfrog/jfrog-cli-core/v2 v2.53.4 + github.com/jfrog/build-info-go v1.9.31 + github.com/jfrog/gofrog v1.7.5 + github.com/jfrog/jfrog-cli-artifactory v0.1.2 + github.com/jfrog/jfrog-cli-core/v2 v2.54.0 github.com/jfrog/jfrog-cli-platform-services v1.3.0 - github.com/jfrog/jfrog-cli-security v1.6.2 - github.com/jfrog/jfrog-client-go v1.43.0 + github.com/jfrog/jfrog-cli-security v1.6.3 + github.com/jfrog/jfrog-client-go v1.43.1 github.com/jszwec/csvutil v1.10.0 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.32.0 @@ -139,7 +139,7 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ulikunitz/xz v0.5.12 // indirect - github.com/vbauerster/mpb/v7 v7.5.3 // indirect + github.com/vbauerster/mpb/v8 v8.7.4 // indirect github.com/xanzy/go-gitlab v0.95.2 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect @@ -170,11 +170,13 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyalbe4/jfrog-cli-core/v2 v2.31.1-0.20240723145911-300a4683d485 +// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240729104836-9c1dae33c595 -// replace github.com/jfrog/jfrog-client-go => github.com/eyalbe4/jfrog-client-go v1.28.1-0.20240723132744-93aab0ffffb1 +// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240729103741-f6c521eb9a40 -// replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.1.1-0.20240522121307-3e9fe2dc5e81 +// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20240729055355-5b51bf71e756 + +replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.6.3-0.20240729081816-371509c205d6 // replace github.com/jfrog/build-info-go => github.com/eyalbe4/build-info-go v1.8.9-0.20240723132035-980d2c84b738 diff --git a/go.sum b/go.sum index c7461e643..7723736f3 100644 --- a/go.sum +++ b/go.sum @@ -936,24 +936,24 @@ github.com/jedib0t/go-pretty/v6 v6.5.9 h1:ACteMBRrrmm1gMsXe9PSTOClQ63IXDUt03H5U+ github.com/jedib0t/go-pretty/v6 v6.5.9/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E= github.com/jfrog/archiver/v3 v3.6.1 h1:LOxnkw9pOn45DzCbZNFV6K0+6dCsQ0L8mR3ZcujO5eI= github.com/jfrog/archiver/v3 v3.6.1/go.mod h1:VgR+3WZS4N+i9FaDwLZbq+jeU4B4zctXL+gL4EMzfLw= -github.com/jfrog/build-info-go v1.9.30 h1:RmK3NuDGUoyCjCNJJBlHaCm4vWzO8BLjkuAkMzj6PGE= -github.com/jfrog/build-info-go v1.9.30/go.mod h1:fxSfpp+kQ8qln/0y7pgV3tg2exWe5OM1np5FF2LlSDg= +github.com/jfrog/build-info-go v1.9.31 h1:1pLC19hc9AEdWA87D+EcvMTLsDeMa390Z8TrNpCO4K8= +github.com/jfrog/build-info-go v1.9.31/go.mod h1:DZCElS/UhaSJHn0K1YzRUOJqiqVS4bjAEnGQSFncwNw= github.com/jfrog/froggit-go v1.16.1 h1:FBIM1qevX/ag9unfmpGzfmZ36D8ulOJ+DPTSFUk3l5U= github.com/jfrog/froggit-go v1.16.1/go.mod h1:TEJSzgiV+3D/GVGE8Y6j46ut1jrBLD1FL6WdMdKwwCE= -github.com/jfrog/gofrog v1.7.4 h1:on4AeWef5LJUhGCigSjTS4Ez3n9l8+NiZlXH6UYp05c= -github.com/jfrog/gofrog v1.7.4/go.mod h1:jyGiCgiqSSR7k86hcUSu67XVvmvkkgWTmPsH25wI298= +github.com/jfrog/gofrog v1.7.5 h1:dFgtEDefJdlq9cqTRoe09RLxS5Bxbe1Ev5+E6SmZHcg= +github.com/jfrog/gofrog v1.7.5/go.mod h1:jyGiCgiqSSR7k86hcUSu67XVvmvkkgWTmPsH25wI298= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-artifactory v0.1.1 h1:3HfowB29TBEtr6BgAezdqTRVFhBFa5XasxARLh+1HDE= -github.com/jfrog/jfrog-cli-artifactory v0.1.1/go.mod h1:Jyv0OecV8k8JOT5C5m/UmS1KCsR1xkog1OjKJeDuMcY= -github.com/jfrog/jfrog-cli-core/v2 v2.53.4 h1:A9lAYJMkqH9lZyu6ahJ2puzlYGXg9upopretVVfDqzc= -github.com/jfrog/jfrog-cli-core/v2 v2.53.4/go.mod h1:thaQcvQDTHV2jOumb+m2OBfqRSW4JYtLez5Qsi1dovk= +github.com/jfrog/jfrog-cli-artifactory v0.1.2 h1:CbDYDYItZL4QwEX4Br9SDBztSxiXzfaxAT0gNcrcd6Y= +github.com/jfrog/jfrog-cli-artifactory v0.1.2/go.mod h1:Jyv0OecV8k8JOT5C5m/UmS1KCsR1xkog1OjKJeDuMcY= +github.com/jfrog/jfrog-cli-core/v2 v2.54.0 h1:vSVSADvuZ2vou4B5spfsUZ32oA/sl4mPVEVgqfNbjUM= +github.com/jfrog/jfrog-cli-core/v2 v2.54.0/go.mod h1:ynAcz9jWDrcQi1/IkNLrIgfQnJO8LPLFwjLplgvY8KI= github.com/jfrog/jfrog-cli-platform-services v1.3.0 h1:IblSDZFBjL7WLRi37Ni2DmHrXJJ6ysSMxx7t41AvyDA= github.com/jfrog/jfrog-cli-platform-services v1.3.0/go.mod h1:Ky4SDXuMeaiNP/5zMT1YSzIuXG+cNYYOl8BaEA7Awbc= -github.com/jfrog/jfrog-cli-security v1.6.2 h1:C2tlCEGA+HxOhgYe5llI4XtamKxFVXNAMfAKaYzECSQ= -github.com/jfrog/jfrog-cli-security v1.6.2/go.mod h1:lNcLT+lH7xvZaC+eSjvz1kGpVvkL9ZthYyBZy7O4aCA= -github.com/jfrog/jfrog-client-go v1.43.0 h1:0A4zT8ZIpAwtEUICNhKPx1bwM1LocJN9C38IGycS7UY= -github.com/jfrog/jfrog-client-go v1.43.0/go.mod h1:1RklAq1rNS3HmIsJ+BM3tEn9XHZuTAs37JtVUpefUk4= +github.com/jfrog/jfrog-cli-security v1.6.3-0.20240729081816-371509c205d6 h1:U61knfgV/WZ4ZOhEEKKlnXQ8Y1BlKVPyVjTaERymIk0= +github.com/jfrog/jfrog-cli-security v1.6.3-0.20240729081816-371509c205d6/go.mod h1:0m+jdJgsLF2QHl4f/t9JHuJ9E0Oqf9kK24UWsjAtvsE= +github.com/jfrog/jfrog-client-go v1.43.1 h1:KIauYofb7R02mGDc8XADEvu245BJjUryjtq+YQQIbY8= +github.com/jfrog/jfrog-client-go v1.43.1/go.mod h1:J/Ketm4TkBudXG8gAGY74jtNUbKhXn1+XaRfJcJVkvA= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= @@ -1013,7 +1013,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -1158,8 +1157,8 @@ github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM= github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0= -github.com/vbauerster/mpb/v7 v7.5.3 h1:BkGfmb6nMrrBQDFECR/Q7RkKCw7ylMetCb4079CGs4w= -github.com/vbauerster/mpb/v7 v7.5.3/go.mod h1:i+h4QY6lmLvBNK2ah1fSreiw3ajskRlBp9AhY/PnuOE= +github.com/vbauerster/mpb/v8 v8.7.4 h1:p4f16iMfUt3PkAC73SCzAtgtSf8TYDqEbJUT3odPrPo= +github.com/vbauerster/mpb/v8 v8.7.4/go.mod h1:r1B5k2Ljj5KJFCekfihbiqyV4VaaRTANYmvWA2btufI= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/xanzy/go-gitlab v0.95.2 h1:4p0IirHqEp5f0baK/aQqr4TR57IsD+8e4fuyAA1yi88= @@ -1495,7 +1494,6 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/plugins/commands/install.go b/plugins/commands/install.go index a45f3138d..7b5a55f94 100644 --- a/plugins/commands/install.go +++ b/plugins/commands/install.go @@ -170,6 +170,7 @@ func downloadPlugin(pluginsDir, pluginName, downloadUrl string, httpDetails http return } if progressMgr != nil { + progressMgr.SetHeadlineMsg("Downloading") progressMgr.InitProgressReaders() progressMgr.IncGeneralProgressTotalBy(1) defer func() { @@ -268,6 +269,6 @@ func downloadFromArtifactory(downloadDetails *httpclient.DownloadFileDetails, ht if err != nil { return } - log.Info("Downloading: " + downloadDetails.FileName) + log.Info("Downloading:", downloadDetails.FileName) return client.DownloadFileWithProgress(downloadDetails, "", httpDetails, false, false, progressMgr) } diff --git a/testdata/docker/artifactory/Dockerfile b/testdata/docker/artifactory/Dockerfile index c47054915..eb1508233 100644 --- a/testdata/docker/artifactory/Dockerfile +++ b/testdata/docker/artifactory/Dockerfile @@ -7,4 +7,5 @@ ENV JFROG_HOME=/jfrog_home WORKDIR /jfrog_home EXPOSE 8082 EXPOSE 8081 -CMD ["sh","-c","local-rt-setup; sleep infinity"] \ No newline at end of file +# Temporarily use version 7.84.17 due to an issue with the automatic token generation mechanism in 7.90 +CMD ["sh","-c","local-rt-setup --rt-version 7.84.17; sleep infinity"] diff --git a/utils/cliutils/cli_consts.go b/utils/cliutils/cli_consts.go index 185d44058..11f708978 100644 --- a/utils/cliutils/cli_consts.go +++ b/utils/cliutils/cli_consts.go @@ -4,7 +4,7 @@ import "time" const ( // General CLI constants - CliVersion = "2.61.2" + CliVersion = "2.62.0" ClientAgent = "jfrog-cli-go" // CLI base commands constants: