diff --git a/playbooks/files/project-requirements-change.py b/playbooks/files/project-requirements-change.py index ea8b69bb67..b9ab2e5ee5 100755 --- a/playbooks/files/project-requirements-change.py +++ b/playbooks/files/project-requirements-change.py @@ -100,6 +100,7 @@ def grab_args(): ) parser.add_argument('--local', action='store_true', help='check local changes (not yet in git)') + parser.add_argument('src_dir', help='directory to process') parser.add_argument('branch', nargs='?', default='master', help='target branch for diffs') parser.add_argument('--zc', help='what zuul cloner to call') @@ -149,6 +150,7 @@ def _is_requirement_in_global_reqs(req, global_reqs): def main(): args = grab_args() branch = args.branch + os.chdir(args.src_dir) failed = False # build a list of requirements from the global list in the diff --git a/playbooks/requirements-check.yaml b/playbooks/requirements-check.yaml index d769b9f2b8..b08eebd27e 100644 --- a/playbooks/requirements-check.yaml +++ b/playbooks/requirements-check.yaml @@ -1,6 +1,4 @@ - hosts: all tasks: - name: Run requirements check script - script: "files/project-requirements-change.py {{ zuul.branch }}" - args: - chdir: "{{ zuul.project.src_dir }}" + script: "files/project-requirements-change.py {{ zuul.project.src_dir }} {{ zuul.branch }}"