From 2b843212f5130261a4ba2f9ee25a3d30ce5da2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Herbel?= Date: Wed, 23 Oct 2024 08:20:34 +0200 Subject: [PATCH] Include RCC catalog zip path in config and take into account when building envs CMK-19785 --- src/bin/scheduler/internal_config.rs | 1 + src/config.rs | 1 + src/environment.rs | 2 +- tests/test_scheduler.rs | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/scheduler/internal_config.rs b/src/bin/scheduler/internal_config.rs index bb826e39..7ea47268 100644 --- a/src/bin/scheduler/internal_config.rs +++ b/src/bin/scheduler/internal_config.rs @@ -237,6 +237,7 @@ mod tests { robot_yaml_path: Utf8PathBuf::from("robot.yaml"), build_timeout: 300, remote_origin: None, + catalog_zip: None, }), #[cfg(unix)] session_config: SessionConfig::Current, diff --git a/src/config.rs b/src/config.rs index 96095ac4..3c84141c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -111,6 +111,7 @@ pub struct RCCEnvironmentConfig { pub robot_yaml_path: Utf8PathBuf, pub build_timeout: u64, pub remote_origin: Option, + pub catalog_zip: Option, } #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] diff --git a/src/environment.rs b/src/environment.rs index 99fbb883..d8143583 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -41,7 +41,7 @@ impl Environment { EnvironmentConfig::Rcc(rcc_environment_config) => Self::Rcc(RCCEnvironment { binary_path: rcc_binary_path.to_path_buf(), remote_origin: rcc_environment_config.remote_origin.clone(), - catalog_zip: None, + catalog_zip: rcc_environment_config.catalog_zip.clone(), robot_yaml_path: base_dir.join(&rcc_environment_config.robot_yaml_path), controller: String::from("robotmk"), space: plan_id.to_string(), diff --git a/tests/test_scheduler.rs b/tests/test_scheduler.rs index 459512f5..205d16b0 100644 --- a/tests/test_scheduler.rs +++ b/tests/test_scheduler.rs @@ -185,6 +185,7 @@ fn create_config( robot_yaml_path: "robot.yaml".into(), build_timeout: 1200, remote_origin: None, + catalog_zip: None, }), session_config: SessionConfig::Current, working_directory_cleanup_config: @@ -223,6 +224,7 @@ fn create_config( robot_yaml_path: "robot.yaml".into(), build_timeout: 1200, remote_origin: None, + catalog_zip: None, }), session_config: SessionConfig::SpecificUser(UserSessionConfig { user_name: user_name_headed.into(), @@ -265,6 +267,7 @@ fn create_config( robot_yaml_path: "robot.yaml".into(), build_timeout: 1200, remote_origin: None, + catalog_zip: None, }), #[cfg(unix)] session_config: SessionConfig::Current,