Skip to content
Snippets Groups Projects
Verified Commit 7ca26fb0 authored by Martin Weise's avatar Martin Weise
Browse files

Nexus works

parent 134962f0
Branches
No related tags found
No related merge requests found
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
APP_VERSION ?= 1.8.1 APP_VERSION ?= 1.8.1
CHART_VERSION ?= 1.8.1 CHART_VERSION ?= 1.8.1
REPOSITORY_URL ?= registry.datalab.tuwien.ac.at/dbrepo REPOSITORY_URL ?= registry.datalab.tuwien.ac.at/dbrepo
PLATFORM ?= linux/amd64
.PHONY: all .PHONY: all
all: help all: help
......
###### FIRST STAGE ###### ###### 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 FROM --platform=$BUILDPLATFORM maven:3-amazoncorretto-17 AS build
LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at"
...@@ -10,8 +6,6 @@ COPY ./pom.xml ./ ...@@ -10,8 +6,6 @@ COPY ./pom.xml ./
RUN mvn -fn dependency:go-offline 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 ./querystore ./querystore
COPY ./report ./report COPY ./report ./report
COPY ./rest-service ./rest-service COPY ./rest-service ./rest-service
...@@ -20,7 +14,7 @@ COPY ./services ./services ...@@ -20,7 +14,7 @@ COPY ./services ./services
# Make sure it compiles # Make sure it compiles
RUN mvn -fn clean package -DskipTests RUN mvn -fn clean package -DskipTests
###### THIRD STAGE ###### ###### SECOND STAGE ######
FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.19 AS runtime FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.19 AS runtime
LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at"
......
...@@ -98,10 +98,6 @@ ...@@ -98,10 +98,6 @@
<artifactId>dbrepo-core</artifactId> <artifactId>dbrepo-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!-- Spark --> <!-- Spark -->
<dependency> <dependency>
<groupId>org.apache.spark</groupId> <groupId>org.apache.spark</groupId>
...@@ -330,6 +326,13 @@ ...@@ -330,6 +326,13 @@
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>datalab</id>
<url>https://s39.datalab.tuwien.ac.at/nexus/repository/maven-releases/</url>
</repository>
</repositories>
<licenses> <licenses>
<license> <license>
<name>Apache-2.0</name> <name>Apache-2.0</name>
......
###### FIRST STAGE ###### ###### 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 FROM --platform=$BUILDPLATFORM maven:3-amazoncorretto-17 AS build
LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at"
...@@ -10,8 +6,6 @@ COPY ./pom.xml ./ ...@@ -10,8 +6,6 @@ COPY ./pom.xml ./
RUN mvn -fn dependency:go-offline 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 ./oai ./oai
COPY ./report ./report COPY ./report ./report
COPY ./repositories ./repositories COPY ./repositories ./repositories
...@@ -21,7 +15,7 @@ COPY ./services ./services ...@@ -21,7 +15,7 @@ COPY ./services ./services
# Make sure it compiles # Make sure it compiles
RUN mvn -fn clean package -DskipTests RUN mvn -fn clean package -DskipTests
###### THIRD STAGE ###### ###### SECOND STAGE ######
FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.19 AS runtime FROM --platform=$BUILDPLATFORM amazoncorretto:17-alpine3.19 AS runtime
LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at"
......
...@@ -71,10 +71,6 @@ ...@@ -71,10 +71,6 @@
<artifactId>dbrepo-core</artifactId> <artifactId>dbrepo-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!-- Data Source --> <!-- Data Source -->
<dependency> <dependency>
<groupId>org.mariadb.jdbc</groupId> <groupId>org.mariadb.jdbc</groupId>
...@@ -274,6 +270,13 @@ ...@@ -274,6 +270,13 @@
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>datalab</id>
<url>https://s39.datalab.tuwien.ac.at/nexus/repository/maven-releases/</url>
</repository>
</repositories>
<licenses> <licenses>
<license> <license>
<name>Apache-2.0</name> <name>Apache-2.0</name>
......
...@@ -153,9 +153,30 @@ ...@@ -153,9 +153,30 @@
</annotationProcessorPaths> </annotationProcessorPaths>
</configuration> </configuration>
</plugin> </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> </plugins>
</build> </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> <licenses>
<license> <license>
<name>Apache-2.0</name> <name>Apache-2.0</name>
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
.PHONY: build-images .PHONY: build-images
build-images: ## Build Docker images. build-images: ## Build Docker images.
docker build $(DOCKER_BUILD_EXTRA_ARGS) -t dbrepo-core:build --target build ./lib/java/dbrepo-core mvn -f ./lib/java/dbrepo-core/pom.xml clean package
docker build $(DOCKER_BUILD_EXTRA_ARGS) -t dbrepo-data-service:build --target build dbrepo-data-service 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
docker build $(DOCKER_BUILD_EXTRA_ARGS) -t dbrepo-metadata-service:build --target build dbrepo-metadata-service 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 $(DOCKER_COMPOSE_BUILD_EXTRA_ARGS) docker compose build
.PHONY: build-data-service .PHONY: build-data-service
build-data-service: ## Build the Data Service. build-data-service: ## Build the Data Service.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment