Project

Profile

Help

Story #6338

As a user "whitelist-tags option supports wildcard characters

Added by ipanova@redhat.com 3 months ago. Updated about 1 month ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Backlog
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 69

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'}

Associated revisions

Revision 081fb538 View on GitHub
Added by Lubos Mjachky 2 months ago

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

Revision 081fb538 View on GitHub
Added by Lubos Mjachky 2 months ago

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

History

#1 Updated by ipanova@redhat.com 3 months ago

  • Description updated (diff)

#2 Updated by ipanova@redhat.com 3 months ago

  • Project changed from RPM Support to Container Support
  • Description updated (diff)

#3 Updated by ipanova@redhat.com 3 months ago

  • Description updated (diff)

#5 Updated by ipanova@redhat.com 3 months ago

  • Tags Backlog added

#6 Updated by ipanova@redhat.com 3 months ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes
  • Sprint set to Sprint 69

#7 Updated by lmjachky 2 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to lmjachky

#8 Updated by lmjachky 2 months ago

  • Status changed from ASSIGNED to POST

#10 Updated by Anonymous 2 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#11 Updated by ipanova@redhat.com about 1 month ago

  • Sprint/Milestone set to 1.3.0

#12 Updated by ipanova@redhat.com about 1 month ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF