Class InstallState

  • All Implemented Interfaces:

    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
    • Field Detail

      • RUNNING

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

        public static final InstallState INITIAL_SETUP_COMPLETED
        The initial set up has been completed

        public static final InstallState CREATE_ADMIN_USER
        Creating an admin user for an initial Jenkins install.

        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).

        public static final InstallState INITIAL_SECURITY_SETUP
        Security setup for a new Jenkins install.
      • TEST

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

        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 Detail

      • InstallState

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

      • initializeState

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

        protected Object readResolve()
        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:
      • isSetupComplete

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

        public int hashCode()
        hashCode in class Object
      • valueOf

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