-streams = "stream:\n"
-for branch in branches.split(","):
- streams = streams + (" - %s:\n"
- " branch: '%s'\n" %
- (branch.replace('/', '-'),
- branch))
+str_streams = "stream:\n"
+for stream, options in streams.items():
+ str_streams += (" - %s:\n"
+ " branch: '%s'\n" %
+ (stream, options["branch"]))
+ str_streams += " jdk: %s\n" % options["jdks"].split(',')[0].strip() # noqa
+ str_streams += " jdks:\n"
+ for jdk in options["jdks"].split(","):
+ str_streams += " - %s\n" % jdk.strip()
+
+ # Disable autorelease validate job unless project is participating
+ # in autorelease, JJB does not allow flipping a boolean so we have to
+ # flip it here via not operator since the JJB configuration for disabling
+ # a Jenkins Job is "disabled: bool".
+ str_streams += " disable_autorelease: %s\n" % (not options.get(
+ "autorelease", False))
+
+ # Disable the distribution-check job unless project enables it
+ str_streams += " disable_distribution_check: %s\n" % (
+ not options.get("distribution-check", True))