Commit Graph

7 Commits (20e7bad9842a07655cd7c37a4944a648e527cabf)

Author SHA1 Message Date
Sébastien Han 3bdae23e42 contrib: untrap before calling popd
we need to untrap before calling popd if the script is being run from a
directory different than the git repo. popd will go back to the previous
directory and trap will execute reset_hard_origin function on EXIT.
If we are not in the righ directory, this will fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-28 23:22:49 +01:00
Sébastien Han 34a59695f8 contrib: don't fetch tags since we push force
reverting 4be9c52baf

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-28 19:07:52 +01:00
Sébastien Han eb22286452 contrib: use push force because of the CI
If we don't force push we won't be able to push new content from
jenkins.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-28 18:54:14 +01:00
Sébastien Han 4be9c52baf contrib: do a fetch all so we don't push force
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-28 16:46:30 +01:00
Sébastien Han 0530ff86f9 contrib: It doesn't make sense to pull all tags
On certain git versions running: git pull origin --tags ends up with the
following error: It doesn't make sense to pull all tags; you probably
meant: git fetch --tags

So removing the --tags since later in the execution we do a git fetch
--tags

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-28 15:12:40 +01:00
Sébastien Han e9de87d66b contrib: add a goto basedir function
This way if the script is not executed from the git directory we jump
into it, do our stuff and then go back to the dir where the user was.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-28 14:27:28 +01:00
Sébastien Han 90a28b8b41 contrib: add a new script to update remote repos
This script allows us to split ceph-ansible role directory into
repositories that can be pushed.
This script is an enhanced version of splitup.yml that was using git
subtree. I haven't found any straighforward way to push tag using git
subtree where git filter-branch seems easier and more practical.

Now we can not only push commits from master but also all the relative
tags. It is nice for projects that want to consume our roles from the
Ansible Galaxy, pointing to a specific tags looking for a particular
release.

For backward compatobility, I pushed a branch called
"master-history-bkp" on all the github.com/ceph/ansbible-ceph-*
repositories. So current projects using a SHA to retrieve the roles
won't be impacted by this change.

At the time of the commit, running this script took  104.60s to
complete.

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Erwan Velu <erwan@redhat.com>
Co-Authored-By: Logan Vig <logan2211@gmail.com>
2016-11-23 17:15:34 +01:00