Finished refactor to base the build process around explicit run instances.

* Implemented periodic maintenance window.
* Moved worker creation into the core module.
* Worker processes no longer create run requests, but read queued requests from
  the file system.
* Build status and logs have been moved into the StrawBoss data directory.
* An initial build status is recorded when the job is queued.
* Build status is recorded for build references as well as actual versions.
  So there will be a build status for "master", for example, that is
  overwritten whenever "master" is built for that step.
* RunRequests now include a timestamp.
* Added a Run object to contain both a RunRequest and the corresponding
  BuildStatus for that run.
* API endpoints that talk about runs now return Run objects instead of
  RunRequests.
* Moved all data layer operations into the core module so that the
  "database API" only lives in one place.
This commit is contained in:
Jonathan Bernard
2017-11-23 07:30:48 -06:00
parent e000b37c35
commit 82a7b301ea
10 changed files with 364 additions and 228 deletions

View File

@ -53,16 +53,26 @@ the `strawboss` executable. This is the configuration file for StrawBoss
itself. The contents are expected to be a valid JSON object. The top level keys
are:
* `buildDataDir`: A string denoting the path to the directory where StrawBoss
keeps metadata about builds it has performed and the artifacts resulting from
the builds.
* `buildDataDir`: *(optional)* A string denoting the path to the directory
where StrawBoss keeps metadata about builds it has performed and the
artifacts resulting from the builds. *(defaults to `build-data`)*
* `authSecret`: Secret key used to sign JWT session tokens.
* `authSecret`: *(required)* Secret key used to sign JWT session tokens.
* `users`: the array of user definition objects. Each user object is required
* `users`: *(required)* the array of user definition objects. Each user object is required
to have `username` and `hashedPwd` keys, both string.
* `projects`: an array of project definitions (detailed below).
* `projects`: *(required)* an array of project definitions (detailed below).
* `pwdCost`: *(required)* parameter to the user password hashing algorithm determining the
computational cost of the hash.
* `maintenancePeriod`: *(optional)* how often, in milliseconds, should the
StrawBoss server perform maintenance (clear finished workers, etc).
*(defaults to `10000`, every 10 seconds)*.
* `debug`: boolean, should debug behavior be enabled. This is primarily
intended for testing during StrawBoss development. *(defaults to `false`)*
All are required.