copy .git/** into build container so git.properties can be generated [FINERACT-983] (#904)

This commit is contained in:
Michael Vorburger ⛑️
2020-05-17 10:33:29 +01:00
committed by GitHub
parent 7a98ad8d07
commit e7889f8463
4 changed files with 7 additions and 22 deletions
+3 -6
View File
@@ -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/*/*/*/*
+1
View File
@@ -17,3 +17,4 @@ catalina.base_IS_UNDEFINED/
keystore.jks
bin/
fineract-provider/src/main/resources/application.properties
.lock
+2 -1
View File
@@ -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)
+1 -15
View File
@@ -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
# =========================================