forked from the-distro/ofborg
add a runner.identity to the cfg
This commit is contained in:
parent
e865b9164f
commit
76c1a342b9
|
@ -5,6 +5,7 @@ use std::io::Read;
|
|||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Config {
|
||||
pub runner: RunnerConfig,
|
||||
pub checkout: CheckoutConfig,
|
||||
pub nix: NixConfig,
|
||||
pub rabbitmq: RabbitMQConfig,
|
||||
|
@ -24,11 +25,22 @@ pub struct NixConfig {
|
|||
pub remote: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct RunnerConfig {
|
||||
pub identity: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct CheckoutConfig {
|
||||
pub root: String,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn whoami(&self) -> String {
|
||||
return format!("{}-{}", self.runner.identity, self.nix.system);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl RabbitMQConfig {
|
||||
pub fn as_uri(&self) -> String{
|
||||
|
|
Loading…
Reference in a new issue