2

I'm using Artifactory Pro with custom repository layouts. I promote my build and move all artifacts to my production repo. But I need to add an article number in this path, so the guys can reference it to their ERP System.

I tried some stuff here, with promoting and moving artifacts to match their needs. It works, but its not nice.

So I added my custom layouts:

For my developement repo:

[org]/[module] ...etc...

For my production repo:

[Articlenr<.*>]/[org]/[module] ...etc...

When I promote my build, my files are stored like this

[Articlenr]/customer/linux ...etc...

The article number is just filled up with [Articlenr], but I'm not able to replace it by the real one, without moving the complete directory.

Anyone here knowing, how to set the article number while promoting this build? My builds are promoted by JFrog CLI, but using the Artifactory REST API is an option, too.

Thanks a lot!

Javier C.
  • 7,859
  • 5
  • 41
  • 53
martina
  • 21
  • 2

1 Answers1

1

Currently, there's no way to use the promote command to promote a build with a target path as an argument.

If you are not set on using promotion, consider using the CLI's COPY or MOVE commands, where you can use placeholders in the target path to increment your Articlenr.

The downside of using cp/mv instead of bpr would be the fact that your build will not be flagged as promoted in artifactory (build-info), which may be a problem in some cases (like if you are using build retention for example).

It is not an ideal solution, but it might suffice for what you are trying to accomplish.

HTH, Or

Ortsigat
  • 1,259
  • 7
  • 8
  • Thanks for you answer! At the moment, I'm doing both. I promote the build and move the artifacts to the right directory. But as you mentioned, it's not the ideal solution, I'm looking for, because I have to delete the empty folders after the relocation. – martina Oct 23 '17 at 05:48