[−][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 build(
&mut self,
master: MasterConfig,
workers: Vec<Worker>
) -> Result<(), String>
&mut self,
master: MasterConfig,
workers: Vec<Worker>
) -> Result<(), String>
fn start(&mut self, workers: &Vec<Worker>) -> Result<(), String>
This starts the master and the workers
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: &Vec<Worker>) -> Result<(), String>
This method is used by the start
method to spin up the workers
fn create_workers(&mut self, workers: &Vec<Worker>) -> Result<(), String>
Creates each worker in its proper directory
fn write_worker_configs(&mut self, workers: &Vec<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