This is an automated email from the ASF dual-hosted git repository.
kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 333759f FINERACT-1079: Run spotlessCheck for automated builds,
spotlessApply for manual ones
333759f is described below
commit 333759f2aaf056831620cff8467b17833d7d7634
Author: Petri Tuomola <[email protected]>
AuthorDate: Mon Jul 6 12:44:45 2020 +0300
FINERACT-1079: Run spotlessCheck for automated builds, spotlessApply for
manual ones
---
.travis.yml | 2 +-
Dockerfile | 2 +-
fineract-provider/build.gradle | 9 +++++++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 184a451..60a35f4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -74,6 +74,6 @@ script:
# and Docker test does not run if integration test fails, which makes PR
failure easier to understand.
# @see
https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase
# NOTE: Sleep after docker-compose increased to 60 seconds as often Travis
would fail to get Docker up in 30 seconds
- - ./gradlew --console=plain -q licenseMain licenseTest
licenseIntegrationTest check && ./gradlew --console=plain integrationTest
--fail-fast && sudo service mysql stop && docker-compose build &&
docker-compose up -d && sleep 60s && http --verify=no --timeout 240
--check-status get https://localhost:8443/fineract-provider/actuator/health &&
(( $(http --verify=no --timeout 30 --check-status --body get
https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
+ - ./gradlew --console=plain -PautomatedBuild=true -q licenseMain licenseTest
licenseIntegrationTest check && ./gradlew --console=plain
-PautomatedBuild=true integrationTest --fail-fast && sudo service mysql stop
&& docker-compose build && docker-compose up -d && sleep 60s && http
--verify=no --timeout 240 --check-status get
https://localhost:8443/fineract-provider/actuator/health && (( $(http
--verify=no --timeout 30 --check-status --body get
https://localhost:8443/finera [...]
# We stop the mysql system service when running the Docker test to avoid port
3306 conflicts (unless we run the mysql in docker-compose on another port; req.
FINERACT-773)
# The fany /actuator/info test makes sure that has more than 100 characters of
JSON to test that the git.properties worked (see FINERACT-983)
diff --git a/Dockerfile b/Dockerfile
index fa32a21..bfc5350 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -22,7 +22,7 @@ RUN apt-get update -qq && apt-get install -y wget
COPY . fineract
WORKDIR /fineract
-RUN ./gradlew --no-daemon -q -x rat -x test bootJar
+RUN ./gradlew -PautomatedBuild=true --no-daemon -q -x rat -x test bootJar
WORKDIR /fineract/target
RUN jar -xf /fineract/build/libs/fineract-provider.jar
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index ff5af1f..d783ccb 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -576,10 +576,15 @@ modernizer {
]
}
-compileJava{
+compileJava {
dependsOn rat
- dependsOn spotlessCheck
finalizedBy resolve
+
+ if (project.hasProperty("automatedBuild")) {
+ dependsOn(spotlessCheck)
+ } else {
+ dependsOn(spotlessApply)
+ }
}
war {