[osbs] Add a phase to build images in OSBS

It will take RPM repo from a variant in this compose and a Dockerfile
from configured git and use it to build an image.

The build images are uploaded to some a Docker registry by OSBS and are
not directly part of compose (because there is no export function).
There is a new metadata file `osbs.json` that has some information that
can be used to find the image.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-06-20 15:43:55 +02:00
parent 95cfbfb3fe
commit b4fc97be03
6 changed files with 612 additions and 4 deletions

View file

@ -233,6 +233,7 @@ def run_compose(compose):
liveimages_phase = pungi.phases.LiveImagesPhase(compose)
livemedia_phase = pungi.phases.LiveMediaPhase(compose)
image_build_phase = pungi.phases.ImageBuildPhase(compose)
osbs_phase = pungi.phases.OSBSPhase(compose)
image_checksum_phase = pungi.phases.ImageChecksumPhase(compose)
test_phase = pungi.phases.TestPhase(compose)
@ -241,7 +242,8 @@ def run_compose(compose):
buildinstall_phase, productimg_phase, gather_phase,
extrafiles_phase, createiso_phase, liveimages_phase,
livemedia_phase, image_build_phase, image_checksum_phase,
test_phase, ostree_phase, ostree_installer_phase):
test_phase, ostree_phase, ostree_installer_phase,
osbs_phase):
if phase.skip():
continue
try:
@ -348,17 +350,20 @@ def run_compose(compose):
image_build_phase.start()
livemedia_phase.start()
ostree_installer_phase.start()
osbs_phase.start()
createiso_phase.stop()
liveimages_phase.stop()
image_build_phase.stop()
livemedia_phase.stop()
ostree_installer_phase.stop()
osbs_phase.stop()
image_checksum_phase.start()
image_checksum_phase.stop()
pungi.metadata.write_compose_info(compose)
osbs_phase.dump_metadata()
# TEST phase
test_phase.start()