formats/v1: specify format version

Specify the version, i.e. "1", that this format is able to read
and write. Additionally add a proper doc string describing the
format.
This commit is contained in:
Christian Kellner 2021-02-05 18:18:57 +00:00
parent 7e2c0c7000
commit 8f97c13dda

View file

@ -1,10 +1,20 @@
# Version 1 of the manifest description
""" Version 1 of the manifest description
This is the first version of the osbuild manifest description,
that has a "main" pipeline that consists of zero or more stages
to create a tree and optionally one assembler that assembles
the created tree into an artefact. The pipeline can have any
number of nested build pipelines. A sources section is used
to fetch resources.
"""
from typing import Dict, Optional, Tuple
from osbuild.meta import Index, ValidationResult
from ..pipeline import Manifest, Pipeline, detect_host_runner
VERSION = "1"
def describe(manifest: Manifest, *, with_id=False) -> Dict:
"""Create the manifest description for the pipeline"""
def describe_stage(stage):