Actions
Story #6338
closedAs a user "whitelist-tags option supports wildcard characters
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Backlog
Sprint:
Sprint 69
Quarter:
Description
Add the ability to limit tag using a regexp
For example:
upstream taglist is
[
'openshift-4',
'openshift-3.11'
'openshift-3',
'openshift-3.10'
'latest'
'foo'
]`
When specifying whitelist-tags=[openshift-3.*, latest, bla-bla]
it will mirror down only:
[
'openshift-3.11'
'openshift-3',
'openshift-3.10'
'latest'
]
solution
In [61]: upstream_tags = [
...: 'openshift-4',
...: 'openshift-3.11',
...: 'openshift-3',
...: 'openshift-3.10',
...: 'latest',
...: 'foo'
...: ]
In [63]: whitelisttags = ['openshift-3.*', 'latest', 'bla-bla', 'openshift-3.11']
In [64]: import re
...: tags_to_mirror = []
...: for i in whitelisttags:
...: rex = re.compile(i)
...: for tag in upstream_tags:
...: tags_to_mirror.extend(rex.findall(tag))
...:
In [65]: tags_to_mirror
Out[65]: ['openshift-3.11', 'openshift-3', 'openshift-3.10', 'latest', 'openshift-3.11']
In [66]: set(tags_to_mirror)
Out[66]: {'latest', 'openshift-3', 'openshift-3.10', 'openshift-3.11'}
Updated by ipanova@redhat.com almost 5 years ago
- Project changed from RPM Support to Container Support
- Description updated (diff)
Updated by ipanova@redhat.com almost 5 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
- Sprint set to Sprint 69
Updated by lmjachky over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to lmjachky
Added by Lubos Mjachky over 4 years ago
Added by Lubos Mjachky over 4 years ago
Revision 081fb538 | View on GitHub
Add support for filtering tags using wildcards
In this commit, there was also added a new test case that verifies syncing with whitelisted tags.
closes #6338
Updated by pulpbot over 4 years ago
Updated by Anonymous over 4 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 081fb5383640afb91154b1dd526f0b9ceace6c72.
Updated by ipanova@redhat.com over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Add support for filtering tags using wildcards
In this commit, there was also added a new test case that verifies syncing with whitelisted tags.
closes #6338