Thanks all, this is very helpful ! I am close to have my script fully 
completed ! 


On Saturday, January 14, 2017 at 8:33:02 AM UTC-8, Victor Martinez wrote:
>
> Hi Damien,
>
> If you'd like to script that particular Oracle configuration:
> - https://groups.google.com/d/msg/jenkinsci-users/5CD8Y-nNLhY/z8cYq1-UBwAJ
>
> And include that bit as part of the groovy hook script ( 
> https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Hook+Script ) using 
> Mark's docker instance:
> - 
> https://github.com/MarkEWaite/docker/tree/lts-with-plugins/ref/init.groovy.d
>
> So regarding the JDK configuration, see the below answer for installing 
> ANT plus a snippet about coding the JDK bit
> - https://groups.google.com/d/msg/jenkinsci-users/KE7dt0JKHvk/Eg4uPafSJQAJ
>
> def jdk7_latest = new JDK("Jdk7-latest", null, [new 
> InstallSourceProperty([new JDKInstaller('jdk-7u79-oth-JPR', true)])])
>
> def jdkDescriptor = new JDK.DescriptorImpl()
>
> List<JDK> jdks = new 
> ArrayList<JDK>(Arrays.asList(jdkDescriptor.getInstallations()))
> jdks.addAll(Arrays.asList(jdk7_latest))
> JDK[] array = new JDK[jdks.size()]
> jdkDescriptor.setInstallations(jdks.toArray(array))
>
> jdkDescriptor.save()
>
> I hope it helps,
>
> Victor Martinez
>
> On Friday, 13 January 2017 09:55:17 UTC, Mark Waite wrote:
>>
>> Jenkins provides automated tool installation for agents (including the 
>> master).  I use automated installation of JDK 6, JDK 7, JDK 8, Ant, Maven, 
>> and CMake as part of my Docker instance.  It is a derivative of the Jenkins 
>> docker instance if you'd like to see a system which is already configured 
>> with those automated installers.
>>
>> See https://github.com/MarkEWaite/docker/tree/lts-with-plugins 
>>
>> If you'd like a deeper description of automated build tool installation, 
>> see "Jenkins: The Definitive Guide".  
>> https://www.safaribooksonline.com/library/view/jenkins-the-definitive/9781449311155/ch04s06.html
>>  
>>
>> https://wiki.jenkins-ci.org/display/JENKINS/Tool+Auto-Installation describes 
>> it on the wiki page.
>>
>> Mark Waite
>>
>> On Thu, Jan 12, 2017 at 9:02 PM Damien Caro <damie...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I'm trying to automate the installation of Jenkins. I have a VM image 
>>> that has Jenkins already installed but I want to automate the next step of 
>>> the installation: JDK + Oracle password and Gradle. Has anyone already done 
>>> something similar and how ? I am considering either a shell script or a 
>>> groovy script.
>>>
>>> Thanks,
>>> Damien Caro
>>>
>>> -- 
>>> 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/6d48a0e9-8393-4acc-b724-9e2fdc6e71c1%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/6d48a0e9-8393-4acc-b724-9e2fdc6e71c1%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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/55ec93a1-7ec0-4966-b491-e23ba72d649d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to