Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
/ linuxboot-ci-api Public archive

API to submit job to the Linuxboot CI platform

License

Notifications You must be signed in to change notification settings

linuxboot/linuxboot-ci-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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...
...