Creates a new BuildManager
instance.
- Object config The GHL
config.json
(see example) - Boolean logs Output logs if
true
Handles error responses
- Object res The HTTP response object
- Number code The HTTP response code
- Object error The error object to be used (error message in err property)
Handle a payload request
- Object req The HTTP request object
- Object res The HTTP response object
Run self.build
if it is defined
- Number id The build ID to rebuild
Queue a build to be run
- Object build The build to be queued
Run the next function in the queue
Respond to an HTTP request
- Object res The HTTP response object
- Number http_code The HTTP response code
- Object data The data object to be sent
Create self.build
function that can be rerun
- String repo The name of the repo to be passed into
self.getter
- String branch The name of the branch to be passed into
self.getter
Ensure payload object is valid
- Object req The HTTP request object
- Object res The HTTP response object
Run the stored self.build
Run github-getter to get the repo from GitHub
- String repo The repo to get from GitHub
- String branch The branch to checkout
- Function cb The callback to be run with the command output
Run the build scripts for the repo
- String repo The repo name to be passed to post-receive
- Function cb The callback to be run with the command output
Creates a new Server
instance.
- Object options An object containing the following fields:
logging
(Boolean): Output logs iftrue
config
(Object): The GHLconfig.json
(see example)
Start the http server
Stop the http server
Handle HTTP get requests
- Object req The HTTP request object
- Object res The HTTP response object
Generate DOM to send to UI of builds dashboard
Create an object of data to send to the client
- Number id The ID of the build to be generated