Class Migrator
- java.lang.Object
-
- org.jenkinsci.plugins.github.migration.Migrator
-
public class Migrator extends Object
Helper class incapsulates migration process from old configs to new ones After 1.12.0 this plugin usesGitHubPlugin
to store all global configuration instead of push trigger descriptor- Since:
- 1.13.0
- Author:
- lanwen (Merkushev Kirill)
-
-
Constructor Summary
Constructors Constructor Description Migrator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
enableAliases()
Simplifies long node names in config filesstatic void
enableCompatibilityAliases()
Enable xml migration from deprecated nodes to new Can be used for example as Jenkins.XSTREAM2.addCompatibilityAlias("com.cloudbees.jenkins.Credential", Credential.class);void
migrate()
LoadsGitHubPushTrigger.DescriptorImpl
and migrate all values toGitHubPluginConfig
protected com.google.common.base.Function<Credential,GitHubServerConfig>
toGHServerConfig()
Creates new string credentials from token
-
-
-
Method Detail
-
migrate
public void migrate() throws IOException
LoadsGitHubPushTrigger.DescriptorImpl
and migrate all values toGitHubPluginConfig
- Throws:
IOException
- if any read-save problems as it critical to work process of this plugin
-
toGHServerConfig
protected com.google.common.base.Function<Credential,GitHubServerConfig> toGHServerConfig()
Creates new string credentials from token- Returns:
- converter to get all useful info from old plain creds and crete new server config
-
enableCompatibilityAliases
public static void enableCompatibilityAliases()
Enable xml migration from deprecated nodes to new Can be used for example as Jenkins.XSTREAM2.addCompatibilityAlias("com.cloudbees.jenkins.Credential", Credential.class);
-
enableAliases
public static void enableAliases()
Simplifies long node names in config files
-
-