Add option to ignore containers to pull (#613)
This commit is contained in:
@@ -159,6 +159,13 @@ pub struct Include {
|
||||
paths: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Default, Debug, Merge)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Containers {
|
||||
#[merge(strategy = crate::utils::merge_strategies::vec_prepend_opt)]
|
||||
ignored_containers: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Default, Debug, Merge)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Git {
|
||||
@@ -411,6 +418,9 @@ pub struct ConfigFile {
|
||||
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
||||
git: Option<Git>,
|
||||
|
||||
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
||||
containers: Option<Containers>,
|
||||
|
||||
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
|
||||
windows: Option<Windows>,
|
||||
|
||||
@@ -842,6 +852,14 @@ impl Config {
|
||||
self.config_file.git.as_ref().and_then(|git| git.repos.as_ref())
|
||||
}
|
||||
|
||||
/// The list of docker/podman containers to ignore.
|
||||
pub fn containers_ignored_tags(&self) -> Option<&Vec<String>> {
|
||||
self.config_file
|
||||
.containers
|
||||
.as_ref()
|
||||
.and_then(|containers| containers.ignored_containers.as_ref())
|
||||
}
|
||||
|
||||
/// Tell whether the specified step should run.
|
||||
///
|
||||
/// If the step appears either in the `--disable` command line argument
|
||||
|
||||
Reference in New Issue
Block a user