Class InstallState

java.lang.Object
jenkins.install.InstallState
All Implemented Interfaces:
ExtensionPoint

@StaplerAccessibleType public class InstallState extends Object implements ExtensionPoint
Jenkins install state. In order to hook into the setup wizard lifecycle, you should include something in a script that call to onSetupWizardInitialized with a callback
Author:
tom.fennelly@gmail.com
  • Field Details

    • UNKNOWN

      @Extension public static final InstallState UNKNOWN
      Need InstallState != NEW for tests by default
    • RUNNING

      @Extension public static final InstallState RUNNING
      After any setup / restart / etc. hooks are done, states should be running
    • INITIAL_SETUP_COMPLETED

      @Extension public static final InstallState INITIAL_SETUP_COMPLETED
      The initial set up has been completed
    • CREATE_ADMIN_USER

      @Extension public static final InstallState CREATE_ADMIN_USER
      Creating an admin user for an initial Jenkins install.
    • CONFIGURE_INSTANCE

      @Extension public static final InstallState CONFIGURE_INSTANCE
    • INITIAL_PLUGINS_INSTALLING

      @Extension public static final InstallState INITIAL_PLUGINS_INSTALLING
      New Jenkins install. The user has kicked off the process of installing an initial set of plugins (via the install wizard).
    • INITIAL_SECURITY_SETUP

      @Extension public static final InstallState INITIAL_SECURITY_SETUP
      Security setup for a new Jenkins install.
    • NEW

      @Extension public static final InstallState NEW
      New Jenkins install.
    • RESTART

      @Extension public static final InstallState RESTART
      Restart of an existing Jenkins install.
    • UPGRADE

      @Extension public static final InstallState UPGRADE
      Upgrade of an existing Jenkins install.
    • DOWNGRADE

      @Extension public static final InstallState DOWNGRADE
      Downgrade of an existing Jenkins install.
    • TEST

      public static final InstallState TEST
      Jenkins started in test mode (JenkinsRule).
    • DEVELOPMENT

      public static final InstallState DEVELOPMENT
      Jenkins started in development mode: Boolean.getBoolean("hudson.Main.development"). Can be run normally with the -Djenkins.install.runSetupWizard=true
  • Constructor Details

    • InstallState

      public InstallState(@NonNull String name, boolean isSetupComplete)
  • Method Details

    • initializeState

      public void initializeState()
      Process any initialization this install state requires
    • readResolve

      @Deprecated protected Object readResolve()
      Deprecated.
      Should no longer be used, as Jenkins now saves only name.
      The actual class name is irrelevant; this is functionally an enum.

      Creating a writeReplace does not help much since XStream then just saves: <installState class="jenkins.install.InstallState$CreateAdminUser" resolves-to="jenkins.install.InstallState">

      See Also:
      • UNUSED_INNER_CLASSES
    • isSetupComplete

      public boolean isSetupComplete()
      Indicates the initial setup is complete
    • name

      public String name()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • valueOf

      @CheckForNull public static InstallState valueOf(@NonNull String name)
      Find an install state by name