From: Alfredo Deza Date: Mon, 30 Nov 2015 15:26:56 +0000 (-0500) Subject: conditionally clear the previous commit and tag X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fbb5c0f599d087db5b61b0e9e52252a878e36c24;p=ceph-build.git conditionally clear the previous commit and tag Signed-off-by: Alfredo Deza --- diff --git a/ansible/roles/ceph-deploy-release/clear_version.yml b/ansible/roles/ceph-deploy-release/clear_version.yml new file mode 100644 index 000000000..7199829aa --- /dev/null +++ b/ansible/roles/ceph-deploy-release/clear_version.yml @@ -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