job

At a lower level, a job is the combination of a tree (or repository) and the name of the “kernel” that are being built.

The tree value is an arbitrary name associated with the repository; the kernel value usually is the output of the git-describe command:

  • git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git is the tree called mainline.
  • The kernel, for example, could be v4.0-rc3-194-g5fb0f7fa7f6e.

GET

The following schema covers the data that is available with a GET request.

Note

Some of the values describe here are not declared in the POST schema. They are taken from the defconfig schema at import time and reported here for easier search.

{
    "$schema": "http://api.kernelci.org/json-schema/1.1/get_job.json",
    "id": "http://api.kernelci.org/json-schema/1.1/get_job.json",
    "title": "job",
    "description": "A job as provided by the CI loop",
    "type": "object",
    "properties": {
        "version": {
            "type": "string",
            "description": "The version number of this JSON schema",
            "enum": ["1.0", "1.1"]
        },
        "_id": {
            "type": "object",
            "description": "The ID of ths object",
            "properties": {
                "$oid": {
                    "type": "string",
                    "description": "The actual ID value"
                }
            }
        },
        "created_on": {
            "type": "object",
            "description": "Creation date of the object",
            "properties": {
                "$date": {
                    "type": "number",
                    "description": "Milliseconds from epoch time"
                }
            }
        },
        "private": {
            "type": "boolean",
            "description": "If the job is private or not",
            "default": false
        },
        "kernel": {
            "type": "string",
            "description": "The name of the kernel"
        },
        "job": {
            "type": "string",
            "description": "The name of the job"
        },
        "status": {
            "type": "string",
            "description": "The status of the job",
            "enum": ["BUILD", "FAIL", "PASS", "UNKNOWN"]
        },
        "git_branch": {
            "type": "string",
            "description": "The name of the branch"
        },
        "git_commit": {
            "type": "string",
            "description": "The git SHA of the commit used for the build"
        },
        "git_describe": {
            "type": "string",
            "description": "The name of the git describe command"
        },
        "git_url": {
            "type": "string",
            "description": "The URL of the git web interface where the code used to build can be found"
        }
    }
}

POST

The following schema covers the data that should be available in the JSON data sent to the server.

{
    "$schema": "http://api.kernelci.org/json-schema/1.1/post_job.json",
    "id": "http://api.kernelci.org/json-schema/1.1/post_job.json",
    "title": "job",
    "description": "A job data to trigger build import",
    "type": "object",
    "properties": {
        "version": {
            "type": "string",
            "description": "The version number of this JSON schema",
            "enum": ["1.0", "1.1"],
            "default": "1.1"
        },
        "job": {
            "type": "string",
            "description": "The job associated with this object"
        },
        "kernel": {
            "type": "string",
            "description": "The kernel associated with this object"
        },
        "git_branch": {
            "type": "string",
            "description": "The name of the branch"
        },
        "git_commit": {
            "type": "string",
            "description": "The git SHA of the commit used"
        },
        "status": {
            "type": "string",
            "description": "The status this object should be set to",
            "enum": ["PASS", "FAIL", "BUILD", "UNKNOWN"]
        }
    },
    "required": ["job", "kernel", "git_branch"]
}