diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/git/tasks/forcefully-fetch-tag.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-8a754e0858d922e955e71b253c139e071ecec432.tar.xz ansible-core-8a754e0858d922e955e71b253c139e071ecec432.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/targets/git/tasks/forcefully-fetch-tag.yml')
-rw-r--r-- | test/integration/targets/git/tasks/forcefully-fetch-tag.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/integration/targets/git/tasks/forcefully-fetch-tag.yml b/test/integration/targets/git/tasks/forcefully-fetch-tag.yml new file mode 100644 index 0000000..47c3747 --- /dev/null +++ b/test/integration/targets/git/tasks/forcefully-fetch-tag.yml @@ -0,0 +1,38 @@ +# Tests against https://github.com/ansible/ansible/issues/67972 + +# Do our first clone manually; there are no commits yet and Ansible doesn't like +# that. +- name: FORCEFULLY-FETCH-TAG | Clone the bare repo in a non-bare clone + shell: git clone {{ repo_dir }}/tag_force_push {{ repo_dir }}/tag_force_push_clone1 + +- name: FORCEFULLY-FETCH-TAG | Prepare repo with a tag + shell: | + echo 1337 > leet; + git add leet; + git commit -m uh-oh; + git tag -f herewego; + git push --tags origin master + args: + chdir: "{{ repo_dir }}/tag_force_push_clone1" + +- name: FORCEFULLY-FETCH-TAG | clone the repo for the second time + git: + repo: "{{ repo_dir }}/tag_force_push" + dest: "{{ repo_dir }}/tag_force_push_clone2" + +- name: FORCEFULLY-FETCH-TAG | Forcefully overwrite the tag in clone1 + shell: | + echo 1338 > leet; + git add leet; + git commit -m uh-oh; + git tag -f herewego; + git push -f --tags origin master + args: + chdir: "{{ repo_dir }}/tag_force_push_clone1" + +- name: FORCEFULLY-FETCH-TAG | Try to update the second clone + git: + repo: "{{ repo_dir }}/tag_force_push" + dest: "{{ repo_dir }}/tag_force_push_clone2" + force: yes + register: git_res |