You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-07-13 01:30:24 +02:00
feat(config): read config/defaults with authentication (#2975)
* feat(config):read config/defaults with authentication This change allows to use defaults and config files from a protected GitHub repository. The options `--customConfig` and `--defaultConfig` already allowed to provide a link to an uprotected file. Now, by passing a value in the form `<hostname>:<token>` to parameter `gitHubTokens` (this parameter can be passed multiple times) a token can be provided for dedicated hosts. This makes it possible to use a link like `https://api.github.com/repos/SAP/jenkins-library/contents/resources/my-defaults.yml?ref=master` as reference to a default file or similarly as reference to a configuration file. * update generation to allow protected config/defaults * fix CodeClimate issues * update missing generations
This commit is contained in:
@ -43,6 +43,8 @@ func NpmExecuteScriptsCommand() *cobra.Command {
|
||||
log.SetStepName(STEP_NAME)
|
||||
log.SetVerbose(GeneralConfig.Verbose)
|
||||
|
||||
GeneralConfig.GitHubAccessTokens = ResolveAccessTokens(GeneralConfig.GitHubTokens)
|
||||
|
||||
path, _ := os.Getwd()
|
||||
fatalHook := &log.FatalHook{CorrelationID: GeneralConfig.CorrelationID, Path: path}
|
||||
log.RegisterHook(fatalHook)
|
||||
|
Reference in New Issue
Block a user