diff --git a/Makefile b/Makefile index abe97f12985f26742d656f5c06087b6588c11d88..9cea35dc63e1886e3e7e43aa01c1208485434333 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ APP_VERSION ?= 1.8.1 CHART_VERSION ?= 1.8.1 REPOSITORY_URL ?= registry.datalab.tuwien.ac.at/dbrepo -PLATFORM ?= linux/amd64 .PHONY: all all: help diff --git a/dbrepo-data-service/Dockerfile b/dbrepo-data-service/Dockerfile index 769014f61bd2b6925820470d9070203a8431e68b..dac2c37d34fc058b3f5c81821a9f9419e2f52c86 100644 --- a/dbrepo-data-service/Dockerfile +++ b/dbrepo-data-service/Dockerfile @@ -1,8 +1,4 @@ ###### FIRST STAGE ###### -FROM --platform=$BUILDPLATFORM dbrepo-core:build AS dependency -LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" - -###### SECOND STAGE ###### FROM --platform=$BUILDPLATFORM maven:3-amazoncorretto-17 AS build LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" @@ -10,8 +6,6 @@ COPY ./pom.xml ./ RUN mvn -fn dependency:go-offline -COPY --from=dependency /root/.m2/repository/at/ac/tuwien/ifs/dbrepo /root/.m2/repository/at/ac/tuwien/ifs/dbrepo - COPY ./querystore ./querystore COPY ./report ./report COPY ./rest-service ./rest-service @@ -20,7 +14,7 @@ COPY ./services ./services # Make sure it compiles RUN mvn -fn clean package -DskipTests -###### THIRD STAGE ###### +###### SECOND STAGE ###### FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.19 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" diff --git a/dbrepo-data-service/pom.xml b/dbrepo-data-service/pom.xml index 6f67e74b7043a9df43bd38d0a5a2bbd3cd4e1050..e1e82c7246c22b0a7ab1e963141924cc3c729f50 100644 --- a/dbrepo-data-service/pom.xml +++ b/dbrepo-data-service/pom.xml @@ -98,10 +98,6 @@ <artifactId>dbrepo-core</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - </dependency> <!-- Spark --> <dependency> <groupId>org.apache.spark</groupId> @@ -330,6 +326,13 @@ </plugins> </build> + <repositories> + <repository> + <id>datalab</id> + <url>https://s39.datalab.tuwien.ac.at/nexus/repository/maven-releases/</url> + </repository> + </repositories> + <licenses> <license> <name>Apache-2.0</name> diff --git a/dbrepo-data-service/querystore/pom.xml b/dbrepo-data-service/querystore/pom.xml index 5f58c03d52f654815cbe7f631f42e00c3ace2e42..70b9f08b08280230892cbe011af82240d617f9fc 100644 --- a/dbrepo-data-service/querystore/pom.xml +++ b/dbrepo-data-service/querystore/pom.xml @@ -13,7 +13,7 @@ <name>dbrepo-data-service-querystore</name> <version>1.8.1</version> - <dependencies/> + <dependencies /> <build> <plugins> diff --git a/dbrepo-metadata-service/Dockerfile b/dbrepo-metadata-service/Dockerfile index f034640e6a47afdf6822352dc33bb498726bf708..e9a3664e9312c5863876a65914e2f3e69bb58d1b 100644 --- a/dbrepo-metadata-service/Dockerfile +++ b/dbrepo-metadata-service/Dockerfile @@ -1,8 +1,4 @@ ###### FIRST STAGE ###### -FROM --platform=$BUILDPLATFORM dbrepo-core:build AS dependency -LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" - -###### SECOND STAGE ###### FROM --platform=$BUILDPLATFORM maven:3-amazoncorretto-17 AS build LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" @@ -10,8 +6,6 @@ COPY ./pom.xml ./ RUN mvn -fn dependency:go-offline -COPY --from=dependency /root/.m2/repository/at/ac/tuwien/ifs/dbrepo /root/.m2/repository/at/ac/tuwien/ifs/dbrepo - COPY ./oai ./oai COPY ./report ./report COPY ./repositories ./repositories @@ -21,7 +15,7 @@ COPY ./services ./services # Make sure it compiles RUN mvn -fn clean package -DskipTests -###### THIRD STAGE ###### +###### SECOND STAGE ###### FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.19 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" diff --git a/dbrepo-metadata-service/pom.xml b/dbrepo-metadata-service/pom.xml index 313d6d0db530caa829e6325cef263d1077b954e8..dc05c2416d5e4ba414e212f9b57c3a58426c5dc6 100644 --- a/dbrepo-metadata-service/pom.xml +++ b/dbrepo-metadata-service/pom.xml @@ -71,10 +71,6 @@ <artifactId>dbrepo-core</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - </dependency> <!-- Data Source --> <dependency> <groupId>org.mariadb.jdbc</groupId> @@ -274,6 +270,13 @@ </plugins> </build> + <repositories> + <repository> + <id>datalab</id> + <url>https://s39.datalab.tuwien.ac.at/nexus/repository/maven-releases/</url> + </repository> + </repositories> + <licenses> <license> <name>Apache-2.0</name> diff --git a/lib/java/dbrepo-core/pom.xml b/lib/java/dbrepo-core/pom.xml index d86419d19dbb22e8db5ef64f7e8b01d262673bcd..f4e4db7625866a113ae6046536e8b2a65ec2158b 100644 --- a/lib/java/dbrepo-core/pom.xml +++ b/lib/java/dbrepo-core/pom.xml @@ -153,9 +153,30 @@ </annotationProcessorPaths> </configuration> </plugin> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.8.1</version> + <executions> + <execution> + <id>default-deploy</id> + <phase>deploy</phase> + <goals> + <goal>deploy</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> + <distributionManagement> + <repository> + <id>maven-releases</id> + <layout>default</layout> + <url>https://s39.datalab.tuwien.ac.at/nexus/repository/maven-releases/</url> + </repository> + </distributionManagement> + <licenses> <license> <name>Apache-2.0</name> diff --git a/make/build.mk b/make/build.mk index 271fc3c9ec7e08f73e2cc865b006cfb1ef3b2fe9..f6c42cba88853a7061b3eff2b5d249c4f49cbf91 100644 --- a/make/build.mk +++ b/make/build.mk @@ -2,10 +2,10 @@ .PHONY: build-images build-images: ## Build Docker images. - docker build $(DOCKER_BUILD_EXTRA_ARGS) -t dbrepo-core:build --target build ./lib/java/dbrepo-core - docker build $(DOCKER_BUILD_EXTRA_ARGS) -t dbrepo-data-service:build --target build dbrepo-data-service - docker build $(DOCKER_BUILD_EXTRA_ARGS) -t dbrepo-metadata-service:build --target build dbrepo-metadata-service - docker compose build $(DOCKER_COMPOSE_BUILD_EXTRA_ARGS) + mvn -f ./lib/java/dbrepo-core/pom.xml clean package + mvn deploy:deploy-file -Dfile=./lib/java/dbrepo-core/target/dbrepo-core-$(APP_VERSION).jar -DgroupId=at.ac.tuwien.ifs.dbrepo -DartifactId=dbrepo-core -Dversion=$(APP_VERSION) -Dpackaging=jar -Durl=file:./dbrepo-data-service/lib/ -DrepositoryId=maven-repository -DupdateReleaseInfo=true + mvn deploy:deploy-file -Dfile=./lib/java/dbrepo-core/target/dbrepo-core-$(APP_VERSION).jar -DgroupId=at.ac.tuwien.ifs.dbrepo -DartifactId=dbrepo-core -Dversion=$(APP_VERSION) -Dpackaging=jar -Durl=file:./dbrepo-metadata-service/lib/ -DrepositoryId=maven-repository -DupdateReleaseInfo=true + docker compose build .PHONY: build-data-service build-data-service: ## Build the Data Service.