Closed dhose closed 5 years ago
I'd like to have this capability as well. Build rules in Docker settings allow to tag images based on repository tag however this would not work in our case as the Docker repository is not the OpenGrok main repository and hence it is not tagged.
https://stackoverflow.com/questions/38993182/how-to-tag-an-image-in-a-dockerfile answers (negatively) the same question I had.
Folding this repository into the main OpenGrok repository would solve the problem (and also would remove the awkward hook that triggers Docker builds).
Actually, it might be possible to push the image to Docker hub from Travis build (recently added) - https://docs.travis-ci.com/user/docker/
The problem with the previous approach is that all build would have to happen in Travis so they are properly tagged. Currently there is a webhook setup on Github to trigger builds on Docker hub. It would have to be replaced by Github webhook to Travis. It is possible to trigger builds in Travis (https://docs.travis-ci.com/user/triggering-builds/) however that seems to require custom JSON payload and custom HTTP headers which is not currently possible with Github webhooks (https://developer.github.com/v3/repos/hooks/).
One possibility would be to trigger the OpenGrok/docker Travis build from oracle/OpenGrok Travis build.
Looks like this is working.
It would be nice if the resulting Docker image is also tagged with the actual OpenGrok version and not just latest.
Thanks!