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) 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 # Generate a management job for every release, stable and unstable
for release in total_rel: for release in total_rel:
for jobtype in ["unstable", "stable"]: for jobtype in ["unstable", "stable"]:
package_config = self.load_config("release-mgmt")
job_name = "mgmt_build_" + release + "_" + jobtype job_name = "mgmt_build_" + release + "_" + jobtype
if job_name in jobs: if job_name in jobs:
job = server.get_job(job_name) job = server.get_job(job_name)
@ -241,6 +243,16 @@ class Generator:
view = server.views["mgmt"] view = server.views["mgmt"]
view.add_job(job_name) 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__": if __name__ == "__main__":
generator = Generator() generator = Generator()

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

@ -8,18 +8,7 @@
<disabled>false</disabled> <disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers> <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>
<concurrentBuild>false</concurrentBuild> <concurrentBuild>false</concurrentBuild>
<builders/> <builders/>
<publishers/> <publishers/>

Loading…
Cancel
Save