A sample filename is
Sample-0.0.1-SNAPSHOT.jar (result of a maven build in jenkins).
My goal is to run a shell script that executes on failure and what that script does it adds incremental numbers to the filename.
So lets say something like
(BTW: In order to produce the filename, Jenkins uses the following format for environment variables to fetch the related info from the POM file: $POM_ARTIFACTID-$POM-VERSION.jar)
I was thinking somehow using $POM-VERSION to echo it out and use sed to add/replace the incremental numbers?
Problem is that I don't know how to execute that, so if someone can help me out on this one that would be great! Also if there's a better idea I'm definitely open for it.