aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-05-15 07:35:26 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-05-15 07:35:26 +0000
commite932b0f9b8aff49d9bfd78440bc693397b00c16c (patch)
treeef497f941c7316339811e90ec7e0519953dd3e01
parentcdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (diff)
Switch bff docker base image
Issue-ID: PORTALNG-1 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I7afde9193743e42851e698a1f826883e2c8161d7
-rw-r--r--Dockerfile20
-rw-r--r--app/src/test/java/org/onap/portal/bff/users/CreateUserIntegrationTest.java2
-rw-r--r--lib/build.gradle1
3 files changed, 6 insertions, 17 deletions
diff --git a/Dockerfile b/Dockerfile
index 3e2f704..beafabd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,23 +1,11 @@
-FROM openjdk:17 as builder
+FROM eclipse-temurin:17 as builder
COPY . ./portalbff
WORKDIR /portalbff
-# assemble does not run tests (as opposed to build)
-RUN ./gradlew assemble
+RUN ./gradlew build
-# Run locally (docker build --target=prod -t <tag> .)
-FROM openjdk:17 as prod
+FROM eclipse-temurin:17-jre-alpine
ARG JAR_FILE=/portalbff/app/build/libs/app.jar
COPY --from=builder ${JAR_FILE} app.jar
EXPOSE 9080
-ENTRYPOINT [ "java","-jar","app.jar" ]
-
-# Run in pipeline (docker build --target=pipeline -t <tag> .)
-FROM openjdk:17 as pipeline
-WORKDIR /app
-
-ARG JAR_FILE=app/build/libs/app.jar
-COPY ${JAR_FILE} app.jar
-
-ENTRYPOINT [ "java","-jar","app.jar" ]
-EXPOSE 9080 \ No newline at end of file
+ENTRYPOINT [ "java","-jar","app.jar" ] \ No newline at end of file
diff --git a/app/src/test/java/org/onap/portal/bff/users/CreateUserIntegrationTest.java b/app/src/test/java/org/onap/portal/bff/users/CreateUserIntegrationTest.java
index 641724e..4e752aa 100644
--- a/app/src/test/java/org/onap/portal/bff/users/CreateUserIntegrationTest.java
+++ b/app/src/test/java/org/onap/portal/bff/users/CreateUserIntegrationTest.java
@@ -78,7 +78,7 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
.accept(MediaType.APPLICATION_JSON_VALUE)
.header(new Header("X-Request-Id", xRequestID))
.when()
- .get(String.format("/users/%s/roles", userId))
+ .get("/users/{id}/roles", userId)
.then()
.statusCode(HttpStatus.OK.value())
.extract()
diff --git a/lib/build.gradle b/lib/build.gradle
index 0e2a413..19e9e72 100644
--- a/lib/build.gradle
+++ b/lib/build.gradle
@@ -67,6 +67,7 @@ spotless {
target project.fileTree(project.projectDir) {
include '**/*.java'
exclude '**/build/**'
+ exclude '**/generated-sources/**'
}
removeUnusedImports()
trimTrailingWhitespace()