Class 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 Detail

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

      • InstallState

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

      • 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
      • hashCode

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

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