@@ -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
257256func 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