Skip to content

Commit 399f685

Browse files
replaced group with realtime name
1 parent 47e6820 commit 399f685

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pkg/buildtest/run.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,11 @@ func DoRun(originalIndy, targetIndy, indyProxyUrl, migrateTargetIndy, packageTyp
4141
if migrateEnabled {
4242
migrateTargetIndyHost, _ := common.ValidateTargetIndyOrExit(migrateTargetIndy)
4343
fmt.Printf("Migrate to host %s", migrateTargetIndyHost)
44-
} else {
45-
// Prepare the indy repos for the whole testing
46-
buildMeta := decideMeta(packageType)
47-
if !prepareIndyRepos("http://"+targetIndyHost, newBuildName, *buildMeta, additionalRepos, dryRun) {
48-
os.Exit(1)
49-
}
44+
}
45+
// Prepare the indy repos for the whole testing
46+
buildMeta := decideMeta(packageType)
47+
if !prepareIndyRepos("http://"+targetIndyHost, newBuildName, *buildMeta, additionalRepos, dryRun) {
48+
os.Exit(1)
5049
}
5150

5251
trackingId := foloTrackContent.TrackingKey.Id
@@ -97,7 +96,7 @@ func DoRun(originalIndy, targetIndy, indyProxyUrl, migrateTargetIndy, packageTyp
9796

9897
if migrateEnabled {
9998
migrateTargetIndyHost, _ := common.ValidateTargetIndyOrExit(migrateTargetIndy)
100-
migrateArtifacts := prepareMigrateEntriesByFolo(targetIndy, migrateTargetIndyHost, packageType, foloTrackContent)
99+
migrateArtifacts := prepareMigrateEntriesByFolo(targetIndy, migrateTargetIndyHost, packageType, newBuildName, foloTrackContent)
101100
fmt.Printf("Waiting 60s...\n")
102101
time.Sleep(60 * time.Second) // wait for Indy event handled
103102
for _, down := range migrateArtifacts {
@@ -255,7 +254,7 @@ func prepareDownloadEntriesByFolo(targetIndyURL, newBuildId, packageType string,
255254
}
256255

257256
func prepareMigrateEntriesByFolo(targetIndyURL, migrateTargetIndyHost, packageType string,
258-
foloRecord common.TrackedContent) map[string][]string {
257+
newBuildId, foloRecord common.TrackedContent) map[string][]string {
259258
targetIndy := normIndyURL(targetIndyURL)
260259
result := make(map[string][]string)
261260
for _, down := range foloRecord.Downloads {
@@ -269,7 +268,7 @@ func prepareMigrateEntriesByFolo(targetIndyURL, migrateTargetIndyHost, packageTy
269268
if !strings.HasPrefix(down.StoreKey, packageType) {
270269
p = path.Join("api/content", repoPath, down.Path)
271270
} else {
272-
p = path.Join("api/content", packageType, "group/build-test-91388", down.Path)
271+
p = path.Join("api/content", packageType, "group", newBuildId, down.Path)
273272
}
274273
}
275274

0 commit comments

Comments
 (0)