File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -565,12 +565,22 @@ func syncFindParentImageOptions() error {
565
565
skipSignature := false
566
566
switch kola .Options .Distribution {
567
567
case "fcos" :
568
- // We're taking liberal shortcuts here... the cleaner way to do this is
569
- // parse commitmeta.json for `fedora-coreos.stream`
570
- if kola .CosaBuild .Meta .BuildRef == "" {
571
- return errors .New ("no ref in build metadata" )
568
+ var stream string
569
+ if kola .CosaBuild .Meta .CosaImportedOciImage {
570
+ s , ok := kola .CosaBuild .Meta .OciLabels ["fedora-coreos.stream" ]
571
+ if ! ok {
572
+ return errors .New ("label 'fedora-coreos.stream' not found in build metadata" )
573
+ }
574
+ stream = string (s )
575
+ } else {
576
+ // We still support this legacy hack for now, but eventually when we're
577
+ // confident that latest kola doesn't need to handle builds built with the
578
+ // legacy path, we can remove this code.
579
+ if kola .CosaBuild .Meta .BuildRef == "" {
580
+ return errors .New ("no ref in build metadata" )
581
+ }
582
+ stream = filepath .Base (kola .CosaBuild .Meta .BuildRef )
572
583
}
573
- stream := filepath .Base (kola .CosaBuild .Meta .BuildRef )
574
584
parentBaseURL , err = getParentFcosBuildBase (stream )
575
585
if err != nil {
576
586
return err
You can’t perform that action at this time.
0 commit comments