Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new multi-arch build layout mode #580

Merged
merged 1 commit into from
Jul 11, 2019
Merged

Commits on Jul 11, 2019

  1. Add new multi-arch build layout mode

    Add a new mode which allows cosa to manipulate multi-arch build layouts:
    
    ```
    $ find builds
    builds
    builds/builds.json
    builds/30.1
    builds/30.1/x86_64
    builds/30.1/x86_64/coreos-assembler-config.tar.gz
    builds/30.1/x86_64/coreos-assembler-config-git.json
    builds/30.1/x86_64/fedora-coreos-30.1-qemu.qcow2
    ...
    ```
    
    A pipeline could e.g. dispatch builds for each architecture on different
    nodes, then group them back into a single workdir and have it
    manipulated by e.g. `buildupload` seamlessly.
    
    This new layout also matches the bucket layout for FCOS (see
    coreos/fedora-coreos-tracker#189).
    
    The basic idea is to add a `schema-version` to `builds.json` and denote
    the legacy behaviour as "pre-1.0.0", while `1.0.0` contains a different
    schema: each element in the `builds` array is now an object, which has
    an `id`, and a list of `archs` for which that build has been built:
    
    ```
    $ cat builds/builds.json
    {
        "schema-version": "1.0.0",
        "builds": [
            {
                "id": "30.1",
                "archs": [
                    "x86_64"
                ]
            }
        ],
        "timestamp": "2019-06-28T20:50:54Z"
    }
    ```
    
    We retain backwards-compatibility by simply checking the schema version.
    Right now, only new workdirs will have this layout. Pipelines which use
    `buildprep` will fetch `builds.json` as is and key off of its contents
    to determine the bucket layout as well. We can write new code in the
    future to convert previously single-arch buckets into the new layout to
    then enable multi-arch.
    jlebon committed Jul 11, 2019
    Configuration menu
    Copy the full SHA
    ce78830 View commit details
    Browse the repository at this point in the history