Anybody else have a workaround for this? I tried adding jenkins.install.UpgradeWizard.state and the groovy script to my install, but I'm still being prompted to unlock jenkins after the install. Version of my Jenkins install is below:
http://pkg.jenkins-ci.org/redhat/jenkins-2.1-1.1.noarch.rpm On Friday, April 22, 2016 at 6:21:49 AM UTC-4, Stuart Warren wrote: > > Currently I'm creating 2 files: > > /var/lib/jenkins/jenkins.install.UpgradeWizard.state > ``` > 2.0 > ``` > > /var/lib/jenkins/init.groovy.d/basic-security.groovy > ``` > #!groovy > > import jenkins.model.* > import hudson.security.* > > def instance = Jenkins.getInstance() > > println "--> creating local user 'admin'" > > def hudsonRealm = new HudsonPrivateSecurityRealm(false) > hudsonRealm.createAccount('admin','admin') > instance.setSecurityRealm(hudsonRealm) > > def strategy = new FullControlOnceLoggedInAuthorizationStrategy() > instance.setAuthorizationStrategy(strategy) > instance.save() > ``` > > Which seems to do enough. > > On 21 April 2016 at 19:20, Scott Cutler <[email protected] <javascript:> > > wrote: > >> Any updates on this? I am also deploying Jenkins as part of a Vagrant >> script that automatically downloads and deploys Jenkins to Tomcat, then >> immediately begins running jobs via the CLI. When my vagrant script >> downloaded the 2.0 release this morning, the new setup wizard essentially >> blocked the install script. It would be helpful to have a documented >> procedure on the Jenkins site to disable the setup wizard and provide the >> previous "it-just-works-without-authentication" functionality, provided the >> user has root shell access and can edit XMLs or provide JDK arguments. >> >> On Tuesday, April 5, 2016 at 9:09:30 AM UTC-7, Daniel Beck wrote: >>> >>> >>> On 05.04.2016, at 16:54, Stuart Warren <[email protected]> wrote: >>> >>> > Today is the first time I've tried groovy though, so probably doing >>> something silly. >>> > Are there any obvious improvements to the above? >>> >>> You could alternatively just go with patching the JENKINS_HOME so >>> Jenkins considers it not an update: >>> >>> $ echo -n 2.0 > $JENKINS_HOME/upgraded >>> $ echo -n 2.0 > $JENKINS_HOME/.last_exec_version >>> >>> The files are being renamed in >>> https://github.com/jenkinsci/jenkins/pull/2215, but for beta 2, the >>> above appears to work. >>> >>> But please note that this is considered internal storage so may not work >>> this way forever. I think we'll pretty quickly introduce a supported >>> alternative way though. >>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-users/Pb4QZVc2-f0/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/09d68a96-72a6-424f-a3aa-cf11e6bacf5c%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/09d68a96-72a6-424f-a3aa-cf11e6bacf5c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f00131ad-add7-46c7-896f-db42bd32b28a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
