From daf3a03da930268a303f6b4abf53162dbdeb8680 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 1 Oct 2017 14:22:08 +0000 Subject: [PATCH] Correct cloner shim missing project error When asked to clone a project which is not present in REPO_SRC_DIR, the error message should suggest adding the missing project's name to the required-projects list for the job rather than its file path. Also, while we're at it, implement Clint's suggestion from Ia94d03a9fe59677129e23e849e0437200a66f4c3 to embed REPO_SRC_DIR's value into the error rather than hard-coding an OpenStack-specific implementation value. Change-Id: I068ab7df86338794b71b23eab748e01ccd0d90f3 --- roles/fetch-zuul-cloner/templates/zuul-cloner-shim.py.j2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/fetch-zuul-cloner/templates/zuul-cloner-shim.py.j2 b/roles/fetch-zuul-cloner/templates/zuul-cloner-shim.py.j2 index 0641fefba..b4b8bc8ea 100644 --- a/roles/fetch-zuul-cloner/templates/zuul-cloner-shim.py.j2 +++ b/roles/fetch-zuul-cloner/templates/zuul-cloner-shim.py.j2 @@ -145,7 +145,7 @@ def main(): in the 'required-projects' parameter on the job. To fix this issue, add: - {src} + {project} to 'required-projects'. @@ -153,9 +153,10 @@ def main(): is deprecated and this shim is only present for transition purposes. Start thinking about how to rework job content to just use the git repos that zuul will place into - /home/zuul/src directly. + {repo_src_dir} directly. ********************************** - """.format(src=src))) + """.format( + src=src, project=project, repo_src_dir=REPO_SRC_DIR))) sys.exit(1) dst = dests[project]