From 92325b8a74bee62f470a1b1d54270ea59899b120 Mon Sep 17 00:00:00 2001 From: Manuel Sopena Ballesteros Date: Fri, 25 Oct 2024 18:09:18 +0200 Subject: [PATCH] fix: create CFS session type dynamic --- src/cfs/session.rs | 4 ++++ src/common/gitea.rs | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cfs/session.rs b/src/cfs/session.rs index dafb867..87af491 100644 --- a/src/cfs/session.rs +++ b/src/cfs/session.rs @@ -1142,6 +1142,10 @@ pub mod mesa { source_id: base_image_id.expect("ERROR - can't create a CFS session to build an image without base image id"), result_name: result_image_name.expect("ERROR - can't create a CFS sessions to build an image without result image name"), }]); + } else { + cfs_session.target.definition = Some("dynamic".to_string()); + cfs_session.target.groups = None; + cfs_session.target.image_map = Some(Vec::new()); } cfs_session.tags = tags; diff --git a/src/common/gitea.rs b/src/common/gitea.rs index e3fcaad..3dd4b8d 100644 --- a/src/common/gitea.rs +++ b/src/common/gitea.rs @@ -280,12 +280,10 @@ pub mod http_client { } let api_url = format!( - "{}/api/v1/repos/cray/{}/git/commits/{}", + "{}api/v1/repos/{}/git/commits/{}", gitea_base_url, repo_name, commitid ); - log::debug!("Request to {}", api_url); - let response = client .get(api_url) .header("Authorization", format!("token {}", gitea_token))