'How to deploy Artifacts in JFrog repository in custom folders(Name=Jenkins build number) through jenkins pipeline?
Problem 1 : My requirement here is deploying the artifacts which are created during a build should be uploaded to a JFROG repository with a custom folder structure.
Eg. For a Jenkins build number 1, the folder should be named '1' and inside that, all the artifacts of that build should be stored and for build number 2, all artifacts of that build should be stored under the folder named '2'.
Problem 2: Here Iam having a number of parallel and sequential jobs, So, the artifacts created for one job would be required for another job ,Hence that also need to be pulled from the respective custom folder which we created above.
Eg. Job 2 need artifacts of job 1 to get the build successful.
Build is done using Jenkins pipeline script.
Solution 1:[1]
We can upload the artifacts to the Artifactory repo based on required layouts using custom layouts. For standard repository type, we need to use the built-in standard layouts so that even there wont be any issues while resolving the artifacts as dependency from the client (mvn , gradle, etc). But if you use a custom layout then the folder would be created based on your requirement then while resolving the artifacts as dependency from the client (mvn , gradle, etc) you might face issues. Below is the Artifactory repository layouts wiki page for more details:
https://www.jfrog.com/confluence/display/JFROG/Repository+Layouts
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | JayanthSuresh |
