Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法获取ansible和jenkins部署的提交列表_Jenkins_Ansible - Fatal编程技术网

无法获取ansible和jenkins部署的提交列表

无法获取ansible和jenkins部署的提交列表,jenkins,ansible,Jenkins,Ansible,我想获取ansible部署的所有提交列表。我正在使用此代码获取列表 - name: Print complete log list command: git log --pretty=oneline "{{ cloned.after }}..{{ cloned.before }}" register: commits_list 但我得到了这个错误 fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": ["g

我想获取ansible部署的所有提交列表。我正在使用此代码获取列表

- name: Print complete log list
      command: git log --pretty=oneline "{{ cloned.after }}..{{ cloned.before }}"
      register: commits_list
但我得到了这个错误

fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": ["git", "log", "--pretty=oneline", "192fe5aa6c1fb835297b235a19882a5ec67c7f16..c3c558b231d1591baf5e5fd76fdc5a311934a605"], "delta": "0:00:00.058074", "end": "2017-06-07 12:28:15.668605", "failed": true, "rc": 128, "start": "2017-06-07 12:28:15.610531", "stderr": "fatal: Not a git repository (or any of the parent directories): .git", "stderr_lines": ["fatal: Not a git repository (or any of the parent directories): .git"], "stdout": "", "stdout_lines": []}

我注册克隆以获取git信息。

您可能希望将chdir转换为repo dir:

- name: Print complete log list
  command: git log --pretty=oneline "{{ cloned.after }}..{{ cloned.before }}"
  args:
    chdir: /path/to/cloned/ropo
  register: commits_list

您可能希望将chdir转换为repo dir:

- name: Print complete log list
  command: git log --pretty=oneline "{{ cloned.after }}..{{ cloned.before }}"
  args:
    chdir: /path/to/cloned/ropo
  register: commits_list