1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

fix: use correct metadata resolver (#3342)

* fix something

* add default metadata resolver

Co-authored-by: ffeldmann <f.feldmann@sap.com>
This commit is contained in:
Christopher Fenner 2021-12-07 15:54:59 +01:00 committed by GitHub
parent 79f7ccd0f5
commit d0762f5db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,10 @@ func getConfig() (config.StepConfig, error) {
} else { } else {
log.Entry().Infof("Printing stepName %s", configOptions.stepName) log.Entry().Infof("Printing stepName %s", configOptions.stepName)
metadata, err := config.ResolveMetadata(GeneralConfig.GitHubAccessTokens, GetAllStepMetadata, configOptions.stepMetadata, configOptions.stepName) if GeneralConfig.MetaDataResolver == nil {
GeneralConfig.MetaDataResolver = GetAllStepMetadata
}
metadata, err := config.ResolveMetadata(GeneralConfig.GitHubAccessTokens, GeneralConfig.MetaDataResolver, configOptions.stepMetadata, configOptions.stepName)
if err != nil { if err != nil {
return stepConfig, errors.Wrapf(err, "failed to resolve metadata") return stepConfig, errors.Wrapf(err, "failed to resolve metadata")
} }