Skip to content

Commit 808792b

Browse files
committed
Make all job keys explicit in citool
1 parent ac951d3 commit 808792b

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/ci/citool/src/main.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ struct Job {
2525
/// Should the job be only executed on a specific channel?
2626
#[serde(default)]
2727
only_on_channel: Option<String>,
28-
/// Rest of attributes that will be passed through to GitHub actions
29-
#[serde(flatten)]
30-
extra_keys: BTreeMap<String, Value>,
28+
/// Do not cancel the whole workflow if this job fails.
29+
#[serde(default)]
30+
continue_on_error: Option<bool>,
31+
/// Free additional disk space in the job, by removing unused packages.
32+
#[serde(default)]
33+
free_disk: Option<bool>,
3134
}
3235

3336
impl Job {
@@ -97,8 +100,10 @@ struct GithubActionsJob {
97100
full_name: String,
98101
os: String,
99102
env: BTreeMap<String, serde_json::Value>,
100-
#[serde(flatten)]
101-
extra_keys: BTreeMap<String, serde_json::Value>,
103+
#[serde(skip_serializing_if = "Option::is_none")]
104+
continue_on_error: Option<bool>,
105+
#[serde(skip_serializing_if = "Option::is_none")]
106+
free_disk: Option<bool>,
102107
}
103108

104109
/// Type of workflow that is being executed on CI
@@ -232,7 +237,8 @@ fn calculate_jobs(
232237
full_name,
233238
os: job.os,
234239
env,
235-
extra_keys: yaml_map_to_json(&job.extra_keys),
240+
free_disk: job.free_disk,
241+
continue_on_error: job.continue_on_error,
236242
}
237243
})
238244
.collect();

0 commit comments

Comments
 (0)