Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins multiple artifacts for the same build

Is there a way to save/archive multiple artifacts from the same build?

Jenkins only allows a single 'Archive the Artifacts' post build step, and grey's out the option after it has been used once.

Maybe the ArtifactsArchiver's allows multiple patterns?

like image 491
thunderbird Avatar asked Sep 28 '15 13:09

thunderbird


People also ask

Can Jenkins capture artifacts from multiple projects?

You can capture build artifacts as part of a Jenkins project, but these can quickly get lost in hundreds of other CI builds across hundreds of other projects. Storing release artifacts outside of Jenkins makes them much easier to find – and it saves on effort keeping Jenkins servers tidy.

What is artifactdeployer plugin in Jenkins?

ArtifactDeployer plugin enables you to archive build artifacts to any remote locations such as to a separate file server (outside of JENKINS_HOME directory). There are many other Jenkins plugins close to ArtifactDeployer such as CopyArtifact plugin or CopyArchiver plugin for publishing artifacts from Jenkins resources...

How do I get a zip file of my Jenkins build artifact?

If your build artifact is an entire directory or a non-safe file type (such as exe) you can automatically get a ZIP file of it with this URL: http://<Jenkins Server URL>/job/<Job Name>/lastSuccessfulBuild/artifact/zip/archive.zip Shortcomings of This Approach

How to see fingerprints in Jenkins?

Click on the build on which you want to see the fingerprints and on the left hand side option choose option See Fingerprints A diagremetatic representation of fingerprint feature in jenkins the MD5 Checksum value of the artifact is same across the job this makes sure we are using correct and required artifact across the builds/jobs.


2 Answers

You can use Ant-style pattern, e.g. target/*.jar to archive multiple artifacts.

And it is possible to use a comma separated list of patterns if your files can't be matched with one pattern, e.g. target/*.jar, target/*.war.

The ? button next to the input field reveals this info.

like image 84
daspilker Avatar answered Sep 20 '22 17:09

daspilker


You can comma separate the paths, like this:

XXX.UnitTests\bin\Release\**.* , XXX.WriteAPI.Service/bin/Release/**.* 

Then you get two separate artifacts.

See http://ant.apache.org/manual/Types/fileset.html for details of the Ant Pattern syntax.

like image 35
David Lilljegren Avatar answered Sep 16 '22 17:09

David Lilljegren