chore: make all configuration parts cloneable

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
raito 2024-12-14 19:56:20 +01:00
parent 7c8814118b
commit 3a9d7cceb1

View file

@ -10,12 +10,12 @@ use std::path::{Path, PathBuf};
use serde::de::{self, Deserialize, Deserializer};
use tracing::error;
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub enum VCSConfig {
Gerrit,
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Config {
pub runner: RunnerConfig,
pub feedback: FeedbackConfig,
@ -31,7 +31,7 @@ pub struct Config {
pub gerrit: Option<GerritConfig>,
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct FeedbackConfig {
pub full_logs: bool,
}
@ -61,7 +61,7 @@ pub struct RabbitMqConfig {
pub password_file: Option<PathBuf>,
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct NixConfig {
#[serde(deserialize_with = "deserialize_one_or_many")]
pub system: Vec<String>,
@ -93,7 +93,7 @@ const fn default_instance() -> u8 {
1
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct RunnerConfig {
#[serde(default = "default_instance")]
pub instance: u8,
@ -112,7 +112,7 @@ pub struct RunnerConfig {
pub build_all_jobs: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CheckoutConfig {
#[serde(deserialize_with = "deserialize_and_expand_string")]
pub root: String,