Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

merge problem in docker-compose and .gitlab-ci.yml

I'm working on a project that has two branches, develop and production. The .gitlab-ci.yml has two stages on production branch but three different stages on develop branch. Also the docker-compose file is different on this two branches. When I merge develop to production branch that two files replaced with wrong version. What can I do?

like image 674
k.s Avatar asked Nov 01 '25 11:11

k.s


1 Answers

You can prepare a same file for .gitlab-ci that has all stages and make these pipelines run only when on true branches, with this lines:

  only:
    - develop

and you should prepare two docker-compose and on stage's script, point to the right file on each stage.

like image 85
Kasra Najafi Avatar answered Nov 04 '25 06:11

Kasra Najafi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!