jenkins-rel: do not set keepUndefinedParameters
Jenkins 1.651.2 prevents settings environment variables from build parameters they are explicitly defined in the job configuration. That is required by the Gearman plugin and that can be enabled with:
-Dhudson.model.ParametersAction.keepUndefinedParameters=true
This was done back in 2016 Iafd5ccc1a8bb7938cd7dbbd04714baad1ced1916
Since the releasing Jenkins does not have the Gearman plugin we should remove that flag.
Only set the flag if scap has the setting keep_undefined_parameters
set to true.
Add a comment block with comments borrowed from the original in Puppet.
I have tested the commit with the following python code:
from jinja2 import Environment, PackageLoader
import yaml
env = Environment(loader=PackageLoader("scap"))
template = env.get_template("override.conf.j2")
for env in ['ci', 'releasing']:
with open('scap/environments/%s/vars.yaml' % env) as f:
params = yaml.safe_load(f)
print("==== %s ====" % env)
print(template.render(**params))
Bug: T133737