What I want to do is that in case that the user add the project property dev (which means the build is being executed in dev machine), I want to create the war (assemble) build the docker image (buildImage) and then call the docker-compose file passing the docker image that has been created and finally execute the tests. So doing ./gradlew -Penv=dev :acceptance-test:test makes all these steps automatically.
But if I am not in dev (means in Jenkins), when I run :acceptance-test:test I don’t want to start docker-compose and so on since the application is already deployed in PRE. But then when I execute the :acceptance-test:test task it is true that does not start the docker-compose, but it creates the war again, which is totally useless since this stage has been already executed in the past and now I don’t want to do the war again.