Speed up GitLab build time

Hello Folks,

I have a question for you all. How long does it take for you to build and test a laravel website with gitlab ci? For me it takes about 5-9 minutes which is I think terribly slow. Usually it get’s stuck at Pulling docker image bobey/docker-gitlab-ci-runner-php5.6 ... Is it the images fault? Sometimes it passes it very fast but then comes the really hard part: composer install. That takes most of the build time. Somewhy I think it is just not working as fast as it should be on a computer like that where GitLab is running on. Do you have any thoughs about speeding up the builds so my developers could work faster so they don’t have to wait 5-9 minutes to see if the results are good or not?

Thank you in advance!!


Maybe if I could tell GitLab CI to use an already existing docker on my system and run the build inside that? Is that possible?

I would like to know the same. Is there any way to make the build process faster?

You can mark the vendor directory to be cached in your .gitlab-ci.yml, e.g.

    - vendor/

See http://docs.gitlab.com/ce/ci/yaml/README.html#cache.

composer install should remove everything that doesn’t belong there, so should be safe even if you change the composer.json/lock file.

1 Like

But what will happen if composer.lock changed?

If you use linux you can try this script https://github.com/dmitry-php/coarc
It will reduce composer install execution time dramatically!