Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to improve git clone & gbs build procedure #692

Open
leemgs opened this issue Dec 24, 2020 · 1 comment
Open

How to improve git clone & gbs build procedure #692

leemgs opened this issue Dec 24, 2020 · 1 comment

Comments

@leemgs
Copy link
Collaborator

leemgs commented Dec 24, 2020

Currently, we support the below acceleration methods as follows to accelerate git and GBS acitivty of the big repositories. We need to find additional methods continually.

ubuntu$ vi ./ci/taos/config/config-environment.sh
. . . OMISSION . . . 
151 # Reference repository to speed up the exectuion time of the "git clone" command
152 REFERENCE_REPOSITORY="/var/www/html/$PRJ_REPO_UPSTREAM_LOCAL/"
153
154 # Specify RPM repo cache for accerating the GBS build speed of Tizen platform
155 REPOCACHE="/var/www/html/$PRJ_REPO_UPSTREAM_LOCAL/repo_cache/"
156

git clone

--reference

git clone --reference ~/gitcaches/your-repo.reference

If the reference repository is on the local machine, automatically setup .git/objects/info/alternates to obtain objects from the reference repository.

--single-branch

Since git 1.7.10, you can also limit the amount of history you clone by cloning a single branch, like so:

git clone -b {branch_name} --single-branch {Repository-URL}
ex) git clone -b javajigi --single-branch https://github.com/myorg/myrepo01

--depth

Provide an argument of -- depth 1 to the git clone command to copy only the latest revision of a repo:

git clone -–depth [depth] [remote-url]
git clone --depth 1 https://github.com/your-org/your-repo01

gbs build

Use the .../GBS-ROOT/cache/ folder.

mkdir -p ./GBS-ROOT/local
pushd ./GBS-ROOT/local
ln -s $REPOCACHE cache

Reference

@taos-ci
Copy link
Collaborator

taos-ci commented Dec 24, 2020

:octocat: cibot: Thank you for posting issue #692. The person in charge will reply soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants