Groovy Script to Skip Installation of Plugins and Enable Slave

37 views
Skip to first unread message

Vikas Kumar

unread,
Feb 15, 2017, 4:38:04 AM2/15/17
to Jenkins Users
Hello Everyone,

I am trying to automate initialization of Jenkins Docker container and looking to automate two parts.

  • Ignore this part to select plugins. I don't need this as I am installing required plugins at the build time



















  • Enable Slave -> Master Access Control (listed under Configure System). This has been answered here but is not working for Jenkins v2.32.2 (latest as on date).











Thanks,
Vikas

Vikas Kumar

unread,
Feb 15, 2017, 5:54:29 AM2/15/17
to Jenkins Users
All,

This stands solved now.

To ignore the plugins, just use this

echo ${JENKINS_VERSION} > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
echo ${JENKINS_VERSION} > /usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion

and for the enabling slave, the answer here is good, all one needs is to import the package import jenkins.security.s2m.*

Hope this helps someone.

Cheers,
Vikas

Indra Gunawan (ingunawa)

unread,
Feb 15, 2017, 11:23:08 AM2/15/17
to jenkins...@googlegroups.com

Add option ‘-Djenkins.install.runSetupWizard=false’ to the JAVA_ARGS for Jenkins start-up.

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/76513c7b-3a9c-4acb-b1fb-3375ce033ef9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages