api

HTTP API

Sparky HTTP API allows execute Sparky jobs remotely over HTTP

Trigger Sparky job

POST /build/project/$project

Returns $key - unique build identification ( aka Sparky Job ID )

Trigger job with parameters

POST /build-with-tags/project/$project @json

For example:

Request data - request.json:

{ 
  "description" : "test build",
  "tags" : "message=hello,from=Sparky"
}

Request via curl:

curl -k  -H "Content-Type: application/json" \
--data "@request.json" \
https://127.0.0.1:4000/build-with-tags/project/hello-world

Will trigger a job hello-world, with named parameters message and from.

Parameters are handled within Sparky scenario as:

my $message = tags()<message>;
my $from = tags()<from>;

Job status

Get job status - status of the last executed build:

GET /status/$project/$key

Returns $status:

  • 0 - build is running

  • -1 - build failed

  • 1 - build finished successfully

  • -2 - unknown state ( build does not exist or is placed in a queue )

Badges

Get job badge - image with status of the last executed build

GET /badge/$project

Job report

Get build report in raw text format

GET /report/raw/$project/$key

Sparky v0.2.32

Sparky is a flexible and minimalist continuous integration server and distribute tasks runner written in Raku

Authors

  • Alexey Melezhik

License

Artistic-2.0

Dependencies

YAMLishDBIishDBIish::PoolJSON::FastHTTP::TinySparrow6:ver<0.0.90+>Sparrowdo:ver<0.1.54+>Sparky-Job-Api:ver<0.0.12+>Time::CrontabFile::Directory::TreecroCro::HTTP:ver<0.8.9+>Cro::HTTP::ServerCro::HTTP::RouterCro::WebApp::TemplateData::Dump:ver<0.0.12+>Text::Markdown

Test Dependencies

Provides

  • Sparky
  • Sparky::HTML
  • Sparky::Job
  • Sparky::Security
  • Sparky::Utils

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.