Make all keys explicit in citool
Just to avoid surprises, the amount of used keys is not large.
This commit is contained in:
parent
2b285cd5f0
commit
7ca7675b78
1 changed files with 12 additions and 6 deletions
|
@ -33,9 +33,12 @@ struct Job {
|
||||||
/// Should the job be only executed on a specific channel?
|
/// Should the job be only executed on a specific channel?
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
only_on_channel: Option<String>,
|
only_on_channel: Option<String>,
|
||||||
/// Rest of attributes that will be passed through to GitHub actions
|
/// Do not cancel the whole workflow if this job fails.
|
||||||
#[serde(flatten)]
|
#[serde(default)]
|
||||||
extra_keys: BTreeMap<String, Value>,
|
continue_on_error: Option<bool>,
|
||||||
|
/// Free additional disk space in the job, by removing unused packages.
|
||||||
|
#[serde(default)]
|
||||||
|
free_disk: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Job {
|
impl Job {
|
||||||
|
@ -105,8 +108,10 @@ struct GithubActionsJob {
|
||||||
full_name: String,
|
full_name: String,
|
||||||
os: String,
|
os: String,
|
||||||
env: BTreeMap<String, serde_json::Value>,
|
env: BTreeMap<String, serde_json::Value>,
|
||||||
#[serde(flatten)]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
extra_keys: BTreeMap<String, serde_json::Value>,
|
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
|
/// Type of workflow that is being executed on CI
|
||||||
|
@ -240,7 +245,8 @@ fn calculate_jobs(
|
||||||
full_name,
|
full_name,
|
||||||
os: job.os,
|
os: job.os,
|
||||||
env,
|
env,
|
||||||
extra_keys: yaml_map_to_json(&job.extra_keys),
|
free_disk: job.free_disk,
|
||||||
|
continue_on_error: job.continue_on_error,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue