I have gitlab server setup on my system. It is working fine with single git repositories. Now I want to push complete android source with all .git projects to this server. How to do that? Do I have to push all project individually?
-
Very similar questions have been asked (and answered) before, e.g. http://stackoverflow.com/questions/20921673/create-android-server-local-repository-for-specific-tag, http://stackoverflow.com/questions/6136789/cloning-android-sources-to-a-local-repository-server, and http://stackoverflow.com/questions/19530585/pushing-repo-branch-to-local-aosp-mirror. They should at least clear some things up. The fact that you're using Gitlab might change things a bit. – Magnus Bäck Jan 28 '15 at 16:55
3 Answers
I have the same problem, managing different AOSP releases for our hardware.
Please note that I choose not to have ALL AOSP repositories in our GitLab instance, but only the one that need customization. The other are cloned directly from google git (or local repo mirror to speed up clone).
What I did is having a group (aosp) for general purpose repository that might apply to different project. Having a custom group for a given AOSP customization, where I usually place only device/xxx sources and repo manifest.
The most annoying task here is to setup the aosp
group with, usually 50 repositories. Here is what I did:
- start from the standard AOSP source (repo init../repo sync)
- apply patches from silicon vendor, add any new repos (usually you have at lease some device/yourbranch/yourdevice). Add this patches as new branches (so
repo list
works with my scripts) - with a couple of grep/awk parse
repo list
output to get changed repos - for those repo, with a couple of other scripts and a bit of python gitlab commands, create the project on your server
My script can be found in my gitlab project. You might need to adapt them to you own AOSP version.
HTH,
Andrea

- 306
- 3
- 9
You can try (3 years later) the latest GitLab 11.2 (August 22nd, 2018).
See "Support for Android project import":
Until now, importing complex project structures with multiple sub-structures was a tedious, time-consuming task.
With this release, we introduce support for manifest files for project imports. A manifest XML file contains metadata for groups of repositories, allowing you to import larger project structures with multiple repositories in one go.
When creating a new project, there is a new option to choose a “Manifest file” as source of your project import on the “Import project” tab. In addition, you can select from the list of individual projects in a subsequent step if you don’t want to import the complete project structure.
This improvement allows you to import the Android OS code from the Android Open Source Project (AOSP), as one exciting use case. You can also import other projects that use manifest files which meet our format requirements.

- 1,262,500
- 529
- 4,410
- 5,250
Here's what I've found. In short, I don't think its viable to use gitlab to help host an aosp mirror.
My test was to use premade docker containers and try the website out. (from: https://github.com/sameersbn/docker-gitlab )
What I found was that just like (bitbucket or github) you create a project that is tied to a single git. -- You would have to create a project for all
Step 1. Launch a postgresql container
docker run --name gitlab-postgresql -d \
--env 'DB_NAME=gitlabhq_production' \
--env 'DB_USER=gitlab' --env 'DB_PASS=password' \
--volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \
quay.io/sameersbn/postgresql:9.4-5
Step 2. Launch a redis container
docker run --name gitlab-redis -d \
--volume /srv/docker/gitlab/redis:/var/lib/redis \
quay.io/sameersbn/redis:latest
Step 3. Launch the gitlab container
docker run --name gitlab -d \
--link gitlab-postgresql:postgresql --link gitlab-redis:redisio \
--publish 10022:22 --publish 10080:80 \
--env 'GITLAB_PORT=10080' --env 'GITLAB_SSH_PORT=10022' \
--env 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
quay.io/sameersbn/gitlab:8.0.5

- 69
- 1
- 1