From 8dfc0e462e679f2b221b49f69b15900e488a5c28 Mon Sep 17 00:00:00 2001 From: golanha Date: Tue, 22 Dec 2020 15:09:45 +0200 Subject: [PATCH] use settings.xml at build --- .../java/dockerfile/DockerfileTemplate | 4 +- .../environments/java/dockerfile/settings.xml | 273 ++++++++++++++++-- 2 files changed, 258 insertions(+), 19 deletions(-) diff --git a/core/algorithm-builder/environments/java/dockerfile/DockerfileTemplate b/core/algorithm-builder/environments/java/dockerfile/DockerfileTemplate index 164b73359..0a0ab6da5 100644 --- a/core/algorithm-builder/environments/java/dockerfile/DockerfileTemplate +++ b/core/algorithm-builder/environments/java/dockerfile/DockerfileTemplate @@ -4,11 +4,11 @@ ENV PACKAGES_REGISTRY_USER ${PACKAGES_REGISTRY_USER} ENV PACKAGES_TOKEN ${PACKAGES_TOKEN} ENV PACKAGES_REGISTRY ${PACKAGES_REGISTRY} COPY ./dockerfile/settings.xml ./algorithm_unique_folder/src/main/resources/settings.xml* /root/.m2/ -RUN mvn -q dependency:get -Dartifact=io.hkube:wrapper:${javaWrapperVersion}:jar:wide -DremoteRepositories=http://artifacts-registry:8081/hkube/artifacts-registry/repository/sonatype-snapshot/ -Ddest=/hkube/algorithm-runner/wrapper.jar +RUN mvn -q dependency:get -Dartifact=io.hkube:wrapper:${javaWrapperVersion}:jar:wide -Ddest=/hkube/algorithm-runner/wrapper.jar COPY algorithm_unique_folder/ /hkube/algorithm-runner/algorithm_unique_folder/ COPY ./runJava.sh /hkube/algorithm-runner/ WORKDIR /hkube/algorithm-runner/algorithm_unique_folder/ -RUN mvn -q package -DremoteRepositories=http://mvn-registry:8081/hkube/artifacts-registry/repository/sonatype-snapshot/ +RUN mvn -q package FROM ${baseImage} RUN mkdir -p /hkube/algorithm-runner RUN mkdir -p /hkube/debs diff --git a/core/algorithm-builder/environments/java/dockerfile/settings.xml b/core/algorithm-builder/environments/java/dockerfile/settings.xml index edc216ae6..5cfc20efb 100644 --- a/core/algorithm-builder/environments/java/dockerfile/settings.xml +++ b/core/algorithm-builder/environments/java/dockerfile/settings.xml @@ -1,21 +1,204 @@ - - - - private_repo - ${PACKAGES_REGISTRY_USER} - ${PACKAGES_TOKEN} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mirrorId + central + local + http://artifacts-registry:8081/hkube/artifacts-registry/repository/maven-central/ + + + snapshots + snapshots + snapshots + http://artifacts-registry:8081/hkube/artifacts-registry/repository/sonatype-snapshot/ + + + + + + + + customer - central + customer Customer internal repository ${PACKAGES_REGISTRY} default @@ -23,10 +206,21 @@ true + + + snapshots + snapshots + https://oss.sonatype.org/content/repositories/snapshots + default + + true + + + - central + customer Maven Plugin Repository ${PACKAGES_REGISTRY} default @@ -39,8 +233,53 @@ - - + + + + + + customer - \ No newline at end of file + +