look at correct branch when determining the sdist name
We need to check out each repository to the hash for the latest release on the branch to check the sdist name because (a) the name may change over time and (b) the setup.py file may be removed from master after a project is retired. Change-Id: Id207d2ee7e2b70ffad562c7912a0543a4b9f9750 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
@@ -536,9 +536,20 @@ def validate_tarball_base(deliv, context):
|
||||
sdist, expected))
|
||||
|
||||
|
||||
@applies_to_released
|
||||
def validate_pypi_permissions(deliv, context):
|
||||
"Do we have permission to upload to PyPI?"
|
||||
|
||||
# Check out the repositories to the hash for the latest release on
|
||||
# the branch so we can find the setup.py there (if it exists), in
|
||||
# case that has been removed from master after a project is
|
||||
# retired. This also ensures we get the right name for the branch,
|
||||
# in case the sdist name changes over time.
|
||||
latest_release = deliv.releases[-1]
|
||||
for project in latest_release.projects:
|
||||
gitutils.safe_clone_repo(
|
||||
context.workdir, project.repo.name, project.hash, context)
|
||||
|
||||
for repo in deliv.repos:
|
||||
|
||||
job_templates = context.zuul_projects.get(repo.name, {}).get(
|
||||
|
||||
Reference in New Issue
Block a user