Re: Archive multiple artifacts with same name

2016-08-30 Thread David Karlsen
I see the archive DSL have less options (fingerprint) than the
wrapper-based version - should they become aligned?

2016-08-29 9:14 GMT+02:00 Sverre Moe :

> That worked.
>
> I removed
> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null,
> fingerprint: true, onlyIfSuccessful: true])
> from Build stage.
>
> Added
> archive '**'
> to the Publish stage.
>
> Build Artifacts now list up same named RPMs under a directory for each
> build slave.
> sles11-x86_64/package-1.1.1-x86_64.rpm
> sles12-x86_64/package-1.1.1-x86_64.rpm
> centos7-x86_64/package-1.1.1-x86_64.rpm
>
>
> fredag 26. august 2016 19.55.01 UTC+2 skrev Michael Lasevich følgende:
>>
>> Have you considered creating a temp subdirectory with identity of your OS
>> (can be generated automatically) and then moving your artifacts to that
>> directory and archiving the directory? You end up with artifacts with same
>> names in different directories - easy to browse and link to, and does what
>> you want.
>>
>> Something like this(untested):
>>
>> temp="to_archive"
>> sh """
>>   dir="${temp}/\$(lsb_release -si)-\$(lsb_release -sr)-\$(uname -m)"
>>   mkdir -p "\${dir}"
>>   cp *.rpm "${dir}"
>> """
>> dir(temp){ archive '**' }
>>
>>
>> -M
>>
>> On Monday, June 13, 2016 at 1:14:39 AM UTC-7, Sverre Moe wrote:
>>>
>>> As I am building on multiple slave nodes I get RPM artifacts from each
>>> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with
>>> the same name. Using ArtifactArchiver will only archive one of those
>>> distinct archives and overwrite the previous archived artifact. Considering
>>> since each OS may have different versions of libraries one single artifact
>>> may not work on all the OS.
>>>
>>> Is there a way around this problem that will allow me to archive 4
>>> artifacts with same name?
>>> I am using Jenkins Pipeline and performing the following step
>>> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null,
>>> fingerprint: true, onlyIfSuccessful: true])
>>>
>>> When I was previously using Multi-configuration builds, this was not a
>>> problem since each configuration would show their own artifacts.
>>>
>> --
> 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/f88d3af3-d8de-47ff-a09c-7ef165dec3a7%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

-- 
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/CAGO7Ob0a3BaOsO_1w006-Jb_7bAeF%2Bzgx3QkzOeszasaVDK9zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-29 Thread Sverre Moe
That worked. 

I removed
step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
fingerprint: true, onlyIfSuccessful: true])
from Build stage. 

Added
archive '**'
to the Publish stage.

Build Artifacts now list up same named RPMs under a directory for each 
build slave.
sles11-x86_64/package-1.1.1-x86_64.rpm
sles12-x86_64/package-1.1.1-x86_64.rpm
centos7-x86_64/package-1.1.1-x86_64.rpm


fredag 26. august 2016 19.55.01 UTC+2 skrev Michael Lasevich følgende:
>
> Have you considered creating a temp subdirectory with identity of your OS 
> (can be generated automatically) and then moving your artifacts to that 
> directory and archiving the directory? You end up with artifacts with same 
> names in different directories - easy to browse and link to, and does what 
> you want.
>
> Something like this(untested):
>
> temp="to_archive"
> sh """
>   dir="${temp}/\$(lsb_release -si)-\$(lsb_release -sr)-\$(uname -m)"
>   mkdir -p "\${dir}"
>   cp *.rpm "${dir}"
> """
> dir(temp){ archive '**' }
>
>
> -M
>
> On Monday, June 13, 2016 at 1:14:39 AM UTC-7, Sverre Moe wrote:
>>
>> As I am building on multiple slave nodes I get RPM artifacts from each 
>> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
>> the same name. Using ArtifactArchiver will only archive one of those 
>> distinct archives and overwrite the previous archived artifact. Considering 
>> since each OS may have different versions of libraries one single artifact 
>> may not work on all the OS.
>>
>> Is there a way around this problem that will allow me to archive 4 
>> artifacts with same name?
>> I am using Jenkins Pipeline and performing the following step
>> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
>> fingerprint: true, onlyIfSuccessful: true])
>>
>> When I was previously using Multi-configuration builds, this was not a 
>> problem since each configuration would show their own artifacts.
>>
>

-- 
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/f88d3af3-d8de-47ff-a09c-7ef165dec3a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-26 Thread Michael Lasevich
Have you considered creating a temp subdirectory with identity of your OS 
(can be generated automatically) and then moving your artifacts to that 
directory and archiving the directory? You end up with artifacts with same 
names in different directories - easy to browse and link to, and does what 
you want.

Something like this(untested):

temp="to_archive"
sh """
  dir="${temp}/\$(lsb_release -si)-\$(lsb_release -sr)-\$(uname -m)"
  mkdir -p "\${dir}"
  cp *.rpm "${dir}"
"""
dir(temp){ archive '**' }


-M

On Monday, June 13, 2016 at 1:14:39 AM UTC-7, Sverre Moe wrote:
>
> As I am building on multiple slave nodes I get RPM artifacts from each 
> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
> the same name. Using ArtifactArchiver will only archive one of those 
> distinct archives and overwrite the previous archived artifact. Considering 
> since each OS may have different versions of libraries one single artifact 
> may not work on all the OS.
>
> Is there a way around this problem that will allow me to archive 4 
> artifacts with same name?
> I am using Jenkins Pipeline and performing the following step
> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
> fingerprint: true, onlyIfSuccessful: true])
>
> When I was previously using Multi-configuration builds, this was not a 
> problem since each configuration would show their own artifacts.
>

-- 
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/52524b57-2177-4331-9e3e-e0a3fabea821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-26 Thread Brian Ray
I can't think of a way around it without naming the artifacts slightly 
differently. That is frustrating.

On Tuesday, August 23, 2016 at 11:39:48 PM UTC-7, Sverre Moe wrote:
>
> Yes, I am using several stash with different name derived from the slave 
> name. This helps me to transfer the artifacts to our repository.
>
> However my problem is with the archive step that makes the artifacts 
> listed up in Jenkins.
> In project branch job: Last Successful Artifacts 
> In each project build: Build Artifacts
>
> If I build an RPM on SLES12 and CentOS7, then that artifact would have the 
> same name: project-1.0.0-1.x86_64.rpm
> Using the archive step would overwrite the artifact the second time I call 
> the archive step for the same named artifact.
>
> tirsdag 23. august 2016 20.53.16 UTC+2 skrev Brian Ray følgende:
>>
>> Have you looked at the stash step 
>> ?
>>  
>> You can set an arbitrary name, which is how I got around a similar issue.
>>
>> The only downside is that the artifacts aren't saved with the build. If 
>> you need that capability there may be a way to hack that however.
>>
>> On Thursday, August 11, 2016 at 11:15:31 PM UTC-7, Sverre Moe wrote:
>>>
>>> As it stands, using archive is useless unless it can be organized by the 
>>> node it was built on. Building a single project on multiple linux 
>>> distributions will produce the same named file, but not necessary the same.
>>>
>>> mandag 13. juni 2016 10.14.39 UTC+2 skrev Sverre Moe følgende:

 As I am building on multiple slave nodes I get RPM artifacts from each 
 node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
 the same name. Using ArtifactArchiver will only archive one of those 
 distinct archives and overwrite the previous archived artifact. 
 Considering 
 since each OS may have different versions of libraries one single artifact 
 may not work on all the OS.

 Is there a way around this problem that will allow me to archive 4 
 artifacts with same name?
 I am using Jenkins Pipeline and performing the following step
 step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
 fingerprint: true, onlyIfSuccessful: true])

 When I was previously using Multi-configuration builds, this was not a 
 problem since each configuration would show their own artifacts.

>>>

-- 
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/2d1e86b8-cb9f-43bb-a46e-33c34bce0646%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-23 Thread Sverre Moe
Yes, I am using several stash with different name derived from the slave 
name. This helps me to transfer the artifacts to our repository.

However my problem is with the archive step that makes the artifacts listed 
up in Jenkins.
In project branch job: Last Successful Artifacts 
In each project build: Build Artifacts

If I build an RPM on SLES12 and CentOS7, then that artifact would have the 
same name: project-1.0.0-1.x86_64.rpm
Using the archive step would overwrite the artifact the second time I call 
the archive step for the same named artifact.

tirsdag 23. august 2016 20.53.16 UTC+2 skrev Brian Ray følgende:
>
> Have you looked at the stash step 
> ?
>  
> You can set an arbitrary name, which is how I got around a similar issue.
>
> The only downside is that the artifacts aren't saved with the build. If 
> you need that capability there may be a way to hack that however.
>
> On Thursday, August 11, 2016 at 11:15:31 PM UTC-7, Sverre Moe wrote:
>>
>> As it stands, using archive is useless unless it can be organized by the 
>> node it was built on. Building a single project on multiple linux 
>> distributions will produce the same named file, but not necessary the same.
>>
>> mandag 13. juni 2016 10.14.39 UTC+2 skrev Sverre Moe følgende:
>>>
>>> As I am building on multiple slave nodes I get RPM artifacts from each 
>>> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
>>> the same name. Using ArtifactArchiver will only archive one of those 
>>> distinct archives and overwrite the previous archived artifact. Considering 
>>> since each OS may have different versions of libraries one single artifact 
>>> may not work on all the OS.
>>>
>>> Is there a way around this problem that will allow me to archive 4 
>>> artifacts with same name?
>>> I am using Jenkins Pipeline and performing the following step
>>> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
>>> fingerprint: true, onlyIfSuccessful: true])
>>>
>>> When I was previously using Multi-configuration builds, this was not a 
>>> problem since each configuration would show their own artifacts.
>>>
>>

-- 
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/1762f910-3b5b-4708-bf64-fec954625f94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-23 Thread Brian Ray
Have you looked at the stash step 
?
 
You can set an arbitrary name, which is how I got around a similar issue.

The only downside is that the artifacts aren't saved with the build. If you 
need that capability there may be a way to hack that however.

On Thursday, August 11, 2016 at 11:15:31 PM UTC-7, Sverre Moe wrote:
>
> As it stands, using archive is useless unless it can be organized by the 
> node it was built on. Building a single project on multiple linux 
> distributions will produce the same named file, but not necessary the same.
>
> mandag 13. juni 2016 10.14.39 UTC+2 skrev Sverre Moe følgende:
>>
>> As I am building on multiple slave nodes I get RPM artifacts from each 
>> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
>> the same name. Using ArtifactArchiver will only archive one of those 
>> distinct archives and overwrite the previous archived artifact. Considering 
>> since each OS may have different versions of libraries one single artifact 
>> may not work on all the OS.
>>
>> Is there a way around this problem that will allow me to archive 4 
>> artifacts with same name?
>> I am using Jenkins Pipeline and performing the following step
>> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
>> fingerprint: true, onlyIfSuccessful: true])
>>
>> When I was previously using Multi-configuration builds, this was not a 
>> problem since each configuration would show their own artifacts.
>>
>

-- 
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/bcb9d384-ae99-4224-a093-8e0cf142550b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-11 Thread Sverre Moe
As it stands, using archive is useless unless it can be organized by the 
node it was built on. Building a single project on multiple linux 
distributions will produce the same named file, but not necessary the same.

mandag 13. juni 2016 10.14.39 UTC+2 skrev Sverre Moe følgende:
>
> As I am building on multiple slave nodes I get RPM artifacts from each 
> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
> the same name. Using ArtifactArchiver will only archive one of those 
> distinct archives and overwrite the previous archived artifact. Considering 
> since each OS may have different versions of libraries one single artifact 
> may not work on all the OS.
>
> Is there a way around this problem that will allow me to archive 4 
> artifacts with same name?
> I am using Jenkins Pipeline and performing the following step
> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
> fingerprint: true, onlyIfSuccessful: true])
>
> When I was previously using Multi-configuration builds, this was not a 
> problem since each configuration would show their own artifacts.
>

-- 
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/4356a9cc-022a-458b-a800-10c78f16bd2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.