code: public HttpResponse doShowUpgradeWizard() throws Exception {
          Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
          HttpSession session = Stapler.getCurrentRequest().getSession(true);
          session.setAttribute(SHOW_UPGRADE_WIZARD_FLAG, true);
          return HttpResponses.redirectToContextRoot();
      }
docs: Call this to show the upgrade wizard