/** * Sets up the Setup Wizard filter if the current state requires it. */ private void checkFilter() { if (!Jenkins.get().getInstallState().isSetupComplete()) { setUpFilter(); } } }
/** * Indicates a generated password should be used - e.g. this is a new install, no security realm set up */ @SuppressWarnings("unused") // used by jelly public boolean isUsingSecurityToken() { try { return !Jenkins.get().getInstallState().isSetupComplete() && isUsingSecurityDefaults(); } catch (Exception e) { // ignore } return false; }
String correlationId = request.getParameter("correlationId"); Map<String,Object> response = new HashMap<>(); response.put("state", Jenkins.getInstance().getInstallState().name()); List<Map<String, String>> installStates = new ArrayList<>(); response.put("jobs", installStates);
try { InstallState.INITIAL_SETUP_COMPLETED.initializeState(); return j.getInstallState(); } catch (RuntimeException e) { throw e;
getInstallState().initializeState();
final Authentication currentAuth = Jenkins.getAuthentication(); if (!Jenkins.getInstance().getInstallState().isSetupComplete()) { jenkins.setInstallState(InstallState.INITIAL_PLUGINS_INSTALLING); updateCenter.persistInstallStatus();
/** * Returns the initial plugin list in JSON format */ @Restricted(DoNotUse.class) // WebOnly public HttpResponse doPlatformPluginList() throws IOException { SetupWizard setupWizard = Jenkins.get().getSetupWizard(); if (setupWizard != null) { if (InstallState.UPGRADE.equals(Jenkins.get().getInstallState())) { JSONArray initialPluginData = getPlatformPluginUpdates(); if(initialPluginData != null) { return HttpResponses.okJSON(initialPluginData); } } else { JSONArray initialPluginData = getPlatformPluginList(); if(initialPluginData != null) { return HttpResponses.okJSON(initialPluginData); } } } return HttpResponses.okJSON(); }
/** * Indicates a generated password should be used - e.g. this is a new install, no security realm set up */ public boolean isUsingSecurityToken() { try { return isUsingSecurityToken // only ever show the unlock page if using the security token && !Jenkins.getInstance().getInstallState().isSetupComplete() && isUsingSecurityDefaults(); } catch (Exception e) { // ignore } return false; }
String correlationId = request.getParameter("correlationId"); Map<String,Object> response = new HashMap<>(); response.put("state", Jenkins.getInstance().getInstallState().name()); List<Map<String, String>> installStates = new ArrayList<>(); response.put("jobs", installStates);
try { InstallState.INITIAL_SETUP_COMPLETED.initializeState(); return j.getInstallState(); } catch (RuntimeException e) { throw e;
InstallState installState = Jenkins.getActiveInstance().getInstallState(); if (InstallState.UPGRADE.equals(installState)) { VersionNumber lastExecVersion = new VersionNumber(InstallUtil.getLastExecVersion());
final Authentication currentAuth = Jenkins.getAuthentication(); if (!Jenkins.getInstance().getInstallState().isSetupComplete()) { jenkins.setInstallState(InstallState.INITIAL_PLUGINS_INSTALLING); updateCenter.persistInstallStatus();
/** * Returns the initial plugin list in JSON format */ @Restricted(DoNotUse.class) // WebOnly public HttpResponse doPlatformPluginList() throws IOException { jenkins.install.SetupWizard setupWizard = Jenkins.getInstance().getSetupWizard(); if (setupWizard != null) { if (InstallState.UPGRADE.equals(Jenkins.getInstance().getInstallState())) { JSONArray initialPluginData = getPlatformPluginUpdates(); if(initialPluginData != null) { return HttpResponses.okJSON(initialPluginData); } } else { JSONArray initialPluginData = getPlatformPluginList(); if(initialPluginData != null) { return HttpResponses.okJSON(initialPluginData); } } } return HttpResponses.okJSON(); }