Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Add Docker BuildKit Maven caches. #588

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ols-apps/ols-config-importer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
FROM maven:3.6-jdk-8 AS build
RUN mkdir /opt/ols
COPY . /opt/ols/
COPY build-fix/. /root/.m2/repository/
RUN cd /opt/ols && ls && mvn clean package -DskipTests
COPY build-fix/. /root/build-fix
RUN --mount=type=cache,target=/root/.m2 mkdir -p /root/.m2/repository && cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests

FROM openjdk:8-jre-alpine
RUN apk add bash
Expand Down
5 changes: 2 additions & 3 deletions ols-apps/ols-indexer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

FROM maven:3.6-jdk-8 AS build
RUN mkdir /opt/ols
COPY . /opt/ols/
COPY build-fix/. /root/.m2/repository/
RUN cd /opt/ols && ls && mvn clean package -DskipTests
COPY build-fix/. /root/build-fix
RUN --mount=type=cache,target=/root/.m2 mkdir -p /root/.m2/repository && cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests

FROM openjdk:8-jre-alpine
RUN apk add bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,22 @@ else if (deleteOntologies.length > 0){
else {
// otherwise load everything set TOLOAD
for (OntologyDocument document : ontologyRepositoryService.getAllDocumentsByStatus(Status.TOLOAD)) {
// try {
try {
boolean loadResult = ontologyIndexingService.indexOntologyDocument(document);
if (loadResult)
updatedOntologies.add(document.getOntologyId());
else {
haserror = true;
failingOntologies.put(document.getOntologyId(), "An error occurred. Check logs.");
}
// } catch (Throwable t) {
// logger.error("Application failed creating indexes for " + document.getOntologyId() + ": " +
// t.getMessage(), t);
// exceptions.append(t.getMessage());
// exceptions.append("\n");
// haserror = true;
// failingOntologies.put(document.getOntologyId(),t.getMessage());
// }
} catch (Throwable t) {
logger.error("Application failed creating indexes for " + document.getOntologyId() + ": " +
t.getMessage(), t);
exceptions.append(t.getMessage());
exceptions.append("\n");
haserror = true;
failingOntologies.put(document.getOntologyId(),t.getMessage());
}
}
}

Expand Down
5 changes: 2 additions & 3 deletions ols-web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

FROM maven:3.6-jdk-8 AS build
RUN mkdir /opt/ols
COPY . /opt/ols/
COPY build-fix/. /root/.m2/repository/
RUN cd /opt/ols && ls && mvn clean package -DskipTests
COPY build-fix/. /root/build-fix
RUN --mount=type=cache,target=/root/.m2 mkdir -p /root/.m2/repository && cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests

FROM openjdk:8-jre-alpine
RUN apk add bash
Expand Down