In Jenkins is there a plugin for parameterized builds to make the parameters required? The fields under the standard "This build is parameterized" option do not seem to provide that.
Clarification: by "required" I mean that the build will not execute until the field is populated with a value. This would obviously preclude automated triggers.
To execute the Jenkins job from Jenkins web interface first go to respective project workspace and then click on “Build with Parameters” option from left panel. After that, you will be asked to choose/set parameter value (In my project I have set BROWSER parameter.)
The parameter is available as environment parameters. So e.g. a shell ($FOO, %FOO%) or Ant ( ${env. FOO} ) can access these values. This is not exactly a return value, but you can pass any parameter (with its value) to the downstream job with Parameterized Trigger Plugin.
The accepted answer is no longer valid.
There was a plugin that did that but is no longer maintained.
There's an open bug to support it.
In the mean time what you can do is check if your parameter is present and if not throw an error like:
if (params.SomeParam == null) { error("Build failed because of this and that..") }
This is the plugin i use to do this type of stuff: link...
You can set a regular expression to validate the input against
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With