Skip to content

Commit

Permalink
[JENKINS-49401] Move Setup Wizard initialization logic to the init re…
Browse files Browse the repository at this point in the history
…actor. (#3282)

This way, it is guaranteed Jenkins.save() has never been called before
the SetupWizard is executed, and computation of the initial Setup Wizard
state will be correct.

Since the SetupWizard is now executed before reaching the COMPLETED
milestone, a Jenkins.save() call has been added in order to persist any
configuration change done in prior phases.
  • Loading branch information
Vlatombe committed Mar 26, 2018
1 parent a0c080f commit 9f59991
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/main/java/jenkins/model/Jenkins.java
Expand Up @@ -918,9 +918,7 @@ protected Jenkins(File root, ServletContext context, PluginManager pluginManager
if(KILL_AFTER_LOAD)
// TODO cleanUp?
System.exit(0);

setupWizard = new SetupWizard();
getInstallState().initializeState();
save();

launchTcpSlaveAgentListener();

Expand Down Expand Up @@ -3146,6 +3144,9 @@ public void run(Reactor session) throws Exception {
// auto register root actions
for (Action a : getExtensionList(RootAction.class))
if (!actions.contains(a)) actions.add(a);

setupWizard = new SetupWizard();
getInstallState().initializeState();
}
});

Expand Down

0 comments on commit 9f59991

Please sign in to comment.