mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
feat: Add debug output to getConfig (#3341)
* Fix Orchestrator detection * Add unit tests * Add debug output to getConfig * Update getConfig.go * fix whitespaces Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
This commit is contained in:
parent
b213af1089
commit
b760bf48e7
@ -130,6 +130,7 @@ func getConfig() (config.StepConfig, error) {
|
||||
if GeneralConfig.MetaDataResolver == nil {
|
||||
GeneralConfig.MetaDataResolver = GetAllStepMetadata
|
||||
}
|
||||
log.Entry().Debugf("Trying to resolve metadata for step %s out of all metadata: %v", configOptions.stepName, GeneralConfig.MetaDataResolver())
|
||||
metadata, err := config.ResolveMetadata(GeneralConfig.GitHubAccessTokens, GeneralConfig.MetaDataResolver, configOptions.stepMetadata, configOptions.stepName)
|
||||
if err != nil {
|
||||
return stepConfig, errors.Wrapf(err, "failed to resolve metadata")
|
||||
|
@ -501,6 +501,7 @@ func ResolveMetadata(gitHubTokens map[string]string, metaDataResolver func() map
|
||||
}
|
||||
} else {
|
||||
if stepName != "" {
|
||||
log.Entry().Debugf("Resolving metadata for step: %s", stepName)
|
||||
if metaDataResolver == nil {
|
||||
return metadata, errors.New("metaDataResolver is nil")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user