We use a base image for all steps of the CI (containing git, wget, ...) and use the Gitlab cache system rather than environment variables in a specific image to pass needed values across jobs, such as the name of the image to build and to analyze.
The image will be triggered for all Dockerfile and docker-compose.yml files.
Due to security and usability reasons, deployment has been removed. As a consequence :
So, the image is built, analyzed and pushed only.
Etherpad is updated to the newest version and Mattermost is now a custom image managed by the CI.
Factorization in .gitlab-ci.yml