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

Fix: Missing artifacts in "BuildInfo" when uploading identical artifacts with different target path #1552

Merged
merged 3 commits into from
Jun 6, 2022
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
20 changes: 20 additions & 0 deletions artifactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,26 @@ func TestArtifactoryDeletePropertiesWithExclusions(t *testing.T) {
cleanArtifactoryTest()
}

func TestArtifactoryUploadOneArtifactToMultipleLocation(t *testing.T) {
initArtifactoryTest(t, "")
buildNumber := "333"
runRt(t, "upload", "testdata/a/a1.in", tests.RtRepo1, "--build-name="+tests.RtBuildName1, "--build-number="+buildNumber)
runRt(t, "upload", "testdata/a/a1.in", tests.RtRepo1+"/root/", "--build-name="+tests.RtBuildName1, "--build-number="+buildNumber)
// Publish buildInfo
runRt(t, "build-publish", tests.RtBuildName1, buildNumber)
publishedBuildInfo, found, err := tests.GetBuildInfo(serverDetails, tests.RtBuildName1, buildNumber)
if err != nil {
assert.NoError(t, err)
return
}
if !found {
assert.True(t, found, "build info was expected to be found")
return
}
assert.Equal(t, 2, len(publishedBuildInfo.BuildInfo.Modules[0].Artifacts))
cleanArtifactoryTest()
}

func TestArtifactoryUploadFromHomeDir(t *testing.T) {
initArtifactoryTest(t, "")
testFileRel, testFileAbs := createFileInHomeDir(t, "cliTestFile.txt")
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ require (
gopkg.in/yaml.v3 v3.0.0 // indirect
)

// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.2.7-0.20220524180534-919432fc5785
replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.13.2-0.20220606063419-74332a39e430

// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.13.2-0.20220526210458-b2f3881d8e25
replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.2.7-0.20220606063153-46b4aaf4d455

// replace github.com/jfrog/jfrog-cli-core/v2 => /Users/eyalb/dev/forks/jfrog-cli-core
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.15.3-0.20220606064015-b5073f9a4db9
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i
github.com/jedib0t/go-pretty/v6 v6.3.0 h1:QQ5yZPDUMEjbZRXDJtZlvwfDQqCYFaxV3yEzTkogUgk=
github.com/jedib0t/go-pretty/v6 v6.3.0/go.mod h1:FMkOpgGD3EZ91cW8g/96RfxoV7bdeJyzXPYgz1L1ln0=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jfrog/build-info-go v1.2.6 h1:Ul1bQ8bv7hZdIZ4w0fysXHnZNABbYz8boKvA8OnBNR0=
github.com/jfrog/build-info-go v1.2.6/go.mod h1:/o44xAZfSGbMRWSG1SwmtqcZ9g4a5H8wQMsgjahFiSs=
github.com/jfrog/build-info-go v1.2.7-0.20220606063153-46b4aaf4d455 h1:lFljvDsHgkaoQ35ZOGAjH6Q1ywCIccwMelrm5QvtloU=
github.com/jfrog/build-info-go v1.2.7-0.20220606063153-46b4aaf4d455/go.mod h1:/o44xAZfSGbMRWSG1SwmtqcZ9g4a5H8wQMsgjahFiSs=
github.com/jfrog/gofrog v1.1.1 h1:uRjeZWidQl4FmKP4Zpj5hSKJp3gSIWW9VUwbQdVEVRU=
github.com/jfrog/gofrog v1.1.1/go.mod h1:9YN5v4LlsCfLIXpwQnzSf1wVtgjdHM20FzuIu58RMI4=
github.com/jfrog/jfrog-cli-core/v2 v2.15.2 h1:AjarJJzHQBUfZTq7BVFDmrdfdwL/bW+4sW3csHHM6bY=
github.com/jfrog/jfrog-cli-core/v2 v2.15.2/go.mod h1:l4KSAJLflqaYV3FKXdZCML9tFlrElO+S23K43W6FyxU=
github.com/jfrog/jfrog-client-go v1.13.1 h1:6f1Y9+VHcE6uod4jbEU6Q29ro22Or0tYSGzUa6TTHLs=
github.com/jfrog/jfrog-client-go v1.13.1/go.mod h1:97A832qf/UzPKG3ZpxzOSycyiLWiTBw6uEGZ4pyfL18=
github.com/jfrog/jfrog-cli-core/v2 v2.15.3-0.20220606064015-b5073f9a4db9 h1:TPER7CDWm3k86nNZOYUh8UOkU3KzLV8amddvPEVSmWg=
github.com/jfrog/jfrog-cli-core/v2 v2.15.3-0.20220606064015-b5073f9a4db9/go.mod h1:AYhQTokJ4oIREyyzC15gpYWxZzs3mSaK3FzgX+NVF/8=
github.com/jfrog/jfrog-client-go v1.13.2-0.20220606063419-74332a39e430 h1:YkncPri11Q1OzHdwqKMppj9+zmeO4//m1O2dXv0rg7M=
github.com/jfrog/jfrog-client-go v1.13.2-0.20220606063419-74332a39e430/go.mod h1:YMQg8b69lyNOxqHyRqnKloWr2nbi6fy2H7BMe3wue/0=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
Expand Down