Merge "Move chdir into script itself"

This commit is contained in:
Jenkins 2017-10-15 16:54:35 +00:00 committed by Gerrit Code Review
commit 9891e2951d
2 changed files with 3 additions and 3 deletions

@ -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

@ -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 }}"