This is an automated email from the ASF dual-hosted git repository.
awasum 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 e7889f8 copy .git/** into build container so git.properties can be
generated [FINERACT-983] (#904)
e7889f8 is described below
commit e7889f84633d8d6a7eae6eef470821a945844657
Author: Michael Vorburger ⛑️ <[email protected]>
AuthorDate: Sun May 17 11:33:29 2020 +0200
copy .git/** into build container so git.properties can be generated
[FINERACT-983] (#904)
---
.dockerignore | 9 +++------
.gitignore | 1 +
.travis.yml | 3 ++-
Dockerfile | 16 +---------------
4 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/.dockerignore b/.dockerignore
index ed4cfd1..23278ab 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -18,12 +18,9 @@
build/*
.gradle/*
+*.jar
+*.war
+
# Incremental "docker build" is faster if we can modify the Dockerfile
# without "COPY ." re-transferring everything into the builder container.
Dockerfile
-
-# https://github.com/containers/buildah/issues/1582
-.git/*
-.git/*/*
-.git/*/*/*
-.git/*/*/*/*
diff --git a/.gitignore b/.gitignore
index eb4aa39..8413354 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ catalina.base_IS_UNDEFINED/
keystore.jks
bin/
fineract-provider/src/main/resources/application.properties
+.lock
diff --git a/.travis.yml b/.travis.yml
index f3da52d..3abb2b3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -71,5 +71,6 @@ script:
# using "&&" instead of several "-" means that integrationTest does not run if
test fails,
# 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
- - ./gradlew --console=plain licenseMain licenseTest licenseIntegrationTest
check && ./gradlew --console=plain integrationTest --fail-fast && sudo
service mysql stop && docker-compose build && docker-compose up -d &&
sleep 30s && http --verify=no --timeout 240 --check-status get
https://localhost:8443/fineract-provider/actuator/health
+ - ./gradlew --console=plain licenseMain licenseTest licenseIntegrationTest
check && ./gradlew --console=plain integrationTest --fail-fast && sudo
service mysql stop && docker-compose build && docker-compose up -d &&
sleep 30s && 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 ))
# 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 4b61374..712648c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,22 +17,8 @@
#
FROM openjdk:11 AS builder
-# COPY . fineract is slow e.g. when using Podman instead of Docker (because it
doesn't honor .dockerignore and copies all of .git/** into the container..), so
let's explicitly list only what we need:
-COPY fineract-provider/src/main fineract/fineract-provider/src/main/
-COPY fineract-provider/config fineract/fineract-provider/config/
-COPY fineract-provider/gradle fineract/fineract-provider/gradle/
-COPY fineract-provider/properties fineract/fineract-provider/properties/
-COPY fineract-provider/[bd]*.gradle fineract/fineract-provider/
-COPY fineract-provider/gradle.properties fineract/fineract-provider/
-COPY fineract-provider/gradlew fineract/fineract-provider/
-COPY gradle* fineract/
-COPY settings.gradle fineract/
-COPY licenses fineract/licenses/
-COPY *LICENSE* fineract/
-COPY *NOTICE* fineract/
-
+COPY . fineract
WORKDIR fineract
-# RUN find .
RUN ./gradlew --no-daemon -x rat -x test war
# =========================================