Build, test and push docker images on

Docker images can be built and automatically pushed using the docker plugin. However, how one can build, test and then push docker images? Solutions I found so far require the repository to be trusted (to be able to mount volumes and/or use privileged mode) and this is not something possible on

You could add your docker username and password to the environment from a secret and push to docker hub that way, I believe.

The issue is not really with pushing the image: it is how can we manually build the image to be able to test it before pushing it.