linuxboot-ci-api

command module
v0.0.0-...-6b5e278 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2018 License: MIT Imports: 3 Imported by: 0

README

Linuxboot CI API

API to submit job to the Linuxboot CI platform.

API

NB.

API is in work in progress state and can change in the future

Submit a job

POST /v1/jobs

Body

{
    "repository": {
	    "url": "https://github.com/ggiamarchi/linuxboot-ci-test.git"
    }
}

or, to build a specific branch

{
    "repository": {
	    "url": "https://github.com/ggiamarchi/linuxboot-ci-test.git",
        "branch": "master"
    }
}

Response

HTTP/1.1 200 ACCEPTED
Content-Type: application/json; charset=utf-8
...

{
    "id":199,
    "repository":{
        "url":"https://github.com/ggiamarchi/linuxboot-ci-test.git",
        "branch":null
    },
    "submitDate":"2018-04-09T17:01:30.942378478+02:00",
    "status":"PENDING"
}

Get job status

GET /v1/jobs/:jobId

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
...

{
    "id":199,
    "repository":{
        "url":"https://github.com/ggiamarchi/linuxboot-ci-test.git",
        "branch":null
    },
    "submitDate":"2018-04-09T17:01:30.942378478+02:00",
    "status":"RUNNING"
}

Get job logs

GET /v1/jobs/:jobId/logs[?raw=true]

If raw=true query parameter is set, API response will be plain text instead of JSON.

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
...

{
    "log": "..."
}

or with raw=true

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
...

[2018-04-09 10:21:00] Setting up virtual machine configuration...
[2018-04-09 10:21:25] Running virtual machine...
[2018-04-09 10:21:28] Waiting for virtual machine network...
...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL