Struct buildchain::Config
[−]
[src]
pub struct Config { pub name: String, pub base: String, pub source: Source, pub commands: Vec<Vec<String>>, }
A build configuration
Fields
name: String
The name of this build project
base: String
The LXC base to use
source: Source
The source repository (git only, for now)
commands: Vec<Vec<String>>
The commands to run that generate the build artifacts
Methods
impl Config
[src]
fn run(&self, location: Location) -> Result<(u64, PathBuf)>
Run a build configuration
Return
An empty tuple on success
Errors
Errors that are encountered while running will be returned
Example
use buildchain::{Config, Location}; use std::collections::BTreeMap; let config = Config { name: "test-config".to_string(), base: "ubuntu:16.04".to_string(), commands: vec![vec!["echo".to_string(), "hello".to_string()]], artifacts: None, }; config.run(Location::Local, "tests/res/config/buildchain.out").unwrap();
Trait Implementations
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more