Use a separate field for the "sync images with tag matching regex" feature

Fields that magically change their behavior depending on type of the value
are too much hassle for no benefit.

For now, this just copies&pastes the full loop in imagesToCopyFromRegistry
to create another loop handling the new ImagesByTagRegex field. Simplifications
to reduce duplication will follow.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač
2020-05-22 01:00:49 +02:00
committed by Valentin Rothberg
parent 3a94432e42
commit 322625eeca
3 changed files with 84 additions and 87 deletions

View File

@@ -263,7 +263,7 @@ func (s *SyncSuite) TestYamlRegex2Dir(c *check.C) {
yamlConfig := `
docker.io:
images:
images-by-tag-regex:
nginx: ^1\.13\.[12]-alpine-perl$ # regex string test
`
// the ↑ regex strings always matches only 2 images