about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-02-27 17:45:53 +0100
committerJakub Beránek <berykubik@gmail.com>2025-03-10 13:10:53 +0100
commit7ca7675b7857c10851f0b2a18b44b52abaab607c (patch)
tree5ee2131b3b3f732953e17d2da7f8cc8322d1a695
parent2b285cd5f0877e30ad1d83e04f8cc46254e43391 (diff)
downloadrust-7ca7675b7857c10851f0b2a18b44b52abaab607c.tar.gz
rust-7ca7675b7857c10851f0b2a18b44b52abaab607c.zip
Make all keys explicit in citool
Just to avoid surprises, the amount of used keys is not large.
-rw-r--r--src/ci/citool/src/main.rs18
1 files 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<String>,
-    /// Rest of attributes that will be passed through to GitHub actions
-    #[serde(flatten)]
-    extra_keys: BTreeMap<String, Value>,
+    /// Do not cancel the whole workflow if this job fails.
+    #[serde(default)]
+    continue_on_error: Option<bool>,
+    /// Free additional disk space in the job, by removing unused packages.
+    #[serde(default)]
+    free_disk: Option<bool>,
 }
 
 impl Job {
@@ -105,8 +108,10 @@ struct GithubActionsJob {
     full_name: String,
     os: String,
     env: BTreeMap<String, serde_json::Value>,
-    #[serde(flatten)]
-    extra_keys: BTreeMap<String, serde_json::Value>,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    continue_on_error: Option<bool>,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    free_disk: Option<bool>,
 }
 
 /// 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();