public final class RegistryHelper extends Object
| Constructor and Description |
|---|
RegistryHelper(List<NPMRegistry> registries) |
| Modifier and Type | Method and Description |
|---|---|
String |
calculatePrefix(String registryURL) |
String |
compose(String registryPrefix,
String setting) |
String |
fillRegistry(String npmrcContent,
Map<String,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> registry2Credentials)
Fill the npmpc user config with the given registries.
|
Map<String,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> |
resolveCredentials(hudson.model.Run<?,?> build)
Resolves all registry credentials and returns a map paring registry URL
to credential.
|
public RegistryHelper(@CheckForNull List<NPMRegistry> registries)
public Map<String,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> resolveCredentials(hudson.model.Run<?,?> build)
build - a build being runpublic String fillRegistry(String npmrcContent, Map<String,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials> registry2Credentials)
npmrcContent - .npmrc user configregistry2Credentials - the credentials to be inserted into the user
config (key: registry URL, value: Jenkins credentials)npmrcContent with the registry
credentials addedCopyright © 2016–2017. All rights reserved.