Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Need control of BUILD_NUMBER variable for generated jobs for -SNAPSHOT vs -BUILD_NUMBER #52

Open
bedge opened this issue Jan 3, 2014 · 1 comment
Labels

Comments

@bedge
Copy link

bedge commented Jan 3, 2014

This is a feature request more than a bug.
My build jobs use:
-DBUILD_NUMBER=${BUILD_NUMBER}
to set the artifact version.

I want my MyJob-build-master job to use the actual -BUILD_NUMBER so that it gets pushed into my nexus release repository whereas I want my other generated branch build jobs to use -SNAPSHOT so they don't go into the nexus snapshot repository.

So the generated build jobs need to use
-DBUILD_NUMBER=${BUILD_NUMBER}-SNAPSHOT

The straight up "master" -> "branch" replacement that's done can't manage this additional change.

There is no other argument one can provide to denote which nexus repo artifacts are saved into, it is always gleaned from the version string.

This requires that I have a template build job that uses -SNAPSHOT that is separate from my master job just to get this functionality. Not a huge problem, but it results in one additional job to be kept in sync by hand.

@bedge
Copy link
Author

bedge commented Jan 3, 2014

I was able to work around this by using envinject to add a script that wrote the appropriate version suffix into a properties file that was read in the build env inject phase.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants