How to manage a custom composre package in Gitlab: ci, development environment and deploy

Published

I ran into a small issue when developing a Symfony application hosted in Gitlab and using pipelines.

I want to add a custom bundle hosted in the same copmanys repo and I ran into some problems:

  1. We use docker-compose for development. We have a php container from where we run composer install/update/etc. So if I try to add a private repo… how could I authenticate in Gitlab to download the bundle? Also this has to be done across the development team
  2. We use the gitlab pipeline to perform various tests that require composer install (phpunit, behat, phpstan…) So when performing a composer install from the pipeline step… how it will authenticate to download the package hosted in the private repo?
  3. And finally, we plan to build the AMI in the same pipeline, can I use the same authentication method as in step 2 or is there any other way to do so?

I’ve been reading the gitlab documentation about tokens but that would not work from the development container or the pipeline unless I’m missing something.

Thanks in advance for your help

Source: Docker Questions

Published
Categorised as composer-php, docker, gitlab Tagged , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq