Archive the artifacts - annoying limitation

1,441 views
Skip to first unread message

Frederic

unread,
Jan 10, 2012, 3:20:14 PM1/10/12
to Jenkins Users
This is a problem that was mentioned on multiple occasions and
strangely enough, it was never answered or the problem was not
understood.

Let me provide some explanation:

"Job A"
Produces the following artifact:
Build/release/x86/<multiple dlls>
build/release/x86/fr/<some resource dll>
build/release/x86/ru/<some resource dll>


Job B:
Needs job A artifacts in the following folder:
lib/myJobA/
However it should not get "build/release/x86" Job A artifact folder in
order to have:
lib/myJobA/<multiple dlls>
lib/myJobA/fr/<some resource dll>
lib/myJobA/ru/<some resource dll>


However, unless I'm missing something obvious, neither "Archive the
artifacts" nor "Copy artifacts from another project" will let you do
that.

"Archive the artifacts" will mirror the whole specified path "Build/
release/x86/..." and "Copy artifacts from another project" will also
copy the whole path to the specified target. (ie: lib/myJobA/build/
release/x86/<multiple dlls>)

"flatten" option will not help as it will not keep "fr" and "ru"
folder.

For that specific example, a possible workaround is to create 3
separate "Copy artifacts" build steps and to copy each folder
individually in the specific target folder. However, not only it is
quite cumbersome, but also makes it quite difficult to refactor the
job at a later time with some much literal data specific to jobA
workspace.

I suppose that a script could help (I'm new to Jenkis) but I believe
that this should be a core feature of Jenkins "Archive the
artifacts" (even though it would be possible to implement it at the
"copy artifact" level, it seems much better to have jobB agnostic jobA
workspace specifics).

Teamcity has a smart approach to handle this:
If you specify: build/release/x86/**/*.dll, it will omit "build/
release/x86/" when archiving the artifacts.
It also allows for more explicit target definition by using "=>" (ie:
windows/*.zip => winfiles,unix/*.tgz => linuxFiles)
Having at least the first option would be a real time saver (in order
to keep compatibility, it should be possible to check an option: [x]
rebase (or re-root or whatever sounds good in English).

Am I completely missing something here? Is there some option that I
have completely overlooked?
Anybody using some script that could help in the meantime?

Thanks

Frederic

unread,
Jan 11, 2012, 6:53:12 AM1/11/12
to Jenkins Users
Do you think it would be better that I fill an issue for this problem?

domi

unread,
Jan 11, 2012, 1:14:56 PM1/11/12
to jenkins...@googlegroups.com
I guess that would be the best…
I would go with a feature request for the copy-artifact plugin
/Domi

Frederic

unread,
Jan 11, 2012, 1:42:24 PM1/11/12
to Jenkins Users
I created the following issue:
https://issues.jenkins-ci.org/browse/JENKINS-12379

If anybody is facing the problem, please vote.

Thanks
Reply all
Reply to author
Forward
0 new messages