Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the JFROG_CLI_TRANSITIVE_DOWNLOAD_EXPERIMENTAL environment variable #2663

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions artifactory/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package artifactory
import (
"errors"
"fmt"
ioutils "github.com/jfrog/gofrog/io"
"github.com/jfrog/jfrog-cli/utils/accesstoken"
"os"
"strconv"
"strings"

ioutils "github.com/jfrog/gofrog/io"
"github.com/jfrog/jfrog-cli/utils/accesstoken"

"github.com/jfrog/gofrog/version"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/transferinstall"
"github.com/jfrog/jfrog-cli/docs/artifactory/transferplugininstall"
Expand Down Expand Up @@ -2648,7 +2649,9 @@ func createDefaultDownloadSpec(c *cli.Context) (*spec.SpecFiles, error) {
func setTransitiveInDownloadSpec(downloadSpec *spec.SpecFiles) {
transitive := os.Getenv(coreutils.TransitiveDownload)
if transitive == "" {
return
if transitive = os.Getenv(coreutils.TransitiveDownloadExperimental); transitive == "" {
return
}
}
for fileIndex := 0; fileIndex < len(downloadSpec.Files); fileIndex++ {
downloadSpec.Files[fileIndex].Transitive = transitive
Expand Down
2 changes: 1 addition & 1 deletion docs/artifactory/download/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "github.com/jfrog/jfrog-cli/docs/common"
var Usage = []string{"rt dl [command options] <source pattern> [target pattern]",
"rt dl --spec=<File Spec path> [command options]"}

var EnvVar = []string{common.JfrogCliTransitiveDownloadExperimental, common.JfrogCliFailNoOp}
var EnvVar = []string{common.JfrogCliTransitiveDownload, common.JfrogCliFailNoOp}

func GetDescription() string {
return "Download files from Artifactory to local file system."
Expand Down
14 changes: 8 additions & 6 deletions docs/common/env.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package common

import (
"github.com/jfrog/jfrog-client-go/artifactory/services"
"strings"

"github.com/jfrog/jfrog-client-go/artifactory/services"

"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
)

Expand Down Expand Up @@ -53,11 +54,12 @@ const (
Can be optionally used with the JFROG_CLI_PLUGINS_SERVER environment variable.
Determines the name of the local repository to use.`

JfrogCliTransitiveDownloadExperimental = ` JFROG_CLI_TRANSITIVE_DOWNLOAD_EXPERIMENTAL
JfrogCliTransitiveDownload = ` JFROG_CLI_TRANSITIVE_DOWNLOAD
[Default: false]
Set to true to look for artifacts also in remote repositories when using the 'rt download' command.
The search will run on the first five remote repositories within the virtual repository.
This feature is experimental and available on Artifactory version 7.17.0 or higher.`
Set this option to true to include remote repositories in artifact searches when using the 'rt download' command.
The search will target the first five remote repositories within the virtual repository.
This feature is available starting from Artifactory version 7.17.0.
NOTE: Enabling this option may increase the load on Artifactory instances that are proxied by multiple remote repositories. `

JfrogCliReleasesRepo = ` JFROG_CLI_RELEASES_REPO
Configured Artifactory repository name from which to download the jar needed by the mvn/gradle command.
Expand Down Expand Up @@ -126,7 +128,7 @@ func GetGlobalEnvVars() string {
Ci,
JfrogCliPluginsServer,
JfrogCliPluginsRepo,
JfrogCliTransitiveDownloadExperimental,
JfrogCliTransitiveDownload,
JfrogCliReleasesRepo,
JfrogCliDependenciesDir,
JfrogCliMinChecksumDeploySizeKb,
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ require (
github.com/docker/docker v27.1.2+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.33
github.com/jfrog/build-info-go v1.9.34
github.com/jfrog/gofrog v1.7.5
github.com/jfrog/jfrog-cli-artifactory v0.1.4
github.com/jfrog/jfrog-cli-core/v2 v2.55.1
github.com/jfrog/jfrog-cli-core/v2 v2.55.2
github.com/jfrog/jfrog-cli-platform-services v1.3.0
github.com/jfrog/jfrog-cli-security v1.6.5
github.com/jfrog/jfrog-client-go v1.44.1
github.com/jfrog/jfrog-cli-security v1.7.0
github.com/jfrog/jfrog-client-go v1.44.2
github.com/jszwec/csvutil v1.10.0
github.com/stretchr/testify v1.9.0
github.com/testcontainers/testcontainers-go v0.32.0
Expand Down Expand Up @@ -171,7 +171,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240811150357-12a9330a2d67
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyalbe4/jfrog-cli-core/v2 v2.55.3-0.20240821161232-d9ee8b2b6e9c

// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240806162439-01bb7dcd43fc

Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo=
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss=
github.com/eyalbe4/jfrog-cli-core/v2 v2.55.3-0.20240821161232-d9ee8b2b6e9c h1:/6Afz259n9csNp/25Bat9af8FDDB+KNWfMmRiQr1uco=
github.com/eyalbe4/jfrog-cli-core/v2 v2.55.3-0.20240821161232-d9ee8b2b6e9c/go.mod h1:2/Ccqq0ayMqIuH5AAoneX0CowwdrNWQcs5aKz8iDYkE=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
Expand Down Expand Up @@ -936,8 +938,8 @@ 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.33 h1:TEeTHDc3tEwZe/7kKhm1hQDd5vA/HnVhp1ZczUOWExk=
github.com/jfrog/build-info-go v1.9.33/go.mod h1:JTGnENexG1jRhKWCkQtZuDb0PerlzlSzF5OmMLG9kfc=
github.com/jfrog/build-info-go v1.9.34 h1:bPnW58VpclbpBe/x8XEu/2BIviEOoJrJ5PkRRcmU3Co=
github.com/jfrog/build-info-go v1.9.34/go.mod h1:6mdtqjREK76bHNODXakqKR/+ksJ9dvfLS7H57BZtnLY=
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.5 h1:dFgtEDefJdlq9cqTRoe09RLxS5Bxbe1Ev5+E6SmZHcg=
Expand All @@ -946,14 +948,12 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-artifactory v0.1.4 h1:ItikGBtLT0gt/lhzBRwpw74uovLEMXlrifDTYNwzD5w=
github.com/jfrog/jfrog-cli-artifactory v0.1.4/go.mod h1:27MDc2ccjOq+iSMWSOolaJpnaLfIxEl48A23lgxayHk=
github.com/jfrog/jfrog-cli-core/v2 v2.55.1 h1:l8za3FqU833g2t0OUOCVw8MuBX8HAMNatPA+aYJPsVE=
github.com/jfrog/jfrog-cli-core/v2 v2.55.1/go.mod h1:Ju0hfP+5KyVPxoDW0iPMutmGo7wrDwk33APWKsJM96E=
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.5 h1:fzhEvRVXmVl46Fw5ptCs+l+kBjg5d9lDgOjX1G2adE8=
github.com/jfrog/jfrog-cli-security v1.6.5/go.mod h1:ViFPXeznp/e73yCYu3aogHJbIYt6E32SujbppRoeem8=
github.com/jfrog/jfrog-client-go v1.44.1 h1:Dj2+gIWMInHe7MWX3XLRhPRnlFOm7jnbCrGSgFDSMFY=
github.com/jfrog/jfrog-client-go v1.44.1/go.mod h1:cRCuMvRgWJ6fSdyYs1pknBin41LLcXY94UOl7KHiQ8U=
github.com/jfrog/jfrog-cli-security v1.7.0 h1:YPxwPYw1yJQxgxBW9lO4iaqNmN8t3/QpgRyy3ni5TEM=
github.com/jfrog/jfrog-cli-security v1.7.0/go.mod h1:QBKxbPse37zj/IMJjmgm0c9CIT6ev8ZTng/5m6CAQys=
github.com/jfrog/jfrog-client-go v1.44.2 h1:5t8tx6NOth6Xq24SdF3MYSd6vo0bTibW93nads2DEuY=
github.com/jfrog/jfrog-client-go v1.44.2/go.mod h1:f5Jfv+RGKVr4smOp4a4pxyBKdlpLG7R894kx2XW+w8c=
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=
Expand Down
Loading