2022-12-13 10:29:22 +01:00
|
|
|
####################################### Build stage #######################################
|
|
|
|
FROM maven:3.6.3-openjdk-11-slim AS build-stage
|
2022-12-13 08:22:00 +01:00
|
|
|
|
2022-12-13 10:29:22 +01:00
|
|
|
COPY . /build/
|
2022-12-13 08:22:00 +01:00
|
|
|
WORKDIR /build/
|
2022-12-13 10:29:22 +01:00
|
|
|
RUN mvn clean package -DskipTests
|
|
|
|
|
|
|
|
ARG CREPO_BINARIES_REPO_URL
|
|
|
|
ARG CREPO_BINARIES_CREDENTIAL
|
|
|
|
ARG BUILD_VERSION
|
|
|
|
ENV CREPO_BINARIES_REPO_URL=$CREPO_BINARIES_REPO_URL
|
|
|
|
ENV CREPO_BINARIES_CREDENTIAL=$CREPO_BINARIES_CREDENTIAL
|
|
|
|
ENV BUILD_VERSION=$BUILD_VERSION
|
2022-12-13 08:22:00 +01:00
|
|
|
|
2022-12-13 10:29:22 +01:00
|
|
|
RUN curl --location --request PUT "${CREPO_BINARIES_REPO_URL}opendmp/repository-jars/zenodo/zenodo-deposit-${BUILD_VERSION}.jar" \
|
|
|
|
--header "Authorization: Basic ${CREPO_BINARIES_CREDENTIAL}" \
|
|
|
|
--header "Content-Type: application/json" \
|
|
|
|
--data-binary "@/build/target/repositorydepositzenodo-1.0.0-SNAPSHOT.jar"
|