{"id":16301111,"url":"https://github.com/alexdaniel/sparky","last_synced_at":"2026-01-21T11:33:26.927Z","repository":{"id":73423416,"uuid":"108557878","full_name":"AlexDaniel/sparky","owner":"AlexDaniel","description":"Sparky is a continues integration server based on Sparrow/Sparrowdo ecosystem.","archived":false,"fork":false,"pushed_at":"2017-10-27T14:44:36.000Z","size":171,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T01:16:39.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl 6","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexDaniel.png","metadata":{"files":{"readme":"README.md","changelog":"Changes.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-27T14:42:28.000Z","updated_at":"2021-03-15T14:53:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"a114f579-710c-4665-875f-f7b4cd672253","html_url":"https://github.com/AlexDaniel/sparky","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlexDaniel/sparky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDaniel%2Fsparky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDaniel%2Fsparky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDaniel%2Fsparky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDaniel%2Fsparky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexDaniel","download_url":"https://codeload.github.com/AlexDaniel/sparky/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDaniel%2Fsparky/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T20:53:50.867Z","updated_at":"2026-01-21T11:33:26.890Z","avatar_url":"https://github.com/AlexDaniel.png","language":"Perl 6","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SYNOPSIS\n\nSparky is a continues integration server based on Sparrow/Sparrowdo ecosystem.\n\n# Build status\n\n[![Build Status](https://travis-ci.org/melezhik/sparky.svg)](https://travis-ci.org/melezhik/sparky)\n\n# Sparky workflow in 4 lines:\n\n    $ sparkyd # run Sparky daemon to build your projects\n    $ perl6 bin/sparky-web.pl6 # run Sparky web ui to see build statuses and reports\n    $ nano ~/.sparky/projects/my-project/sparrowfile  # write a build scenario\n    $ firefox 127.0.0.1:3000 # see what's happening\n\n# Installation\n\n    $ sudo apt-get install sqlite3\n    $ git clone https://github.com/melezhik/sparky.git\n    $ cd sparky \u0026\u0026 zef install .\n\n# Setup\n\nFirst you should run database initialization script to populate database schema:\n\n    $ perl6 db-init.pl6\n\n# Running daemon\n\nThen you need to run the sparky daemon\n\n    $ sparkyd\n\n* Sparky daemon traverses sub directories found at the project root directory.\n\n* For every directory found initiate build process invoking sparky worker ( `sparky-runner.pl6` ).\n\n* Sparky root directory default location is `~/.sparky/projects`.\n\n* Once all the sub directories gets passed, sparky daemon sleeps for $timeout seconds.\n\n* A timeout option allow to adjust a load to your system.\n\n* You can change a timeout by applying `--timeout` parameter when running sparky daemon:\n\n    $ sparkyd --timeout=600 # sleep 10 minutes\n\n* You can also set a timeout by using `SPARKY_TIMEOUT` environment variable:\n\n    $ SPARKY_TIMEOUT=30 sparkyd ...\n\nRunning sparky in daemonized mode.\n\nAt the moment sparky can't daemonize itself, as temporary workaround use linux `nohup` command:\n\n    $ nohup sparkyd \u0026\n\nOr you can look at systemd scripts located at `./systemd` directory.\n\n# Running web ui\n\nAnd finally sparky has simple web ui to show builds statuses and reports.\n\nTo run Sparky web ui launch `sparky-web.pl6` script from the `bin/` directory:\n\n    $ perl6 bin/sparky-web.pl6\n\nThis is [Bailador](https://github.com/Bailador/Bailador) application, so you can set any Bailador related options here.\n\nFor example:\n\n    BAILADOR=host:0.0.0.0,port:5000 perl6 bin/sparky-web.pl6\n\n\n![web-ui](https://raw.githubusercontent.com/melezhik/sparky/master/images/sparky-web-ui.png)\n\n\n# Creating first sparky project\n\nSparky project is just a directory located at the sparky root directory:\n\n    $ mkdir ~/.sparky/projects/bailador-app\n\n# Writting build scenario\n\nSparky is heavily based on Sparrowdo, so I encourage you to read [Sparrowdo docs](https://github.com/melezhik/sparrowdo)\n_to know how to write Sparky scenarios_.\n\nHere is a short example.\n\nSay, we want to check out the Baildor source code from Git, install dependencies and then run unit tests:\n\n    $ nano ~/.sparky/projects/bailador-app/sparrowfile\n\n    package-install 'git';\n\n    git-scm 'https://github.com/Bailador/Bailador.git';\n\n    zef 'Path::Iterator';\n    zef '.', %( depsonly =\u003e True );\n    zef 'TAP::Harness';\n\n    bash 'prove6 -l', %(\n      debug =\u003e True,\n      envvars =\u003e %(\n        PATH =\u003e '/root/.rakudobrew/moar-master/install/share/perl6/site/bin:$PATH'\n      )\n    );\n\n# Configure Sparky workers\n\nBy default the build scenario gets executed _on the same machine you run Sparky at_, but you can change this\nto _any remote host_ setting Sparrowdo related parameters in the `sparky.yaml` file:\n\n    $ nano ~/.sparky/projects/bailador-app/sparky.yaml\n\n    sparrowdo:\n      host: '192.168.0.1'\n      ssh_private_key: /path/to/ssh_private/key.pem\n      ssh_user: sparky\n      no_index_update: true\n\nYou can read about the all [available parameters](https://github.com/melezhik/sparrowdo#sparrowdo-client-command-line-parameters) in Sparrowdo documentation.\n\n# Purging old builds\n\nTo remove old build set `keep_builds` parameter in `sparky.yaml`:\n\n    $ nano ~/.sparky/projects/bailador-app/sparky.yaml\n\n    keep_builds: 10\n\nThat makes Sparky remove old build and only keep last `keep_builds` builds.\n\n# Run by cron\n\nIt's possible to setup scheduler for Sparky builds, you should define `crontab` entry in sparky yaml file.\nfor example to run a build every hour at 30,50 or 55 minute say this:\n\n    $ nano ~/.sparky/projects/bailador-app/sparky.yaml\n\n    crontab: \"30,50,55 * * * *\"\n\n\nFollow [Time::Crontab](https://github.com/ufobat/p6-time-crontab) documentation on crontab entries format.\n\n# Disable project\n\nYou can disable project builds by setting `disable` option to true:\n\n    $ nano ~/.sparky/projects/bailador-app/sparky.yaml\n\n    disabled: true\n\nIt's handy when you start a new project and don't want to add it into build pipeline.\n\n\n# Downstream projects\n\nYou can run downstream projects by setting `downstream` field at the upstream project `sparky.yaml` file:\n\n    $ nano ~/.sparky/projects/main/sparky.yaml\n\n    downstream: downstream-project\n\nAnd the by setting `is_downstream` field to `true` at the downstream project `sparky.yaml` file:\n\n    $ nano ~/.sparky/projects/downstream-project/sparky.yaml\n\n    is_downstream: true\n\n# Command line client\n\nYou can build the certain project using sparky command client called `sparky-runner.pl6`:\n\n    $ sparky-runner.pl6 --dir=~/.sparky/projects/bailador-app\n\nOr just:\n\n    $ cd ~/.sparky/projects/bailador-app \u0026\u0026 sparky-runner.pl6\n\n# Sparky runtime parameters\n\nAll this parameters could be overridden by command line ( `--root`, `--work-root` )\n\n##  Rood directory\n\nThis is sparky root directory, or directory where Sparky looks for the projects to get built:\n\n    ~/.sparky/projects/\n\n##  Work directory\n\nThis is working directory where sparky might place some stuff, useless at the moment:\n\n    ~/.sparky/work\n\n# Sparrowdo runtime parameters\n\nThese parameters can't be overridden and should be treated as internal Sparrowdo stuff.\n\nI list them here for documentation purposes only.\n\n## SparrowRoot\n\n  `/opt/sparky-sparrowdo/$project`\n\n## SparrowCwd\n\n  `/var/data/sparky/$project`\n\n# Environment variables\n\n## SPARKY_SKIP_CRON\n\nYou can disable cron check to run project forcefully, by setting `SPARKY_SKIP_CRON` environment variable:\n\n    $ export SPARKY_SKIP_CRON=1 \u0026\u0026 sparkyd\n\n## SPARKY_ROOT\n\nSets the sparky root directory\n\n## SPARKY_TIMEOUT\n\nSets timeout for sparky workers, see [Running daemon](#running-daemon) section.\n\n# Running under other databases engines (MySQL, PostgreSQL)\n\nBy default Sparky uses sqlite as database engine, which makes it easy to use when developing.\nHowever sqlite has limitation on transactions locking whole database when doing inserts/updates (Database Is Locked errors).\n\nif you prefer other databases here is guideline.\n\n## Create sparky configuration file\n\nYou should defined database engine and connection parameters, say we want to use MySQL:\n\n    $ nano ~/sparky.yaml\n\n    database:\n      engine: MySQL\n      host: $dbhost\n      port: $dbport\n      name: $dbname\n      user: $dbuser\n      pass: $dbpassword\n\nFor example:\n\n    database:\n      engine: mysql\n      host: \"127.0.0.1\"\n      port: 3306\n      name: sparky\n      user: sparky\n      pass: \"123\"\n\n## Installs dependencies\n\nDepending on platform it should be client needed for your database API, for example for Debian we have to:\n\n    $ sudo yum install mysql-client\n\n## Creating database user, password and schema\n\nDB init script will generate database schema, provided that user defined and sparky configuration file has access to\nthe database:\n\n    $ perl6 db-init.pl6\n\nThat is it, now sparky runs under MySQL!\n\n# See also\n\n[Bailador](https://github.com/Bailador/Bailador) - A light-weight route-based web application framework for Perl 6.\n[Sparky-docker](https://github.com/melezhik/sparky-docker) - Run Sparky as Docker container.\n\n# Author\n\nAlexey Melezhik\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdaniel%2Fsparky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdaniel%2Fsparky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdaniel%2Fsparky/lists"}