0

I have a Spring Boot Gradle project with yml configuration:

spring:
  datasource:
    username:
    password:
    url:

When I run ./gradlew clean build Gradle runs all my tests. How can I pass datasource parameters using command-line?

I tried something like ./gradlew clean build -Dspring.datasource.url... but it doesn't work. I Also tried ./gradlew clean build -Pspring.datasource.url, created a variable inside gradle.build and then set systemProperty, but it also doesn't work.

Does anyone have an easy solution?

Alexander Kuzmenko
  • 529
  • 1
  • 12
  • 32
  • what is the purpose? Usually you would pass this information in the moment you run this application, not on the build action... – Glim Apr 19 '18 at 12:12
  • I need to check whether all tests are passed after git push. CI does this using gradle build task. – Alexander Kuzmenko Apr 19 '18 at 12:16

0 Answers0