Reputation: 6856
I have two profiles in my Maven project (foo
and bar
) and I need the user to select a profile when they perform a release in Jenkins.
How can I force the user to select a Maven profile during the release?
To be clear, I am only talking about the Perform Maven Release. I do not need the parameter when building.
Ideally this would be on the same page where the user has to enter the versions for the release.
I have tried ticking Configure release build (in the section titled Build Environment), and adding a Choice Parameter, but I am never prompted when I click on Perform Maven Release.
Upvotes: 1
Views: 398
Reputation: 69440
Use a parametrized build and add a Parameter activeProfile
, which can have the values foo and bar. Then you add -P${activeProfile}
to the release command line
Upvotes: 3