Skip to content
Snippets Groups Projects
Commit cafbbb1a authored by Sam Gleske's avatar Sam Gleske
Browse files

Merge branch 'development' release v0.3.0

parents 25f06522 3b1c55ad
No related branches found
Tags v0.3.0
No related merge requests found
## gitlab-mirrors v0.3.0
* Certified compatibility with GitLab 6.2.
* Upgraded prerequisites to a newer version of `pyapi-gitlab` (formerly `python-gitlab`).
* Added upgrade documentation.
---
## gitlab-mirrors v0.2.10
* This is a bugfix release in the gitlab-6-0 branch series. From now on all v0.2.X releases will be for the `gitlab-6-0` branch and all v0.3.X releases will be for the `gitlab-6-1` branch.
......
Things to do before internal release.
Things to do before a release.
1. Update documentation. commit.
2. Update CHANGELOG file. commit.
3. Update VERSION file. commit.
......@@ -6,12 +6,3 @@ Things to do before internal release.
5. Tag current version based on VERSION file.
6. Push master to origin.
7. Push tag to origin.
Things to do before public release.
8. Create a release branch off of public.
9. Migrate changes from latest internal release: cp -r * ~1/;cp .gitignore ~1/
10. Check out public and merge release into public (use --no-ff option)
11. Tag current version based on VERSION file.
12. Push public to origin.
13. Push tag to origin.
......@@ -3,7 +3,7 @@
### Required software
* [GitLab 6.x][1]
* [python-gitlab @ 9c5e375][2]
* [pyapi-gitlab @ 4d778d7][2]
* [GNU coreutils][3]
* [git 1.8.4][4]
......@@ -17,7 +17,7 @@ python-gitlab
yum install python-setuptools
git clone https://github.com/Itxaka/python-gitlab.git
cd python-gitlab
git checkout 9c5e375599a6d89ab1f4520224f47b43b40bcf9b
git checkout 4d778d780161869550d8e514cdc50df2398f844e
python setup.py install
You can find the source to git at the [git-core project][5]. For instructions on other platforms see the [Getting Started - Installing Git section of the git book][6].
......@@ -39,7 +39,7 @@ Your git should now be located in `/usr/local/bin/git`. You should edit `/etc/p
Next up is [Installation and Setup](installation.md).
[1]: https://github.com/gitlabhq/gitlabhq/tree/6-0-stable
[2]: https://github.com/Itxaka/python-gitlab
[2]: https://github.com/Itxaka/pyapi-gitlab
[3]: http://www.gnu.org/software/coreutils/
[4]: http://git-scm.com/
[5]: http://code.google.com/p/git-core/
......
# Upgrade Notes
This documentation outlines steps for you to upgrade from gitlab-mirrors `0.2.x` to gitlab-mirrors `0.3.x`. It is assumed you'll be working on a test instance of gitlab in a production environment. If you only have a single gitlab instance then follow these steps with care and at your own risk.
gitlab-mirrors has been certified to use a new prerequisite library called [pyapi-gitlab](https://github.com/Itxaka/pyapi-gitlab) (formerly called python-gitlab). Therefore you must install `pyapi-gitlab` before upgrading `gitlab-mirrors` to the latest edition.
# 1. Disable any cron jobs
If you have cron jobs set up then you'll need to disable them to avoid them launching gitlab-mirrors during your upgrade.
# 2. Update python-gitlab to pyapi-gitlab
I'll ouline the steps here real quick.
cd /usr/local/src
git checkout https://github.com/Itxaka/pyapi-gitlab.git
git checkout 4d778d780161869550d8e514cdc50df2398f844e
python setup.py install
You must remove the previous conflicting library from `/usr/local/lib/python2.7/dist-packages/python_gitlab-0.1-py2.7.egg` by default on my system. Your system may vary the location. If you're not sure where it's at then you can locate it using `mlocate` package in RHEL.
yum install mlocate
updatedb
locate *.egg
rm -rf /usr/local/lib/python2.7/dist-packages/python_gitlab-0.1-py2.7.egg
# 3. Update your gitlab-mirrors
su - gitmirror
cd gitlab-mirrors
git checkout master
git fetch
git pull origin master
git checkout v0.3.0
Test on a dummy project to ensure your new setup works. Once you have verified everything works then you can re-enable the cron jobs.
VERSION="v0.2.10"
VERSION="v0.3.0"
......@@ -38,16 +38,13 @@ elif len(args) > 1:
project_name=args[0]
#current python-gitlab behavior
#git=gitlab.Gitlab(gitlab_url,token_secret,version=6)
#command for my forked version https://github.com/sag47/python-gitlab.git
git=gitlab.Gitlab(gitlab_url,token_secret)
git=gitlab.Gitlab(host=gitlab_url,user=gitlab_user,token=token_secret)
def findgroup(gname):
#Locate the group
page=1
while len(git.getGroups(page=page)) > 0:
for group in git.getGroups(page=page):
while len(git.getgroups(page=page)) > 0:
for group in git.getgroups(page=page):
if group['name'] == gname:
return group
page += 1
......@@ -58,8 +55,8 @@ def findgroup(gname):
def findproject(gname,pname,user=False):
page=1
while len(git.getProjects(page=page)) > 0:
for project in git.getProjects(page=page):
while len(git.getprojects(page=page)) > 0:
for project in git.getprojects(page=page):
if not user and project['namespace']['name'] == gname and project['name'] == pname:
return project
elif user and project['namespace']['path'] == gname and project['name'] == pname:
......@@ -76,10 +73,10 @@ def createproject(pname):
description="Git mirror of %s." % project_name
else:
description=options.desc
new_project=git.createProject(pname,description=description,issues_enabled=str(int(options.issues)),wall_enabled=str(int(options.wall)),merge_requests_enabled=str(int(options.merge)),wiki_enabled=str(int(options.wiki)),snippets_enabled=str(int(options.snippets)),public=str(int(options.public)))
new_project=git.createproject(pname,description=description,issues_enabled=int(options.issues),wall_enabled=int(options.wall),merge_requests_enabled=int(options.merge),wiki_enabled=int(options.wiki),snippets_enabled=int(options.snippets),public=int(options.public))
if gitlab_user != gitlab_namespace:
new_project=findproject(gitlab_user,pname,user=True)
new_project=git.moveProject(found_group['id'],new_project['id'])
new_project=git.moveproject(found_group['id'],new_project['id'])
if findproject(gitlab_namespace,pname):
return findproject(gitlab_namespace,pname)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment