Re: Jenkins 2.0: Turn off Setup wizard

2016-11-01 Thread Mike Albert
Found a solution for this issue.  In previous releases, I had set this flag 
via JENKINS_JAVA_OPTIONS in /etc/default/jenkins.  If I move that same flag 
from JENKINS_JAVA_OPTIONS to JAVA_ARGS in /etc/default/jenkins, it works as 
expected.

On Wednesday, October 26, 2016 at 11:56:29 AM UTC-4, Mike Albert wrote:
>
> Setting Djenkins.install.runSetupWizard=false doesn't seem to be working 
> correctly for me with more recent Jenkins releases.  Setting that flag for 
> Jenkins 2.1 works fine, but that same flag doesn't work with the latest 
> release (2.27) or stable release (2.7.4).  Is there a different flag that I 
> should be setting?
>
> On Tuesday, May 3, 2016 at 11:44:13 AM UTC-4, Mike Albert wrote:
>>
>> Adding a restart step to our Jenkins deployment script did the trick. 
>>  The java option to disable the setup wizard is working as well.  Thanks!
>>
>> On Monday, May 2, 2016 at 6:44:18 PM UTC-4, Daniel Beck wrote:
>>>
>>>
>>> > On 03.05.2016, at 00:15, Richard Bywater  wrote: 
>>> > 
>>> > @Daniel - FYI I can't actually see a reply from you in this thread 
>>> from April 21st. 6th April seems to be the last email from you in the 
>>> thread. 
>>>
>>> I hate my email client :-( 
>>>
>>> Set the system property jenkins.install.runSetupWizard to false to skip 
>>> both install and upgrade wizards -- this will not enable security options 
>>> either: 
>>>
>>> java -Djenkins.install.runSetupWizard=false -jar jenkins.war 
>>>
>>>
>>> https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
>>>  
>>>
>>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fb2cce57-e769-416d-bba3-888d738a6592%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-10-26 Thread Mike Albert
Setting Djenkins.install.runSetupWizard=false doesn't seem to be working 
correctly for me with more recent Jenkins releases.  Setting that flag for 
Jenkins 2.1 works fine, but that same flag doesn't work with the latest 
release (2.27) or stable release (2.7.4).  Is there a different flag that I 
should be setting?

On Tuesday, May 3, 2016 at 11:44:13 AM UTC-4, Mike Albert wrote:
>
> Adding a restart step to our Jenkins deployment script did the trick.  The 
> java option to disable the setup wizard is working as well.  Thanks!
>
> On Monday, May 2, 2016 at 6:44:18 PM UTC-4, Daniel Beck wrote:
>>
>>
>> > On 03.05.2016, at 00:15, Richard Bywater  wrote: 
>> > 
>> > @Daniel - FYI I can't actually see a reply from you in this thread from 
>> April 21st. 6th April seems to be the last email from you in the thread. 
>>
>> I hate my email client :-( 
>>
>> Set the system property jenkins.install.runSetupWizard to false to skip 
>> both install and upgrade wizards -- this will not enable security options 
>> either: 
>>
>> java -Djenkins.install.runSetupWizard=false -jar jenkins.war 
>>
>>
>> https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
>>  
>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cefcf27e-0a3f-4495-ba63-960f4790c65f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-05-03 Thread Mike Albert
Adding a restart step to our Jenkins deployment script did the trick.  The 
java option to disable the setup wizard is working as well.  Thanks!

On Monday, May 2, 2016 at 6:44:18 PM UTC-4, Daniel Beck wrote:
>
>
> > On 03.05.2016, at 00:15, Richard Bywater > 
> wrote: 
> > 
> > @Daniel - FYI I can't actually see a reply from you in this thread from 
> April 21st. 6th April seems to be the last email from you in the thread. 
>
> I hate my email client :-( 
>
> Set the system property jenkins.install.runSetupWizard to false to skip 
> both install and upgrade wizards -- this will not enable security options 
> either: 
>
> java -Djenkins.install.runSetupWizard=false -jar jenkins.war 
>
>
> https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
>  
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c6ec4105-6ab4-4c05-82e4-976bd98df68e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-05-02 Thread Daniel Beck

> On 03.05.2016, at 00:15, Richard Bywater  wrote:
> 
> @Daniel - FYI I can't actually see a reply from you in this thread from April 
> 21st. 6th April seems to be the last email from you in the thread.

I hate my email client :-(

Set the system property jenkins.install.runSetupWizard to false to skip both 
install and upgrade wizards -- this will not enable security options either:

java -Djenkins.install.runSetupWizard=false -jar jenkins.war

https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/C0A0C62F-935C-4BBA-91A9-4C02A1EAC9E1%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-05-02 Thread Richard Bywater
@Daniel - FYI I can't actually see a reply from you in this thread from
April 21st. 6th April seems to be the last email from you in the thread.

Richard.

On Tue, 3 May 2016 at 10:13 Daniel Beck  wrote:

>
> > On 02.05.2016, at 22:47, Mike Albert  wrote:
> >
> > Anybody else have a workaround for this?
>
> See my answer from April 21.
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/28A33958-3D13-436A-BFD1-54020CA72B31%40beckweb.net
> .
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMui947m4m-iyZDJL-kg5DmXRnakJGKrPO46Q%2BtoPTLkh53vrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-05-02 Thread Daniel Beck

> On 02.05.2016, at 22:47, Mike Albert  wrote:
> 
> Anybody else have a workaround for this?

See my answer from April 21.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/28A33958-3D13-436A-BFD1-54020CA72B31%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-05-02 Thread Stuart Warren
Can you confirm that Jenkins is starting up or is restarted after those
files are in place?

On 2 May 2016 at 21:47, Mike Albert  wrote:

> 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  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  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
>>> jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/09d68a96-72a6-424f-a3aa-cf11e6bacf5c%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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
> jenkinsci-users+unsubscr...@googlegroups.com.
> 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.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADHbheV4UMRO%2Bnh9TYbY6LFojsjNsSZ51apBh75LkSJZpi-GVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-05-02 Thread Mike Albert
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 
> > 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  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 
>> jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/09d68a96-72a6-424f-a3aa-cf11e6bacf5c%40googlegroups.com
>>  
>> 
>> .
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
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.


Re: Jenkins 2.0: Turn off Setup wizard

2016-04-22 Thread Stuart Warren
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  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  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
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/09d68a96-72a6-424f-a3aa-cf11e6bacf5c%40googlegroups.com
> 
> .
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADHbheUp_9X%2BCZADnQi-mrbE%2B7FfghVhQWvJPQF%3D_ap0%2Bbh7Tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-04-21 Thread Scott Cutler
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 > 
> 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 the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/09d68a96-72a6-424f-a3aa-cf11e6bacf5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-04-05 Thread Daniel Beck

On 05.04.2016, at 16:54, Stuart Warren  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 the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2726228E-62A6-4BB5-B5AC-86C2B1F85EE3%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-04-05 Thread Stuart Warren


On Friday, 1 April 2016 01:20:37 UTC+1, R Tyler Croy wrote:
>
> (replies inline) 
>
> On Thu, 31 Mar 2016, Richard Bywater wrote: 
>
> > It sounds to me like there's a good use-case for being able to skip the 
> > setup wizard even in "prod" mode? Is the jenkins.install.runSetupWizard 
> > ignored if development = false? If so would it make sense just to skip 
> that 
> > check? 
>
>
> I agree, for stuff like puppet-jenkins the provisioning of the Jenkins 
> master 
> doesn't require the Getting Started wizard. 
>
>
>
> If the system property that Baptiste referenced isn't fully turning the 
> wizard 
> off, then we need to fix that before RCs IMHO. 
>


I'm currently testing this groovy script 
/usr/share/jenkins/ref/init.groovy.d/set-install-state.groovy to hack 
around this limitation:

```
import jenkins.model.*;
import hudson.util.*;
import jenkins.install.*;

j = Jenkins.getInstance()
uw = j.getInjector().getInstance(UpgradeWizard.class)
uw.setCurrentLevel(new VersionNumber("2.0"))
j.setInstallState(InstallState.INITIAL_SETUP_COMPLETED)
```

Today is the first time I've tried groovy though, so probably doing 
something silly.
Are there any obvious improvements to the above?

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/84b0aabd-8000-4381-88df-414f365230cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-03-31 Thread R. Tyler Croy
(replies inline)

On Thu, 31 Mar 2016, Richard Bywater wrote:

> It sounds to me like there's a good use-case for being able to skip the
> setup wizard even in "prod" mode? Is the jenkins.install.runSetupWizard
> ignored if development = false? If so would it make sense just to skip that
> check?


I agree, for stuff like puppet-jenkins the provisioning of the Jenkins master
doesn't require the Getting Started wizard.



If the system property that Baptiste referenced isn't fully turning the wizard
off, then we need to fix that before RCs IMHO.



> On Fri, 1 Apr 2016 at 10:10 Baptiste Mathus  wrote:
> 
> > There's a sysprop for that, but normally only for development mode.
> > But, NOT FOR KIDS, you can confuse things by forcing it to dev mode.
> >
> > Probably reasonable for continuously starting from scratch from the docker
> > container only, not for prod use obviously (beware that you may trigger
> > weird behaviours w/ plugins that would use this property to change things
> > for dev).
> >
> > $ docker run -p 8080:8080 --env JAVA_OPTS="-Dhudson.Main.development=true
> > -Djenkins.install.runSetupWizard=false" jenkinsci/jenkins:2.0-beta-1
> >
> > 2016-03-31 22:44 GMT+02:00 Curt Bushko :
> >
> >> Hello,
> >>
> >> I am building a Docker container based on jenkinsci/jenkins:2.0-beta-1. I
> >> am autofilling it in with jobs/pipelines but the annoying thing is that
> >> every time I run the image I have to go through the setup wizard.
> >>
> >> How do disable this wizard so that my container will just be up and
> >> running?
> >>
> >> Thanks!
> >>
> >> --
> >> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit
> >> https://groups.google.com/d/msgid/jenkinsci-users/149f107d-59d6-4f74-95bc-1b07742f8239%40googlegroups.com
> >> 
> >> .
> >> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS53SUUKuoT4qem%3Dj6sgNJ_X3XjXnOmFrE5-JZzyCjAU-Q%40mail.gmail.com
> > 
> > .
> > 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/CAMui947kKui-ATTvXoNh7oaAAv0arvKiMxJ8ENL2xSiqbk6SoQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

- R. Tyler Croy

--
 Code: 
  Chatter: 

  % gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
--

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/20160401002023.GD15060%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: Jenkins 2.0: Turn off Setup wizard

2016-03-31 Thread Richard Bywater
It sounds to me like there's a good use-case for being able to skip the
setup wizard even in "prod" mode? Is the jenkins.install.runSetupWizard
ignored if development = false? If so would it make sense just to skip that
check?

Richard.

On Fri, 1 Apr 2016 at 10:10 Baptiste Mathus  wrote:

> There's a sysprop for that, but normally only for development mode.
> But, NOT FOR KIDS, you can confuse things by forcing it to dev mode.
>
> Probably reasonable for continuously starting from scratch from the docker
> container only, not for prod use obviously (beware that you may trigger
> weird behaviours w/ plugins that would use this property to change things
> for dev).
>
> $ docker run -p 8080:8080 --env JAVA_OPTS="-Dhudson.Main.development=true
> -Djenkins.install.runSetupWizard=false" jenkinsci/jenkins:2.0-beta-1
>
> 2016-03-31 22:44 GMT+02:00 Curt Bushko :
>
>> Hello,
>>
>> I am building a Docker container based on jenkinsci/jenkins:2.0-beta-1. I
>> am autofilling it in with jobs/pipelines but the annoying thing is that
>> every time I run the image I have to go through the setup wizard.
>>
>> How do disable this wizard so that my container will just be up and
>> running?
>>
>> Thanks!
>>
>> --
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/149f107d-59d6-4f74-95bc-1b07742f8239%40googlegroups.com
>> 
>> .
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS53SUUKuoT4qem%3Dj6sgNJ_X3XjXnOmFrE5-JZzyCjAU-Q%40mail.gmail.com
> 
> .
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMui947kKui-ATTvXoNh7oaAAv0arvKiMxJ8ENL2xSiqbk6SoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0: Turn off Setup wizard

2016-03-31 Thread Baptiste Mathus
There's a sysprop for that, but normally only for development mode.
But, NOT FOR KIDS, you can confuse things by forcing it to dev mode.

Probably reasonable for continuously starting from scratch from the docker
container only, not for prod use obviously (beware that you may trigger
weird behaviours w/ plugins that would use this property to change things
for dev).

$ docker run -p 8080:8080 --env JAVA_OPTS="-Dhudson.Main.development=true
-Djenkins.install.runSetupWizard=false" jenkinsci/jenkins:2.0-beta-1

2016-03-31 22:44 GMT+02:00 Curt Bushko :

> Hello,
>
> I am building a Docker container based on jenkinsci/jenkins:2.0-beta-1. I
> am autofilling it in with jobs/pipelines but the annoying thing is that
> every time I run the image I have to go through the setup wizard.
>
> How do disable this wizard so that my container will just be up and
> running?
>
> Thanks!
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/149f107d-59d6-4f74-95bc-1b07742f8239%40googlegroups.com
> 
> .
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS53SUUKuoT4qem%3Dj6sgNJ_X3XjXnOmFrE5-JZzyCjAU-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.