Pushing a docker image into Artifactory via the publishing mechanism in gradle
We are using the Gradle Artifactory Plugin to publish artifacts into our Artifactory server (see also these instructions).
Now we have added tasks into our Gradle scripts to build Docker images and we want to push these images into our Artifactory (which we have configured as a Docker repository).
I’ve managed to do this using custom tasks but I would really like to plug this into our current workflow so that
gradle artifactoryPublish does this at the same time that it uploads our other artifacts into the repository. The main benefit of doing this would be that the publishing mechanism makes sure that all modules build successfully before pushing and I would like to tap into that.
So does anybody know what the best way is to plug
docker push into the
artifactoryPublish task that comes with the Gradle Artifactory Plugin?