Re: Maven auto-installation doesn't work when shared between executions

2018-05-04 Thread Johnathan Law
I've just spent the day trying to get automatic tool installation to work. 
and it looks like this problem is still there. Did you manage to find any 
solution to this? It's incredibly frustrating, due to being in a corporate 
environment I'm seeing the JDK try to get installed nearly five times in a 
single job execution.

On Monday, 7 August 2017 12:18:51 UTC+1, Vitalii Ishchenko wrote:
>
> Hi Mark
>
> I found possible issue, we are installing maven from internal url and I've 
> created test job that installs from apache
> 2nd option is different in fact that it creates .installedFrom file that 
> is later used to verify if we are installing different version
>
>
> https://github.com/jenkinsci/jenkins/blob/d5d6eb037b51a69f86cbf105fd3b78178ad83611/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java#L45
>
> https://github.com/jenkinsci/jenkins/blob/d5d6eb037b51a69f86cbf105fd3b78178ad83611/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java#L83
>
> But seems that for our type of installation, different class is used which 
> doesn't have such check 
> https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tools/ZipExtractionInstaller.java
>
> On Thursday, June 29, 2017 at 5:17:09 PM UTC+3, Mark Waite wrote:
>>
>> If the tool is being installed on every run of the job, then I think 
>> there is something else amiss with your installation.  I have several 
>> different automated installers (2 maven, 2 ant, cmake, etc.) which deploy 
>> to many different platforms successfully (including Windows).
>>
>> I have a job that uses the elastic axis plugin to run a sample maven job 
>> on each of the agents using the specific maven version.  It works reliably, 
>> and once that job has run, other jobs do not unpack the maven installer for 
>> that maven version again.
>>
>> Are there any unique or special settings you're using to configure your 
>> agents?
>>
>> Mark Waite
>>
>> On Thu, Jun 29, 2017 at 8:08 AM Виталий Ищенко  wrote:
>>
>>> I have a windows slave node with 2 executors. And job that is bound to 
>>> windows slave that allows to perform parallel builds. Jenkins automatically 
>>> installs maven configured in Global Tools configuration by unpacking tar.gz 
>>> archive.
>>>
>>> The problem is that looks like every run re-fetches maven and tries to 
>>> overwrite existing one. This approach fails almost every time because maven 
>>> may be used at that time and Windows doesn't allow to overwrite running 
>>> executable.
>>>
>>> Is there a way to install maven into WORKSPACE instead of shared 
>>> location or control where archive is unpacked, in this case we can use 
>>> JOB_NAME and EXECUTOR_NUMBER to scope tool
>>>
>>> -- 
>>> 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/CANYoZJ%3De6q4e0CDdZjvOQ%3D-HyLwcRtPX%2B5e9RiHT4OjnMSgeVA%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/c29dd5c4-8c47-427d-91a6-b87caad8e4e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Maven auto-installation doesn't work when shared between executions

2017-08-07 Thread Vitalii Ishchenko
Hi Mark

I found possible issue, we are installing maven from internal url and I've 
created test job that installs from apache
2nd option is different in fact that it creates .installedFrom file that is 
later used to verify if we are installing different version

https://github.com/jenkinsci/jenkins/blob/d5d6eb037b51a69f86cbf105fd3b78178ad83611/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java#L45
https://github.com/jenkinsci/jenkins/blob/d5d6eb037b51a69f86cbf105fd3b78178ad83611/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java#L83

But seems that for our type of installation, different class is used which 
doesn't have such 
check 
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tools/ZipExtractionInstaller.java

On Thursday, June 29, 2017 at 5:17:09 PM UTC+3, Mark Waite wrote:
>
> If the tool is being installed on every run of the job, then I think there 
> is something else amiss with your installation.  I have several different 
> automated installers (2 maven, 2 ant, cmake, etc.) which deploy to many 
> different platforms successfully (including Windows).
>
> I have a job that uses the elastic axis plugin to run a sample maven job 
> on each of the agents using the specific maven version.  It works reliably, 
> and once that job has run, other jobs do not unpack the maven installer for 
> that maven version again.
>
> Are there any unique or special settings you're using to configure your 
> agents?
>
> Mark Waite
>
> On Thu, Jun 29, 2017 at 8:08 AM Виталий Ищенко  > wrote:
>
>> I have a windows slave node with 2 executors. And job that is bound to 
>> windows slave that allows to perform parallel builds. Jenkins automatically 
>> installs maven configured in Global Tools configuration by unpacking tar.gz 
>> archive.
>>
>> The problem is that looks like every run re-fetches maven and tries to 
>> overwrite existing one. This approach fails almost every time because maven 
>> may be used at that time and Windows doesn't allow to overwrite running 
>> executable.
>>
>> Is there a way to install maven into WORKSPACE instead of shared location 
>> or control where archive is unpacked, in this case we can use JOB_NAME and 
>> EXECUTOR_NUMBER to scope tool
>>
>> -- 
>> 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/CANYoZJ%3De6q4e0CDdZjvOQ%3D-HyLwcRtPX%2B5e9RiHT4OjnMSgeVA%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/22f3394c-b3fe-4307-9c7c-895831318fc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Maven auto-installation doesn't work when shared between executions

2017-06-29 Thread Mark Waite
If the tool is being installed on every run of the job, then I think there
is something else amiss with your installation.  I have several different
automated installers (2 maven, 2 ant, cmake, etc.) which deploy to many
different platforms successfully (including Windows).

I have a job that uses the elastic axis plugin to run a sample maven job on
each of the agents using the specific maven version.  It works reliably,
and once that job has run, other jobs do not unpack the maven installer for
that maven version again.

Are there any unique or special settings you're using to configure your
agents?

Mark Waite

On Thu, Jun 29, 2017 at 8:08 AM Виталий Ищенко  wrote:

> I have a windows slave node with 2 executors. And job that is bound to
> windows slave that allows to perform parallel builds. Jenkins automatically
> installs maven configured in Global Tools configuration by unpacking tar.gz
> archive.
>
> The problem is that looks like every run re-fetches maven and tries to
> overwrite existing one. This approach fails almost every time because maven
> may be used at that time and Windows doesn't allow to overwrite running
> executable.
>
> Is there a way to install maven into WORKSPACE instead of shared location
> or control where archive is unpacked, in this case we can use JOB_NAME and
> EXECUTOR_NUMBER to scope tool
>
> --
> 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/CANYoZJ%3De6q4e0CDdZjvOQ%3D-HyLwcRtPX%2B5e9RiHT4OjnMSgeVA%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/CAO49JtGpTZ6r0-a63%3DFd1uXi4_W7%3DWenZUdWqmJmqcB7s8U%3DRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.