Reputation: 241
I'm new to artifactory, have some basic question. Unfortunately did not find best practices/suggested workflows in the jfrog docs.. As far as I understand there are 2 basic flows for generic build to work with Jenkins:
server.publishBuildInfo buildInfo
to the artifactory upload and then each file has it's own build and that way when you download it has build properties you can work with - however I was not able to pull specific build (have to specify the files that I need and it's always downloading the last build of the file) .So, what is the best workflow practice for Jenkins/Artifactory marriage ( push , pull, get latest and get older artifacts in automatic way (cli/API/Jenkins plugin - but not GUI)?
Upvotes: 0
Views: 222
Reputation: 1851
Best practice is to publish a build info like you mentioned. The build doesn't have to be for a single file, it can include multiple ones. See these examples for declarative or scripted workflows.
When you download, the download command accepts a file spec.
In the build
field of the file spec you can specify a build name without a build number which will download the artifacts of the latest build.
When you specify a build, the aql
and pattern
fields are optional. You can still use them if you'd like to filter some of the build artifacts.
An additional file to hold the build details is redundant, this is what the build info is for.
Upvotes: 0