I'm trying to add a String parameter to my jenkins build, but i can't find an option to make it optional, on the Jenkins WIKI i found a screeshot and there was an option to make it optional: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build .
All parameters are "optional". Unless it's a Validating String Parameter, Jenkins doesn't care what value you've entered or if you've entered anything at all.
The only thing that cares about the parameters is your job implementation, i.e. your scripts (bash) and other action that are configured to use the parameter.
If your parameter is called "Param", you can access it's value through:
${Param}
on Linux.%Param%
on Windows.Edit to answer comments:
To pass params from a "parent" build to the downstream builds, depends on how you trigger the downstream builds. If you are using Call/Trigger Parameterized Build plugin (which you should be), then there is a simple option to pass parent parameters to downsteam builds. They will be available in child builds through the same param name, like ${Param}
in the above example.
If you are triggering it some other way, there are a number of workarounds, mainly through storing them in a property file and then loading that property file in child build through EnvInject plugin