[−][src]Trait rusty_ci::buildsystem::BuildSystem
This trait describes how to build rusty-ci using a particular backend. For example, if you dont want to directly install the rusty-ci dependencies using the Cmd object as this trait defaults to, you can implement the trait for your type, and change the install method, similar to the BashBuildSystem implementation in this module.
Provided methods
fn preinstall(&mut self) -> Result<(), String>
Preinstall is called by the install method unless it is overloaded. This is usefult for printing a warning message or prompting the user before installing the dependencies for rusty-ci
fn install(&mut self) -> Result<(), String>
This method installs rusty-ci's dependencies, python3 and buildbot.
fn prebuild(&mut self) -> Result<(), String>
This method is similar to preinstall, but it is called by the build method instead of the install method
fn rebuild(&mut self, master: MasterConfig) -> Result<(), String>
Rebuild master without killing any running processes
fn build(&mut self, master: MasterConfig) -> Result<(), String>
fn start(&mut self, workers: &[Worker]) -> Result<(), String>
This starts the master and the workers
fn stop(&mut self) -> Result<(), String>
This kills the buildbot workers and all instances of python and python3
fn reconfigure_master(&mut self) -> Result<(), String>
This method is used by the rebuild
method to update the master without killing it
fn start_master(&mut self) -> Result<(), String>
This method is used by the start
method to spin up the master
fn start_workers(&mut self, workers: &[Worker]) -> Result<(), String>
This method is used by the start
method to spin up the workers
fn create_workers(&mut self, workers: &[Worker]) -> Result<(), String>
Creates each worker in its proper directory
fn write_worker_configs(&mut self, workers: &[Worker]) -> Result<(), String>
Writes the configuration buildbot.tac
file for each worker
fn create_master(&mut self) -> Result<(), String>
Creates the master in the master
directory
fn write_master_config(&mut self, master: &MasterConfig) -> Result<(), String>
Writes the master configuration file
fn install_python(&mut self) -> Result<(), String>
This method installs Python. You probably do need to overload this, I dont know for sure if it completely works. The bash impl of the buildsystem is the most reliable for now.
fn install_buildbot(&mut self) -> Result<(), String>
This method installs buildbot. Again, you probably want to overload this
because it does not use a Python virtual environment, or venv
.
The venv
is important because it does not modify the system wide packages.
Implementors
impl BuildSystem for Bash
[src]
fn install(&mut self) -> Result<(), String>
[src]
Writes install script to install.sh
for user to run
fn install_python(&mut self) -> Result<(), String>
[src]
fn install_buildbot(&mut self) -> Result<(), String>
[src]
impl BuildSystem for DefaultBuildSystem
[src]
impl BuildSystem for Makefile
[src]
fn install(&mut self) -> Result<(), String>
[src]
Write the makefile
fn prebuild(&mut self) -> Result<(), String>
[src]
Prompts user to confirm they've already ran the install subcommand
fn install_python(&mut self) -> Result<(), String>
[src]
fn install_buildbot(&mut self) -> Result<(), String>
[src]
impl BuildSystem for Quiet
[src]
fn rebuild(&mut self, master: MasterConfig) -> Result<(), String>
[src]
Rebuild master without killing any running processes
fn install(&mut self) -> Result<(), String>
[src]
Writes install script to install.sh
for user to run
fn build(&mut self, master: MasterConfig) -> Result<(), String>
[src]
fn stop(&mut self) -> Result<(), String>
[src]
This kills the buildbot workers and all instances of python and python3
fn start(&mut self, workers: &[Worker]) -> Result<(), String>
[src]
This starts the master and the workers