diff --git a/bin/pungi-koji b/bin/pungi-koji index e5d31084..2a62a125 100755 --- a/bin/pungi-koji +++ b/bin/pungi-koji @@ -358,41 +358,27 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None): # Store the password compose.conf["signing_key_password"] = signing_key_password - # INIT phase init_phase.start() init_phase.stop() - # PKGSET phase pkgset_phase.start() pkgset_phase.stop() - # BUILDINSTALL phase - start, we can run gathering, extra files and - # createrepo while buildinstall is in progress. - buildinstall_phase.start() - - # If any of the following three phases fail, we must ensure that - # buildinstall is stopped. Otherwise the whole process will hang. - try: - gather_phase.start() - gather_phase.stop() - - extrafiles_phase.start() - extrafiles_phase.stop() - - createrepo_phase.start() - createrepo_phase.stop() - - finally: - buildinstall_phase.stop() + # WEAVER phase - launches other phases which can safely run in parallel + essentials_schema = ( + buildinstall_phase, + (gather_phase, extrafiles_phase, createrepo_phase), + (ostree_phase, ostree_installer_phase), + ) + essentials_phase = pungi.phases.WeaverPhase(compose, essentials_schema) + essentials_phase.start() + essentials_phase.stop() if not buildinstall_phase.skip(): buildinstall_phase.copy_files() - ostree_phase.start() - ostree_phase.stop() - - pungi.phases.run_all([productimg_phase, - ostree_installer_phase]) + productimg_phase.start() + productimg_phase.stop() # write treeinfo before ISOs are created for variant in compose.get_variants(): @@ -408,11 +394,16 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None): pungi.metadata.write_media_repo(compose, arch, variant, timestamp) # Start all phases for image artifacts - pungi.phases.run_all([createiso_phase, - liveimages_phase, - image_build_phase, - livemedia_phase, - osbs_phase]) + compose_images_schema = ( + createiso_phase, + liveimages_phase, + image_build_phase, + livemedia_phase, + osbs_phase, + ) + compose_images_phase = pungi.phases.WeaverPhase(compose, compose_images_schema) + compose_images_phase.start() + compose_images_phase.stop() image_checksum_phase.start() image_checksum_phase.stop() @@ -421,7 +412,6 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None): compose.im.dump(compose.paths.compose.metadata("images.json")) osbs_phase.dump_metadata() - # TEST phase test_phase.start() test_phase.stop() diff --git a/doc/_static/phases.png b/doc/_static/phases.png index 28b2ac44..a6d40383 100644 Binary files a/doc/_static/phases.png and b/doc/_static/phases.png differ diff --git a/doc/_static/phases.svg b/doc/_static/phases.svg index 072e5dd2..66184b15 100644 --- a/doc/_static/phases.svg +++ b/doc/_static/phases.svg @@ -14,7 +14,7 @@ viewBox="0 0 839.33334 220.33335" id="svg2" version="1.1" - inkscape:version="0.92+devel unknown" + inkscape:version="0.91 r13725" sodipodi:docname="phases.svg" inkscape:export-filename="/home/lsedlar/repos/pungi/doc/_static/phases.png" inkscape:export-xdpi="90" @@ -26,16 +26,16 @@ borderopacity="1.0" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:zoom="0.8266234" - inkscape:cx="226.63066" - inkscape:cy="201.60264" + inkscape:zoom="1.6532468" + inkscape:cx="337.4932" + inkscape:cy="70.825454" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1920" - inkscape:window-height="1016" - inkscape:window-x="0" - inkscape:window-y="27" + inkscape:window-height="1020" + inkscape:window-x="1920" + inkscape:window-y="31" inkscape:window-maximized="1" units="px" inkscape:document-rotation="0" @@ -67,7 +67,7 @@ image/svg+xml - + @@ -100,87 +100,7 @@ style="font-size:13.14787769px;line-height:1.25">Pkgset - - Buildinstall - - Gather - - ExtraFiles - - Createrepo - - ImageChecksum Test + id="g3720"> Init + d="m 100.90864,859.8891 553.31842,0" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.17466855px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" /> + id="g241" + transform="translate(-60.108974,42.1407)"> OSTree + id="tspan3382" + x="403.15945" + y="847.65234" + style="font-size:13.14787769px;line-height:1.25">Productimg + id="g3668"> + id="g3663"> - Productimg - - - Buildinstall + + + + Gather + + + + + + ExtraFiles + + + + Createrepo + + + + OSTreeInstaller + x="256.90588" + y="840.3219">OSTree + + + + + OSTreeInstaller + + transform="translate(-60.108974,42.1407)"> @@ -343,7 +367,8 @@ y="971.54041" x="422.99252" style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - xml:space="preserve">