Skip to content

Commit

Permalink
Merge pull request openshift#1647 from stevekuznetsov/skuznets/ignore…
Browse files Browse the repository at this point in the history
…-version

config/load: do something with the VERSION file
  • Loading branch information
openshift-merge-robot authored Jan 27, 2021
2 parents 9f82687 + 702435e commit dfca211
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"golang.org/x/sync/errgroup"

utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/test-infra/prow/config"
"sigs.k8s.io/yaml"

"github.com/openshift/ci-tools/pkg/api"
Expand Down Expand Up @@ -363,6 +364,10 @@ func Registry(root string, flat bool) (registry.ReferenceByName, registry.ChainB
observers[observer.Observer.Name] = observer.Observer.Observer
} else if strings.HasSuffix(path, CommandsSuffix) {
// ignore
} else if filepath.Base(path) == config.ConfigVersionFileName {
if version, err := ioutil.ReadFile(path); err == nil {
logrus.WithField("version", string(version)).Info("Resolved configuration version")
}
} else {
return fmt.Errorf("invalid file name: %s", path)
}
Expand Down

0 comments on commit dfca211

Please sign in to comment.