@@ -8,10 +8,13 @@ use crate::builder::BuildResult;
88use crate :: clients:: { bucket_client, kube_client} ;
99use crate :: cluster_setup as setup;
1010use crate :: configparser:: config:: ProfileConfig ;
11- use crate :: configparser:: { enabled_challenges, get_config, get_profile_config} ;
11+ use crate :: configparser:: { enabled_challenges, get_config, get_profile_config, ChallengeConfig } ;
1212
1313/// Render challenge manifest templates and apply to cluster
14- pub async fn deploy_challenges ( profile_name : & str , build_results : & [ BuildResult ] ) -> Result < ( ) > {
14+ pub async fn deploy_challenges (
15+ profile_name : & str ,
16+ build_results : & [ ( & ChallengeConfig , BuildResult ) ] ,
17+ ) -> Result < ( ) > {
1518 let profile = get_profile_config ( profile_name) ?;
1619 let enabled_challenges = enabled_challenges ( profile_name) ?;
1720
@@ -22,7 +25,7 @@ pub async fn deploy_challenges(profile_name: &str, build_results: &[BuildResult]
2225/// Returns urls of upload files.
2326pub async fn upload_assets (
2427 profile_name : & str ,
25- build_results : & [ BuildResult ] ,
28+ build_results : & [ ( & ChallengeConfig , BuildResult ) ] ,
2629) -> Result < Vec < String > > {
2730 let profile = get_profile_config ( profile_name) ?;
2831 let enabled_challenges = enabled_challenges ( profile_name) ?;
@@ -36,7 +39,10 @@ pub async fn upload_assets(
3639}
3740
3841/// Sync deployed challenges with rCTF frontend
39- pub async fn update_frontend ( profile_name : & str , build_results : & [ BuildResult ] ) -> Result < ( ) > {
42+ pub async fn update_frontend (
43+ profile_name : & str ,
44+ build_results : & [ ( & ChallengeConfig , BuildResult ) ] ,
45+ ) -> Result < ( ) > {
4046 let profile = get_profile_config ( profile_name) ?;
4147 let enabled_challenges = enabled_challenges ( profile_name) ?;
4248
0 commit comments