unify repo and repo_from options
Config option 'repo' and 'repo_from' are used in several phases, merge
them with one option 'repo'. 'append' in schema is used for appending
the values from deprecated options to 'repo', so it won't break on any
existing config files that have the old options of 'repo_from' and
'source_repo_from' (which is an alias of 'repo_from').
And 'repo' schema is updated to support repo dict as the value or an
item in the values, a repo dict is just a dict contains repo options,
'baseurl' is required in the dict, like:
{"baseurl": "http://example.com/url/to/repo"}
or:
{"baseurl": "Serer"}
currently this is used in ostree phase to support extra repo options
like:
{"baseurl": "Server", "exclude": "systemd-container"}
Signed-off-by: Qixiang Wan <qwan@redhat.com>
This commit is contained in:
parent
0ee2189d9c
commit
2f5d6d7dcd
18 changed files with 374 additions and 256 deletions
|
|
@ -23,7 +23,7 @@ class OSBSPhaseTest(helpers.PungiTestCase):
|
|||
|
||||
@mock.patch('pungi.phases.osbs.ThreadPool')
|
||||
def test_run(self, ThreadPool):
|
||||
cfg = mock.Mock()
|
||||
cfg = helpers.IterableMock()
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'osbs': {'^Everything$': cfg}
|
||||
})
|
||||
|
|
@ -310,8 +310,7 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
|||
'target': 'f24-docker-candidate',
|
||||
'name': 'my-name',
|
||||
'version': '1.0',
|
||||
'repo': 'http://pkgs.example.com/my.repo',
|
||||
'repo_from': 'Everything',
|
||||
'repo': ['Everything', 'http://pkgs.example.com/my.repo']
|
||||
}
|
||||
self._setupMock(KojiWrapper, resolve_git_url)
|
||||
self._assertConfigCorrect(cfg)
|
||||
|
|
@ -339,8 +338,7 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
|||
'target': 'f24-docker-candidate',
|
||||
'name': 'my-name',
|
||||
'version': '1.0',
|
||||
'repo': ['http://pkgs.example.com/my.repo'],
|
||||
'repo_from': ['Everything', 'Client'],
|
||||
'repo': ['Everything', 'Client', 'http://pkgs.example.com/my.repo'],
|
||||
}
|
||||
self._assertConfigCorrect(cfg)
|
||||
self._setupMock(KojiWrapper, resolve_git_url)
|
||||
|
|
@ -370,8 +368,7 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
|||
'target': 'f24-docker-candidate',
|
||||
'name': 'my-name',
|
||||
'version': '1.0',
|
||||
'repo': ['http://pkgs.example.com/my.repo'],
|
||||
'repo_from': ['Everything', 'Client'],
|
||||
'repo': ['Everything', 'Client', 'http://pkgs.example.com/my.repo'],
|
||||
'gpgkey': gpgkey,
|
||||
}
|
||||
self._assertConfigCorrect(cfg)
|
||||
|
|
@ -389,7 +386,7 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
|||
'target': 'f24-docker-candidate',
|
||||
'name': 'my-name',
|
||||
'version': '1.0',
|
||||
'repo_from': 'Gold',
|
||||
'repo': 'Gold',
|
||||
}
|
||||
self._assertConfigCorrect(cfg)
|
||||
self._setupMock(KojiWrapper, resolve_git_url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue