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 uses GitHubPlugin to store all global configuration instead of push trigger descriptor
Since:
1.13.0
Author:
lanwen (Merkushev Kirill)
  • Constructor Details

    • Migrator

      public Migrator()
  • Method Details

    • migrate

      public void migrate() throws IOException
      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