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

时间:2017-06-07 07:20:28

标签: 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": ["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信息。

1 个答案:

答案 0 :(得分:2)

你可能想要回到目录:

SELECT * FROM photos WHERE name LIKE '%ait%' 
UNION 
SELECT photos.* FROM photos, photo_tag, tags 
WHERE photo_tag.photo_id = photos.id 
AND photo_tag.tag_id = tags.id 
AND tags.name IN('ait')