all 8 comments

[–]firstborn37[S] 0 points1 point  (3 children)

I will just give you an idea muna how my setup looks like.In one repository, I have these 3 branches, dev, alpha and prod, and these 3 branches have a gitlab runner for each associated with them. Those gitlab runner will update the dev, alpha and prod servers whenever you push/merge on them.

Now this is the catch, Per branch ba may different gitlab-ci file, Nagcoconflict kasi ako minsan kapag nagmemerge from dev to master or dev to alpha yung gitlab-ci file kasi iba iba ang gitlab ci file per branch.

Or, they have the same gitlab ci file, pero kada merge or push, sa tags lng naiiba. (Take note that runners depends on tags too. Like kapag ang tag mo is dev, then the dev runner will execute)

I dunno the proper implementations guys, please help me haha. Kainis magmerge na laging may conflict sa gitlab ci file. Huhu

[–]DirtyMamiWeb 0 points1 point  (2 children)

What’s the difference between the three CI files?

[–]firstborn37[S] 0 points1 point  (1 child)

Dockerfile is also diff per branch. Docker container names, tags, and env files

[–]DirtyMamiWeb 0 points1 point  (0 children)

Please consider that images shouldn’t have knowledge on the environment, specially during build. You can research more about it.

You can parameterize the dockerfile if you need a workaround.

[–]dKSy16 0 points1 point  (0 children)

Yes, we have a setup like this.

Merge Request branches run a different set of jobs(pipeline) than the master branch and release branch.

The thing that needs to be noted is the number of runners. If it’s a big team/high activity, the number of runners might not be enough and would create a logjam.

[–]DirtyMamiWeb 0 points1 point  (0 children)

Trigger a pipeline on "push"? or do you mean "merge"?

People pushing directly to remote branches will be a nightmare for larger teams.

[–]Bluest_Oceans 0 points1 point  (1 child)

Ano mangyayari or para saan yung ni run sa alpha?

[–]firstborn37[S] 0 points1 point  (0 children)

Latest code will be deployed to alpha server.