From 7ca7675b7857c10851f0b2a18b44b52abaab607c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 27 Feb 2025 17:45:53 +0100 Subject: [PATCH] Make all keys explicit in citool Just to avoid surprises, the amount of used keys is not large. --- src/ci/citool/src/main.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ci/citool/src/main.rs b/src/ci/citool/src/main.rs index 52e7638d98b..346d7f7cf66 100644 --- a/src/ci/citool/src/main.rs +++ b/src/ci/citool/src/main.rs @@ -33,9 +33,12 @@ struct Job { /// Should the job be only executed on a specific channel? #[serde(default)] only_on_channel: Option, - /// Rest of attributes that will be passed through to GitHub actions - #[serde(flatten)] - extra_keys: BTreeMap, + /// Do not cancel the whole workflow if this job fails. + #[serde(default)] + continue_on_error: Option, + /// Free additional disk space in the job, by removing unused packages. + #[serde(default)] + free_disk: Option, } impl Job { @@ -105,8 +108,10 @@ struct GithubActionsJob { full_name: String, os: String, env: BTreeMap, - #[serde(flatten)] - extra_keys: BTreeMap, + #[serde(skip_serializing_if = "Option::is_none")] + continue_on_error: Option, + #[serde(skip_serializing_if = "Option::is_none")] + free_disk: Option, } /// Type of workflow that is being executed on CI @@ -240,7 +245,8 @@ fn calculate_jobs( full_name, os: job.os, env, - extra_keys: yaml_map_to_json(&job.extra_keys), + free_disk: job.free_disk, + continue_on_error: job.continue_on_error, } }) .collect();