Skip to content

Commit 01b0a53

Browse files
Merge remote-tracking branch 'origin/dev' into v2
2 parents 347c399 + ac66c42 commit 01b0a53

File tree

15 files changed

+201
-74
lines changed

15 files changed

+201
-74
lines changed

build/npm/v2-jf/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/npm/v2-jf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jfrog-cli-v2-jf",
3-
"version": "2.71.5",
3+
"version": "2.72.0",
44
"description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸",
55
"homepage": "https://github.com/jfrog/jfrog-cli",
66
"preferGlobal": true,

build/npm/v2/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/npm/v2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jfrog-cli-v2",
3-
"version": "2.71.5",
3+
"version": "2.72.0",
44
"description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸",
55
"homepage": "https://github.com/jfrog/jfrog-cli",
66
"preferGlobal": true,

buildtools/cli.go

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,18 @@ func NugetCmd(c *cli.Context) error {
566566
return err
567567
}
568568

569+
allowInsecureConnection, err := cliutils.ExtractBoolFlagFromArgs(&filteredNugetArgs, "allow-insecure-connections")
570+
if err != nil {
571+
return err
572+
}
573+
569574
nugetCmd := dotnet.NewNugetCommand()
570-
nugetCmd.SetServerDetails(rtDetails).SetRepoName(targetRepo).SetBuildConfiguration(buildConfiguration).
571-
SetBasicCommand(filteredNugetArgs[0]).SetUseNugetV2(useNugetV2)
575+
nugetCmd.SetServerDetails(rtDetails).
576+
SetRepoName(targetRepo).
577+
SetBuildConfiguration(buildConfiguration).
578+
SetBasicCommand(filteredNugetArgs[0]).
579+
SetUseNugetV2(useNugetV2).
580+
SetAllowInsecureConnections(allowInsecureConnection)
572581
// Since we are using the values of the command's arguments and flags along the buildInfo collection process,
573582
// we want to separate the actual NuGet basic command (restore/build...) from the arguments and flags
574583
if len(filteredNugetArgs) > 1 {
@@ -604,10 +613,15 @@ func DotnetCmd(c *cli.Context) error {
604613
return err
605614
}
606615

616+
allowInsecureConnection, err := cliutils.ExtractBoolFlagFromArgs(&filteredDotnetArgs, "allow-insecure-connections")
617+
if err != nil {
618+
return err
619+
}
620+
607621
// Run command.
608622
dotnetCmd := dotnet.NewDotnetCoreCliCommand()
609623
dotnetCmd.SetServerDetails(rtDetails).SetRepoName(targetRepo).SetBuildConfiguration(buildConfiguration).
610-
SetBasicCommand(filteredDotnetArgs[0]).SetUseNugetV2(useNugetV2)
624+
SetBasicCommand(filteredDotnetArgs[0]).SetUseNugetV2(useNugetV2).SetAllowInsecureConnections(allowInsecureConnection)
611625
// Since we are using the values of the command's arguments and flags along the buildInfo collection process,
612626
// we want to separate the actual .NET basic command (restore/build...) from the arguments and flags
613627
if len(filteredDotnetArgs) > 1 {

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ require (
1616
github.com/docker/docker v27.3.1+incompatible
1717
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
1818
github.com/jfrog/archiver/v3 v3.6.1
19-
github.com/jfrog/build-info-go v1.10.5
19+
github.com/jfrog/build-info-go v1.10.6
2020
github.com/jfrog/gofrog v1.7.6
2121
github.com/jfrog/jfrog-cli-artifactory v0.1.7
22-
github.com/jfrog/jfrog-cli-core/v2 v2.56.8
22+
github.com/jfrog/jfrog-cli-core/v2 v2.57.0
2323
github.com/jfrog/jfrog-cli-platform-services v1.4.0
24-
github.com/jfrog/jfrog-cli-security v1.12.5
25-
github.com/jfrog/jfrog-client-go v1.48.0
24+
github.com/jfrog/jfrog-cli-security v1.13.2
25+
github.com/jfrog/jfrog-client-go v1.48.1
2626
github.com/jszwec/csvutil v1.10.0
2727
github.com/manifoldco/promptui v0.9.0
2828
github.com/stretchr/testify v1.9.0
@@ -167,12 +167,12 @@ require (
167167
gopkg.in/yaml.v3 v3.0.1 // indirect
168168
)
169169

170-
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241113152357-24197a744331
170+
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241121163158-04daeb8132c3
171171

172-
// replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.12.5-0.20241107141149-42cf964808a1
172+
// replace github.com/jfrog/jfrog-cli-security => github.com/EyalDelarea/jfrog-cli-security v0.0.0-20241121103043-02719f295f02
173173

174174
// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240918081224-1c584cc334c7
175175

176-
// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20240918150101-ad5b10435a12
176+
// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20241121100855-e7a75ceee2bd
177177

178178
// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog dev

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ github.com/jedib0t/go-pretty/v6 v6.6.1 h1:iJ65Xjb680rHcikRj6DSIbzCex2huitmc7bDtx
161161
github.com/jedib0t/go-pretty/v6 v6.6.1/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
162162
github.com/jfrog/archiver/v3 v3.6.1 h1:LOxnkw9pOn45DzCbZNFV6K0+6dCsQ0L8mR3ZcujO5eI=
163163
github.com/jfrog/archiver/v3 v3.6.1/go.mod h1:VgR+3WZS4N+i9FaDwLZbq+jeU4B4zctXL+gL4EMzfLw=
164-
github.com/jfrog/build-info-go v1.10.5 h1:cW03JlPlKv7RMUU896uLUxyLWXAmCgR5Y5QX0fwgz0Q=
165-
github.com/jfrog/build-info-go v1.10.5/go.mod h1:JcISnovFXKx3wWf3p1fcMmlPdt6adxScXvoJN4WXqIE=
164+
github.com/jfrog/build-info-go v1.10.6 h1:zH1ZhXlVfi5DlFyunygHjrdOcnv5qxfeLqmsfD4+lc4=
165+
github.com/jfrog/build-info-go v1.10.6/go.mod h1:JcISnovFXKx3wWf3p1fcMmlPdt6adxScXvoJN4WXqIE=
166166
github.com/jfrog/froggit-go v1.16.2 h1:F//S83iXH14qsCwYzv0zB2JtjS2pJVEsUoEmYA+37dQ=
167167
github.com/jfrog/froggit-go v1.16.2/go.mod h1:5VpdQfAcbuyFl9x/x8HGm7kVk719kEtW/8YJFvKcHPA=
168168
github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s=
@@ -171,14 +171,14 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
171171
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
172172
github.com/jfrog/jfrog-cli-artifactory v0.1.7 h1:/PBDO6nS6cf3PK+GRkd6BJtZnvYasi1PrQhRiayirso=
173173
github.com/jfrog/jfrog-cli-artifactory v0.1.7/go.mod h1:M5pZTHnsYNDmml/FAnoxxt4QiHOIUHPx91th30AtwfM=
174-
github.com/jfrog/jfrog-cli-core/v2 v2.56.8 h1:UexulAwRVN20VmYACijkTFYKqtUq5myE4okEgmUrorw=
175-
github.com/jfrog/jfrog-cli-core/v2 v2.56.8/go.mod h1:RY74eDpw1WBxruSfZ0HO1ax7c1NAj+rbBgA/hVOJNME=
174+
github.com/jfrog/jfrog-cli-core/v2 v2.57.0 h1:3ON0J6Sjc2+4HZrzh4eSbdciXx3sJsJUIJ3TPQXh/5c=
175+
github.com/jfrog/jfrog-cli-core/v2 v2.57.0/go.mod h1:SThaC/fniC96oN8YgCsHjvOxp5rBM7IppuIybn1oxT0=
176176
github.com/jfrog/jfrog-cli-platform-services v1.4.0 h1:g6A30+tOfXd1h6VASeNwH+5mhs5bPQJ0MFzZs/4nlvs=
177177
github.com/jfrog/jfrog-cli-platform-services v1.4.0/go.mod h1:Ky4SDXuMeaiNP/5zMT1YSzIuXG+cNYYOl8BaEA7Awbc=
178-
github.com/jfrog/jfrog-cli-security v1.12.5 h1:2JHPyapXuHQw/qEaElGxBUGrJCZlVFLXDdxkqhf10vE=
179-
github.com/jfrog/jfrog-cli-security v1.12.5/go.mod h1:5LBGwth7TXkEH8MO0JJXvpoRktMAV2BK7Q5nQePNrv4=
180-
github.com/jfrog/jfrog-client-go v1.48.0 h1:hx5B7+Wnobmzq4aFVZtALtbEVDFcjpn0Wb4q2m6H4KU=
181-
github.com/jfrog/jfrog-client-go v1.48.0/go.mod h1:1a7bmQHkRmPEza9wva2+WVrYzrGbosrMymq57kyG5gU=
178+
github.com/jfrog/jfrog-cli-security v1.13.2 h1:60WO6PjtIQz/21EzggDzUoeK6ScDrNAYXA0k1cqcZqQ=
179+
github.com/jfrog/jfrog-cli-security v1.13.2/go.mod h1:0oEKO2/vVvBC3m9SSWcKx4tWG6sPmvy4Mn4RD2zlSEQ=
180+
github.com/jfrog/jfrog-client-go v1.48.1 h1:R6x6gazy0F196XXDhDdRAxmNplSJ5SrJfEmmNBgks/8=
181+
github.com/jfrog/jfrog-client-go v1.48.1/go.mod h1:1a7bmQHkRmPEza9wva2+WVrYzrGbosrMymq57kyG5gU=
182182
github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI=
183183
github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I=
184184
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=

lifecycle/cli.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ func validateCreateReleaseBundleContext(c *cli.Context) error {
127127
return cliutils.WrongNumberOfArgumentsHandler(c)
128128
}
129129

130-
if err := assertSigningKeyProvided(c); err != nil {
131-
return err
132-
}
133-
134130
return assertValidCreationMethod(c)
135131
}
136132

@@ -188,10 +184,6 @@ func promote(c *cli.Context) error {
188184
return cliutils.WrongNumberOfArgumentsHandler(c)
189185
}
190186

191-
if err := assertSigningKeyProvided(c); err != nil {
192-
return err
193-
}
194-
195187
lcDetails, err := createLifecycleDetailsByFlags(c)
196188
if err != nil {
197189
return err
@@ -358,13 +350,6 @@ func validateDistributeCommand(c *cli.Context) error {
358350
return nil
359351
}
360352

361-
func assertSigningKeyProvided(c *cli.Context) error {
362-
if c.String(cliutils.SigningKey) == "" {
363-
return errorutils.CheckErrorf("the --%s option is mandatory", cliutils.SigningKey)
364-
}
365-
return nil
366-
}
367-
368353
func createLifecycleDetailsByFlags(c *cli.Context) (*coreConfig.ServerDetails, error) {
369354
lcDetails, err := cliutils.CreateServerDetailsWithConfigOffer(c, true, commonCliUtils.Platform)
370355
if err != nil {

lifecycle/cli_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ func TestValidateCreateReleaseBundleContext(t *testing.T) {
2121
{"extraArgs", []string{"one", "two", "three", "four"}, []string{}, true},
2222
{"bothSources", []string{"one", "two", "three"}, []string{cliutils.Builds + "=/path/to/file", cliutils.ReleaseBundles + "=/path/to/file"}, true},
2323
{"noSources", []string{"one", "two", "three"}, []string{}, true},
24-
{"builds without signing key", []string{"name", "version"}, []string{cliutils.Builds + "=/path/to/file"}, true},
24+
{"builds without signing key", []string{"name", "version"}, []string{cliutils.Builds + "=/path/to/file"}, false},
2525
{"builds correct", []string{"name", "version"}, []string{
2626
cliutils.Builds + "=/path/to/file", cliutils.SigningKey + "=key"}, false},
27-
{"releaseBundles without signing key", []string{"name", "version", "env"}, []string{cliutils.ReleaseBundles + "=/path/to/file"}, true},
27+
{"releaseBundles without signing key", []string{"name", "version"}, []string{cliutils.ReleaseBundles + "=/path/to/file"}, false},
2828
{"releaseBundles correct", []string{"name", "version"}, []string{
2929
cliutils.ReleaseBundles + "=/path/to/file", cliutils.SigningKey + "=key"}, false},
3030
{"spec without signing key", []string{"name", "version", "env"}, []string{"spec=/path/to/file"}, true},

lifecycle_test.go

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ import (
2929
)
3030

3131
const (
32-
artifactoryLifecycleMinVersion = "7.68.3"
33-
gpgKeyPairName = "lc-tests-key-pair"
34-
lcTestdataPath = "lifecycle"
35-
releaseBundlesSpec = "release-bundles-spec.json"
36-
buildsSpec12 = "builds-spec-1-2.json"
37-
buildsSpec3 = "builds-spec-3.json"
38-
prodEnvironment = "PROD"
39-
number1, number2, number3 = "111", "222", "333"
32+
artifactoryLifecycleMinVersion = "7.68.3"
33+
signingKeyOptionalArtifactoryMinVersion = "7.101.1"
34+
gpgKeyPairName = "lc-tests-key-pair"
35+
lcTestdataPath = "lifecycle"
36+
releaseBundlesSpec = "release-bundles-spec.json"
37+
buildsSpec12 = "builds-spec-1-2.json"
38+
buildsSpec3 = "builds-spec-3.json"
39+
prodEnvironment = "PROD"
40+
number1, number2, number3 = "111", "222", "333"
41+
withoutSigningKey = true
4042
)
4143

4244
var (
@@ -45,7 +47,7 @@ var (
4547
)
4648

4749
func TestBackwardCompatibleReleaseBundleCreation(t *testing.T) {
48-
cleanCallback := initLifecycleTest(t)
50+
cleanCallback := initLifecycleTest(t, artifactoryLifecycleMinVersion)
4951
defer cleanCallback()
5052
lcManager := getLcServiceManager(t)
5153

@@ -87,30 +89,39 @@ func compareRbArtifacts(t *testing.T, actual services.ReleaseBundleSpecResponse,
8789
}
8890

8991
func TestReleaseBundleCreationFromAql(t *testing.T) {
90-
testReleaseBundleCreation(t, tests.UploadDevSpecA, tests.LifecycleAql, tests.GetExpectedLifecycleCreationByAql())
92+
testReleaseBundleCreation(t, tests.UploadDevSpecA, tests.LifecycleAql, tests.GetExpectedLifecycleCreationByAql(), false)
9193
}
9294

9395
func TestReleaseBundleCreationFromArtifacts(t *testing.T) {
94-
testReleaseBundleCreation(t, tests.UploadDevSpec, tests.LifecycleArtifacts, tests.GetExpectedLifecycleCreationByArtifacts())
96+
testReleaseBundleCreation(t, tests.UploadDevSpec, tests.LifecycleArtifacts, tests.GetExpectedLifecycleCreationByArtifacts(), false)
9597
}
9698

97-
func testReleaseBundleCreation(t *testing.T, uploadSpec, creationSpec string, expected []string) {
98-
cleanCallback := initLifecycleTest(t)
99-
defer cleanCallback()
100-
lcManager := getLcServiceManager(t)
99+
func TestReleaseBundleCreationFromArtifactsWithoutSigningKey(t *testing.T) {
100+
testReleaseBundleCreation(t, tests.UploadDevSpec, tests.LifecycleArtifacts, tests.GetExpectedLifecycleCreationByArtifacts(), withoutSigningKey)
101+
}
102+
103+
func testReleaseBundleCreation(t *testing.T, uploadSpec, creationSpec string, expected []string, withoutSigningKey bool) {
104+
if withoutSigningKey {
105+
cleanCallback := initLifecycleTest(t, signingKeyOptionalArtifactoryMinVersion)
106+
defer cleanCallback()
107+
} else {
108+
cleanCallback := initLifecycleTest(t, artifactoryLifecycleMinVersion)
109+
defer cleanCallback()
110+
}
101111

112+
lcManager := getLcServiceManager(t)
102113
specFile, err := tests.CreateSpec(uploadSpec)
103114
assert.NoError(t, err)
104115
runRt(t, "upload", "--spec="+specFile)
105116

106-
createRbFromSpec(t, creationSpec, tests.LcRbName1, number1, true)
117+
createRbFromSpec(t, creationSpec, tests.LcRbName1, number1, true, withoutSigningKey)
107118
defer deleteReleaseBundle(t, lcManager, tests.LcRbName1, number1)
108119

109120
assertRbArtifacts(t, lcManager, tests.LcRbName1, number1, expected)
110121
}
111122

112123
func TestLifecycleFullFlow(t *testing.T) {
113-
cleanCallback := initLifecycleTest(t)
124+
cleanCallback := initLifecycleTest(t, signingKeyOptionalArtifactoryMinVersion)
114125
defer cleanCallback()
115126
lcManager := getLcServiceManager(t)
116127

@@ -119,17 +130,17 @@ func TestLifecycleFullFlow(t *testing.T) {
119130
defer deleteBuilds()
120131

121132
// Create release bundle from builds synchronously.
122-
createRbFromSpec(t, tests.LifecycleBuilds12, tests.LcRbName1, number1, true)
133+
createRbFromSpec(t, tests.LifecycleBuilds12, tests.LcRbName1, number1, true, false)
123134
defer deleteReleaseBundle(t, lcManager, tests.LcRbName1, number1)
124135

125136
// Create release bundle from a build asynchronously and assert status.
126137
// This build has dependencies which are included in the release bundle.
127-
createRbFromSpec(t, tests.LifecycleBuilds3, tests.LcRbName2, number2, false)
138+
createRbFromSpec(t, tests.LifecycleBuilds3, tests.LcRbName2, number2, false, false)
128139
defer deleteReleaseBundle(t, lcManager, tests.LcRbName2, number2)
129140
assertStatusCompleted(t, lcManager, tests.LcRbName2, number2, "")
130141

131142
// Create a combined release bundle from the two previous release bundle.
132-
createRbFromSpec(t, tests.LifecycleReleaseBundles, tests.LcRbName3, number3, true)
143+
createRbFromSpec(t, tests.LifecycleReleaseBundles, tests.LcRbName3, number3, true, false)
133144
defer deleteReleaseBundle(t, lcManager, tests.LcRbName3, number3)
134145

135146
// Promote the last release bundle to prod repo 1.
@@ -161,7 +172,7 @@ func TestLifecycleFullFlow(t *testing.T) {
161172

162173
// Import bundles only work on onPerm platforms
163174
func TestImportReleaseBundle(t *testing.T) {
164-
cleanCallback := initLifecycleTest(t)
175+
cleanCallback := initLifecycleTest(t, artifactoryLifecycleMinVersion)
165176
defer cleanCallback()
166177
wd, err := os.Getwd()
167178
assert.NoError(t, err)
@@ -195,22 +206,25 @@ func uploadBuilds(t *testing.T) func() {
195206
func createRbBackwardCompatible(t *testing.T, specName, sourceOption, rbName, rbVersion string, sync bool) {
196207
specFile, err := getSpecFile(specName)
197208
assert.NoError(t, err)
198-
createRb(t, specFile, sourceOption, rbName, rbVersion, sync)
209+
createRb(t, specFile, sourceOption, rbName, rbVersion, sync, false)
199210
}
200211

201-
func createRbFromSpec(t *testing.T, specName, rbName, rbVersion string, sync bool) {
212+
func createRbFromSpec(t *testing.T, specName, rbName, rbVersion string, sync bool, withoutSigningKey bool) {
202213
specFile, err := tests.CreateSpec(specName)
203214
assert.NoError(t, err)
204-
createRb(t, specFile, "spec", rbName, rbVersion, sync)
215+
createRb(t, specFile, "spec", rbName, rbVersion, sync, withoutSigningKey)
205216
}
206217

207-
func createRb(t *testing.T, specFilePath, sourceOption, rbName, rbVersion string, sync bool) {
218+
func createRb(t *testing.T, specFilePath, sourceOption, rbName, rbVersion string, sync bool, withoutSigningKey bool) {
208219
argsAndOptions := []string{
209220
"rbc",
210221
rbName,
211222
rbVersion,
212223
getOption(sourceOption, specFilePath),
213-
getOption(cliutils.SigningKey, gpgKeyPairName),
224+
}
225+
226+
if !withoutSigningKey {
227+
argsAndOptions = append(argsAndOptions, getOption(cliutils.SigningKey, gpgKeyPairName))
214228
}
215229
// Add the --sync option only if requested, to test the default value.
216230
if sync {
@@ -363,11 +377,12 @@ func uploadBuildWithDeps(t *testing.T, buildName, buildNumber string) {
363377
runRt(t, "build-publish", buildName, buildNumber)
364378
}
365379

366-
func initLifecycleTest(t *testing.T) (cleanCallback func()) {
380+
func initLifecycleTest(t *testing.T, minVersion string) (cleanCallback func()) {
367381
if !*tests.TestLifecycle {
368382
t.Skip("Skipping lifecycle test. To run release bundle test add the '-test.lc=true' option.")
369383
}
370-
validateArtifactoryVersion(t, artifactoryLifecycleMinVersion)
384+
385+
validateArtifactoryVersion(t, minVersion)
371386

372387
if !isLifecycleSupported(t) {
373388
t.Skip("Skipping lifecycle test because the functionality is not enabled on the provided JPD.")

nuget_test.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func TestNuGetWithGlobalConfig(t *testing.T) {
107107
assert.NoError(t, err)
108108
err = createConfigFileForTest([]string{jfrogHomeDir}, tests.NugetRemoteRepo, "", t, project.Nuget, true)
109109
assert.NoError(t, err)
110+
// allow insecure connection for testings to work with localhost server
110111
testNugetCmd(t, projectPath, tests.NuGetBuildName, "1", []string{"packagesconfig"}, []string{"nuget", "restore"}, []int{6})
111112

112113
cleanTestsHomeEnv()
@@ -117,7 +118,10 @@ func testNugetCmd(t *testing.T, projectPath, buildName, buildNumber string, expe
117118
assert.NoError(t, err, "Failed to get current dir")
118119
chdirCallback := clientTestUtils.ChangeDirWithCallback(t, wd, projectPath)
119120
defer chdirCallback()
121+
122+
allowInsecureConnectionForTests(&args)
120123
args = append(args, "--build-name="+buildName, "--build-number="+buildNumber)
124+
121125
err = runNuGet(t, args...)
122126
if err != nil {
123127
return
@@ -152,6 +156,12 @@ func testNugetCmd(t *testing.T, projectPath, buildName, buildNumber string, expe
152156
inttestutils.DeleteBuild(serverDetails.ArtifactoryUrl, buildName, artHttpDetails)
153157
}
154158

159+
// Add allow insecure connection for testings to work with localhost server
160+
func allowInsecureConnectionForTests(args *[]string) *[]string {
161+
*args = append(*args, "--allow-insecure-connections")
162+
return args
163+
}
164+
155165
func assertNugetDependencies(t *testing.T, module buildInfo.Module, moduleName string) {
156166
for _, dependency := range module.Dependencies {
157167
switch dependency.Id {
@@ -224,10 +234,11 @@ func runInitNewConfig(t *testing.T, testSuite testInitNewConfigDescriptor, baseR
224234
params := &dotnet.DotnetCommand{}
225235
server := &config.ServerDetails{ArtifactoryUrl: baseRtUrl, User: "user", Password: "password"}
226236
params.SetServerDetails(server).
227-
SetUseNugetV2(testSuite.useNugetV2)
228-
// Prepare the config file with NuGet authentication
237+
SetUseNugetV2(testSuite.useNugetV2).
238+
SetAllowInsecureConnections(true)
229239

230-
configFile, err := dotnet.InitNewConfig(tempDirPath, "", server, testSuite.useNugetV2)
240+
// Prepare the config file with NuGet authentication
241+
configFile, err := dotnet.InitNewConfig(tempDirPath, "", server, testSuite.useNugetV2, true)
231242
if err != nil {
232243
assert.NoError(t, err)
233244
return

utils/cliutils/cli_consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "time"
44

55
const (
66
// General CLI constants
7-
CliVersion = "2.71.5"
7+
CliVersion = "2.72.0"
88
ClientAgent = "jfrog-cli-go"
99

1010
// CLI base commands constants:

0 commit comments

Comments
 (0)