Hacker News new | ask | show | jobs
by e12e 2344 days ago
I'm not sure I follow, typical gitlab ci runs in the branch? So there's eg a .gitlab-ci.yml and a ./Dockerfile in branch "new-feature", and one in "old-story".

They would both run OK in your scenario. If "new-feature" is merged first, "old-branch" would have to merge with (new) master and fix ci before being able to pass ci and be allowedtto merge?

1 comments

Usually you annotate the CI file with a container ID, not a Dockerfile, AFAIK.
You can use the Gitlab CI variables so that both the "docker build" job and the "test docker image" job use a unique image ID for your pull request.

Personally I use branch + git tag name as the image tag, but you can use a commit hash or whatever.

Hm, ok. We build containers using ci, but I see how you might want to have a container for running tests. Depends a bit on the language/framework i suppose.