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

Nexus works

parent 134962f0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
###### 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"
......
......@@ -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>
......
###### 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"
......
......@@ -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>
......
......@@ -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>
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment