-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
- hosts: all | ||
tasks: | ||
- name: Show HEAD | ||
shell: git rev-parse HEAD | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" | ||
|
||
- name: Add remote | ||
shell: git remote add temp https://{{ zuul.project.canonical_name }} | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" | ||
|
||
- name: Show Remote | ||
shell: git remote -v | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" | ||
|
||
- name: test | ||
shell: git fetch temp pull/{{ zuul.change }}/head:{{ zuul.change }} && git checkout {{ zuul.change }} | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" | ||
ignore_errors: yes | ||
|
||
|
||
- name: Show last commit | ||
shell: git log -1 --oneline | cat | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" | ||
ignore_errors: yes | ||
|
||
- name: List files | ||
shell: ls -lR | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters