jfrog / project-examples

Small projects in universal build ecosystems to configure CI and Artifactory
1.01k stars 2.39k forks source link

Upload artifacts using artifactory DSL #146

Open gauravluckme opened 6 years ago

gauravluckme commented 6 years ago

By using "flat" the artifacts uploaded while maintaining their file system hierarchy, but if we want to eliminate the some part of hierarchy, is it possible?

Ex. System Hierarchy - /u/users/abc/branch1/web/*

Actual Upload in Artifactory - ABC/$PROJECTNAME/$BUILD_ID/u/users/abc/branch1/web/file1

Desired Upload in Artifactory - ABC/$PROJECTNAME/$BUILD_ID/web/file1

Need to eliminate /u/users/abc/branch1/, can this is possible?

eyalbe4 commented 6 years ago

@gauravluckme, Are you using JFrog CLI? If so, take a look at the Placeholders section in the documentation. Placeholders allow to configure your download and upload path. Placeholders are also supposed in the Jenkins, TeamCity, Bamboo and VSTS Artifactory plugins.

gauravluckme commented 6 years ago

I am using the artifactory DSL and able to successfully upload the artifacts, now trying to remove the /u/users/abc/branch1/ from that but not able to find any solution or option.

eyalbe4 commented 6 years ago

@gauravluckme, File Specs support exclude-patterns. Maybe you can try excluding this path.

gauravluckme commented 6 years ago

I am not sure, if that can be used to remove the path as its for excluding artifacts I guess!