| |
@@ -119,10 +119,12 @@
|
| |
release and milestone. If you set a valid release number and leave
|
| |
milestone unset, you'll get an Atomic only if it exists and
|
| |
BranchedNightly for the same values doesn't, otherwise you'll get
|
| |
- BranchedNightly. You can never get a Docker by nightly detection,
|
| |
- you must specify it via milestone, cid or url. If you set a valid
|
| |
- release number and a valid nightly milestone, you'll get what you
|
| |
- asked for. For any other case you'll wind up with RawhideNightly.
|
| |
+ BranchedNightly. You can never get a Docker or Cloud by nightly
|
| |
+ detection, you must specify it via milestone, cid or url. If you
|
| |
+ set a valid release number and a valid nightly milestone, you'll
|
| |
+ get what you asked for. For any other case you'll wind up with
|
| |
+ RawhideNightly.
|
| |
+
|
| |
If you set a nightly type milestone and leave compose unset, we
|
| |
will use today's date as the compose. For all cases, if you
|
| |
specify respin, you'll get an instance with that respin, whether
|
| |
@@ -179,7 +181,7 @@
|
| |
otherwise we leave it blank (this is so e.g. (22, '', '')
|
| |
returns Fedora 22).
|
| |
"""
|
| |
- snaps = ('rawhide', 'branched', 'atomic', 'docker', 'production')
|
| |
+ snaps = ('rawhide', 'branched', 'atomic', 'docker', 'cloud', 'production')
|
| |
if not compose and not_or_str((release, milestone), snaps):
|
| |
logger.debug("Guessing date")
|
| |
compose = fedfind.helpers.date_check(
|
| |
@@ -211,7 +213,9 @@
|
| |
# appropriate release.
|
| |
if milestone.lower() in ('branched', 'production'):
|
| |
return fedfind.helpers.get_current_release() + 1
|
| |
- elif milestone.lower() in ('atomic', 'docker'):
|
| |
+ elif milestone.lower() in ('atomic', 'docker', 'cloud'):
|
| |
+ # Note: cloud is actually composed for both current and
|
| |
+ # prev, but we gotta guess something...
|
| |
return fedfind.helpers.get_current_release()
|
| |
elif milestone.lower() == 'respin':
|
| |
# no expected release here
|
| |
@@ -265,6 +269,8 @@
|
| |
testcls = partial(AtomicNightly, release=release, compose=date)
|
| |
elif milestone.lower() == 'docker':
|
| |
testcls = partial(DockerNightly, release=release, compose=date)
|
| |
+ elif milestone.lower() == 'cloud':
|
| |
+ testcls = partial(CloudNightly, release=release, compose=date)
|
| |
else:
|
| |
testcls = partial(BranchedNightly, release=release, compose=date)
|
| |
respin = 5
|
| |
@@ -286,11 +292,13 @@
|
| |
"candidate compose!")
|
| |
return Production(release, date, respin, cid=cid)
|
| |
|
| |
- if milestone.lower() in ('atomic', 'docker', 'branched'):
|
| |
+ if milestone.lower() in ('atomic', 'docker', 'cloud', 'branched'):
|
| |
if milestone.lower() == 'atomic':
|
| |
klass = AtomicNightly
|
| |
elif milestone.lower() == 'docker':
|
| |
klass = DockerNightly
|
| |
+ elif milestone.lower() == 'cloud':
|
| |
+ klass = CloudNightly
|
| |
else:
|
| |
klass = BranchedNightly
|
| |
if respin is not None:
|
| |
@@ -304,7 +312,7 @@
|
| |
logger.warn("Invalid milestone %s for nightly! Ignoring.",
|
| |
milestone)
|
| |
# Guess: try Branched, if it doesn't exist, try Atomic. We
|
| |
- # don't include 'production' or Docker in guessing.
|
| |
+ # don't include 'production' or Docker or Cloud.
|
| |
if respin is not None:
|
| |
branched = BranchedNightly(release=release, compose=date,
|
| |
respin=respin, cid=cid)
|
| |
@@ -338,14 +346,18 @@
|
| |
# Assume a real Pungi 4 compose ID
|
| |
(dist, release, date, typ, respin) = fedfind.helpers.parse_cid(cid, dist=True)
|
| |
|
| |
- # Atomic stable nightly composes, 'Fedora-Atomic' product name
|
| |
+ # Atomic stable nightly composes, 'Fedora-Atomic' shortname
|
| |
if dist == 'Fedora-Atomic':
|
| |
return (release, 'Atomic', date, int(respin))
|
| |
|
| |
- # Docker stable nightly composes, 'Fedora-Docker' product name
|
| |
+ # Docker stable nightly composes, 'Fedora-Docker' shortname
|
| |
if dist == 'Fedora-Docker':
|
| |
return (release, 'Docker', date, int(respin))
|
| |
|
| |
+ # Cloud stable nightly composes, 'Fedora-Cloud' shortname
|
| |
+ if dist == 'Fedora-Cloud':
|
| |
+ return (release, 'Cloud', date, int(respin))
|
| |
+
|
| |
# Semi-official stable live respin composes
|
| |
if dist == 'FedoraRespin':
|
| |
return (release, 'Respin', date, 0)
|
| |
@@ -983,7 +995,9 @@
|
| |
@property
|
| |
def product(self):
|
| |
"""Compose "product" - the first component of the compose ID,
|
| |
- so 'Fedora' or 'Fedora-Atomic' or 'Fedora-Docker'.
|
| |
+ so 'Fedora', 'Fedora-Atomic', 'Fedora-Docker', 'Fedora-Cloud'
|
| |
+ etc. In productmd terms this is in fact the 'short name', but
|
| |
+ Fedora releng decided not to make them very short...
|
| |
"""
|
| |
return fedfind.helpers.parse_cid(self.cid, dist=True)[0]
|
| |
|
| |
@@ -1110,16 +1124,16 @@
|
| |
@property
|
| |
def expected_images(self):
|
| |
"""See abstract class docstring for information on what this
|
| |
- is. These nightlies are pretty odd, and only Cloud images are
|
| |
- built, so we do not take the 'universal' definition from the
|
| |
- Release class, but we do 'expect' some non-blocking images,
|
| |
- because I think people interested in these nightlies probably
|
| |
- want to make sure all the Cloud images built.
|
| |
+ is. These nightlies include only Atomic images, so we do not
|
| |
+ take the 'universal' definition from the Release class, we
|
| |
+ just 'expect' the important Atomic images. Historical note:
|
| |
+ these composes included Cloud images for some time, but this
|
| |
+ stopped around early 2017. We don't bother 'expecting' Cloud
|
| |
+ images for composes from before the change, it just doesn't
|
| |
+ seem important enough to be worth bothering with.
|
| |
"""
|
| |
return (
|
| |
- ('cloud_base', 'raw-xz', 'x86_64'),
|
| |
- ('cloud_base', 'vagrant-libvirt', 'x86_64'),
|
| |
- ('cloud_base', 'vagrant-virtualbox', 'x86_64'),
|
| |
+ ('atomic', 'qcow2', 'x86_64'),
|
| |
('atomic', 'raw-xz', 'x86_64'),
|
| |
('atomic', 'vagrant-libvirt', 'x86_64'),
|
| |
('atomic', 'vagrant-virtualbox', 'x86_64'),
|
| |
@@ -1127,6 +1141,39 @@
|
| |
)
|
| |
|
| |
|
| |
+ class CloudNightly(Pungi4Release):
|
| |
+ """Cloud nightly composes for the current stable release (like
|
| |
+ the Atomic nightly composes, except they only build Cloud images).
|
| |
+ As with AtomicNightly, these are 'production' type composes, even
|
| |
+ though they happen nightly.
|
| |
+ """
|
| |
+ def __init__(self, release, compose, respin=0, cid=None):
|
| |
+ release = str(release)
|
| |
+ compose = str(compose)
|
| |
+ respin = str(respin)
|
| |
+ path = "Fedora-Cloud-{0}-{1}.{2}/compose".format(
|
| |
+ release, compose, respin)
|
| |
+ url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
+ super(CloudNightly, self).__init__(
|
| |
+ url, release=release, milestone="Cloud", compose=compose,
|
| |
+ respin=respin, typ="production", cid=cid)
|
| |
+ self._release = release
|
| |
+
|
| |
+ @property
|
| |
+ def expected_images(self):
|
| |
+ """See abstract class docstring for information on what this
|
| |
+ is. These nightlies include only Cloud images, so we do not
|
| |
+ take the 'universal' definition from the Release class, we
|
| |
+ just 'expect' the intended images.
|
| |
+ """
|
| |
+ return (
|
| |
+ ('cloud_base', 'qcow2', 'x86_64'),
|
| |
+ ('cloud_base', 'raw-xz', 'x86_64'),
|
| |
+ ('cloud_base', 'vagrant-libvirt', 'x86_64'),
|
| |
+ ('cloud_base', 'vagrant-virtualbox', 'x86_64'),
|
| |
+ )
|
| |
+
|
| |
+
|
| |
class DockerNightly(Pungi4Release):
|
| |
"""Docker nightly composes for the current stable release (like
|
| |
the Atomic nightly composes, except they only build the Docker
|
| |
@@ -1148,11 +1195,9 @@
|
| |
@property
|
| |
def expected_images(self):
|
| |
"""See abstract class docstring for information on what this
|
| |
- is. These nightlies are pretty odd, and only Cloud images are
|
| |
- built, so we do not take the 'universal' definition from the
|
| |
- Release class, but we do 'expect' some non-blocking images,
|
| |
- because I think people interested in these nightlies probably
|
| |
- want to make sure all the Cloud images built.
|
| |
+ is. These nightlies include only Docker images, so we do not
|
| |
+ take the 'universal' definition from the Release class, we
|
| |
+ just 'expect' the intended images.
|
| |
"""
|
| |
return (
|
| |
('docker_base', 'docker', 'x86_64'),
|
| |
The main thing here is adding support for the new Cloud nightly
composes. They're nightly stable release composes much like the
Atomic and Docker composes, with one difference besides the
obvious: they're done for both the current stable and for the
previous stable. We also tweak a few things in the other two
nightly stable classes, some mistakes in doc strings and fixes
for the expected images.
Signed-off-by: Adam Williamson awilliam@redhat.com