Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsync alternative to Jenkins Copy Artifacts plugin?

I'm working on a set of builds related to our online images (such as wordpress content). Overall it's a large workflow, so it's broken into several jobs.

A couple jobs need to copy a large number of artifacts from other jobs; I've been using the Copy Artifacts plugin but it's too slow for my case and rsync would be much better suited.

Is it possible to effectively get the source artifact directory for the upstream build so that I can pass it to rsync in place of using the Copy Artifacts plugin? I'd like to have a simple script like:

rsync -a --delete $UPSTREAM_ARTIFACT_DIR $WORKSPACE

like image 902
STW Avatar asked Nov 10 '22 14:11

STW


1 Answers

The upstream artifacts are accessible via what appear to be well defined URLs. For example, the following URL enables one to access the last good builds' artifacts:

http://jenkins/job/job_name/lastSuccessfulBuild/artifact/

Can even specify the axis on a multiconfiguration project, if that's required:

http://jenkins/job/job_name/label=foo,arch=x86/lastSuccessfulBuild/artifact/
like image 196
MikeK Avatar answered Nov 15 '22 05:11

MikeK