Registries seem to be tied to specific project repositories. I have a “generic” container image that is used across several projects and multiple groups. The problem is that in each gitlab-ci.yml file I have to reference a container image in a different project:
image: $CI_REGISTRY/my-group/my-project/my-container-image
The container image handles generic pipeline stuff that is common amongst our projects, e.g.:
- npm install
- npm test
- npm run build
This works ok for all projects under “my-group” but it becomes problematic when another group needs to access the same container image. I had to essentially “fork” the container image into “my-other-group” and have the projects in that group reference the forked version. Now I have to maintain the original image as well as the fork in the other group.
Is there a way to have a general container registry that can be accessed from any group? Right now each project gets its own container registry, it’s not even on the group level but the repo level.
gitlab
group
repo
container-registry <-- i want this up two levels
Hopefully I’m making sense here. I appreciate any input/pointers on how to architect this out better.
One easy workaround would be to push the image to a public registry, such as dockerhub. This may be where I end up…