Closed ghost closed 7 years ago
yes, it is possible to push based on gradle properties. In your docker task e.g. buildDocker, add push = project.hasProperty('push')
This means that if your gradle command includes -Ppush it will push to registry, otherwise it will not. Then you can... In development run gradle buildDocker, And in CI, run gradle buildDocker -Ppush
I do most of my dev locally I do not need to push my images to docker hub. Is it possible to skip this step so I do not get gradle failed build ?