Don't directly trigger the management job automatically, and create a master merger job.

master
Simon Quigley 6 years ago
parent 872b968a1a
commit 4cda798504

@ -224,10 +224,12 @@ class Generator:
view.add_job(job_name)
# From here on out, the same template is used
package_config = self.load_config("release-mgmt")
# Generate a management job for every release, stable and unstable
for release in total_rel:
for jobtype in ["unstable", "stable"]:
package_config = self.load_config("release-mgmt")
job_name = "mgmt_build_" + release + "_" + jobtype
if job_name in jobs:
job = server.get_job(job_name)
@ -241,6 +243,16 @@ class Generator:
view = server.views["mgmt"]
view.add_job(job_name)
# Generate one last merger management job
if "merger" in jobs:
job = server.get_job("merger")
job.update_config(package_config)
else:
job = server.create_job("merger", str(package_config))
view = server.views["mgmt"]
view.add_job(job_name)
if __name__ == "__main__":
generator = Generator()

@ -37,7 +37,7 @@
<triggers>
<jenkins.triggers.ReverseBuildTrigger>
<spec></spec>
<upstreamProjects>merger</upstreamProjects>
<upstreamProjects>jobgenerator</upstreamProjects>
<threshold>
<name>SUCCESS</name>
<ordinal>0</ordinal>

@ -8,18 +8,7 @@
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<jenkins.triggers.ReverseBuildTrigger>
<spec></spec>
<upstreamProjects>jobgenerator</upstreamProjects>
<threshold>
<name>SUCCESS</name>
<ordinal>0</ordinal>
<color>BLUE</color>
<completeBuild>true</completeBuild>
</threshold>
</jenkins.triggers.ReverseBuildTrigger>
</triggers>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders/>
<publishers/>

Loading…
Cancel
Save