]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
conditionally clear the previous commit and tag
authorAlfredo Deza <adeza@redhat.com>
Mon, 30 Nov 2015 15:26:56 +0000 (10:26 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 30 Nov 2015 15:26:56 +0000 (10:26 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ansible/roles/ceph-deploy-release/clear_version.yml [new file with mode: 0644]

diff --git a/ansible/roles/ceph-deploy-release/clear_version.yml b/ansible/roles/ceph-deploy-release/clear_version.yml
new file mode 100644 (file)
index 0000000..7199829
--- /dev/null
@@ -0,0 +1,19 @@
+---
+
+- name: undo last commit from failed release
+  command: git reset --soft HEAD~1 chdir=ceph-deploy
+  when: (clean and version in last_commit.stdout)
+
+- name: git checkout {{ branch }} branch
+  command: git checkout {{ branch }} chdir=ceph-deploy
+
+- name: remove local tag
+  command: git tag -d v{{ version }} chdir=ceph-deploy
+  ignore_errors: yes
+
+- name: remove remote tag
+  command: git push jenkins :refs/tags/v{{ version }} chdir=ceph-deploy
+  ignore_errors: yes
+
+- name: force push changes to jenkins git repo
+  command: git push -f jenkins {{ branch }} chdir=ceph-deploy