0

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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Thejus A P
  • 71
  • 1
  • 11
  • The question is missing some details, mainly which package type(s) are you using. Also, the question presents a very opinionated file layout design which might be the cause of the problem, not part of the solution. Please provide more details and explain the actual need (closer to what is described in problem #2). – yinon Feb 22 '22 at 14:52
  • Hi, this is maven build , Once the build is done , the artidacts which are created need to push to the jfrog repository .The requirement is these artifactory need to be pushed to the Jfrog repo in such a way that , a folder should be created in the name of the jenkins build number and all the artifacts in that build has to be uploaded to that folder. – Thejus A P Feb 22 '22 at 15:06
  • The way you describe is not according to the Maven way... Even if you manage to upload your Maven artifacts based on this custom layout, you need Maven to be able to resolve these dependencies. – yinon Feb 22 '22 at 15:27

1 Answers1

0

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

JayanthSuresh
  • 101
  • 1
  • 5