eventuate-foundation / eventuate-common

Other
12 stars 20 forks source link

Use docker gradle plugin. Remove env variables. #42

Open dartartem opened 4 years ago

dartartem commented 4 years ago

if the containers don't have an image: element will they pushed?`

There is no such info in the docs, however, I made an experiment. I ran ./gradlew mysqlComposeBuild with no images defined, build passed. Then I define an image and got access denied error:

Pushing mysql (eventuateio/eventuate-mysql:master)...
denied: requested access to the resource is denied

Is there a property to control which images will be pushed?

yes, but only inside specified or default compose file:

pushServices = [] // which services should be pushed, if not defined then uponcomposePushtask all defined services in compose file will be pushed (default behaviour)

This seems unnecessary. A single command should do everything

gradlew composeBuild composePush

It seems, it does not work:

./gradlew composeBuild composePush

Task :composeBuild FAILED
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

I am preparing PR with the fixes.

cer commented 4 years ago

./gradlew composeBuild composePush

Why would this work? You haven't told it what docker-compose file to use!

cer commented 4 years ago

The above commit implements the correct image publishing logic: eg. only publish Docker images for release branches.

dartartem commented 4 years ago

@cer

Why would this work? You haven't told it what docker-compose file to use!

So, besides a separate docker compose entries for testing, we can use global configuration for publishing, defining all compose files, right? For some reason, I did not think about it.