Skip to content

Commit

Permalink
Include RCC catalog zip path in config and take into account when bui…
Browse files Browse the repository at this point in the history
…lding envs

CMK-19785
  • Loading branch information
jherbel committed Oct 28, 2024
1 parent e8b9fcf commit 2b84321
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/bin/scheduler/internal_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ pub struct RCCEnvironmentConfig {
pub robot_yaml_path: Utf8PathBuf,
pub build_timeout: u64,
pub remote_origin: Option<String>,
pub catalog_zip: Option<Utf8PathBuf>,
}

#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
3 changes: 3 additions & 0 deletions tests/test_scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2b84321

Please sign in to comment.