From e44226f250e39445f0230a668f8e3a411a57f8bd Mon Sep 17 00:00:00 2001 From: YongchaoWu Date: Thu, 19 Dec 2019 12:53:51 +0100 Subject: [PATCH] Modify pom to push policy agent image to nexus add fabric docker maven plugin remove spotify dockerfile plugin run: mvn clean install will generate local image Issue-ID: NONRTRIC-79 Signed-off-by: YongchaoWu Change-Id: I4db4e4f1ddd3ccb32a77e9862285919bd1f579cc --- near-rt-ric-simulator/common/test_env.sh | 2 +- policy-agent/Dockerfile | 2 +- policy-agent/pom.xml | 41 +++++++++++++++++++++++--------- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/near-rt-ric-simulator/common/test_env.sh b/near-rt-ric-simulator/common/test_env.sh index 7861940d..0ea885b3 100755 --- a/near-rt-ric-simulator/common/test_env.sh +++ b/near-rt-ric-simulator/common/test_env.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Local image and tag, shall point to locally built image (non-nexus path) -export POLICY_AGENT_LOCAL_IMAGE=oransc/policy-agent +export POLICY_AGENT_LOCAL_IMAGE=o-ran-sc/policy-agent # Common env var for auto-test. diff --git a/policy-agent/Dockerfile b/policy-agent/Dockerfile index 51a4dd3e..f28414ce 100644 --- a/policy-agent/Dockerfile +++ b/policy-agent/Dockerfile @@ -17,7 +17,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= # -FROM adoptopenjdk/openjdk11:latest +FROM openjdk:11-jre-slim WORKDIR /opt/app/policy-agent RUN mkdir -p /var/log/policy-agent diff --git a/policy-agent/pom.xml b/policy-agent/pom.xml index 0969f149..6ac79780 100644 --- a/policy-agent/pom.xml +++ b/policy-agent/pom.xml @@ -56,7 +56,7 @@ 1.3.2 2.8.1 1.18.0 - 1.4.13 + 0.30.0 @@ -220,16 +220,35 @@ - com.spotify - dockerfile-maven-plugin - ${dockerfile-maven-plugin.version} - - oransc/policy-agent - ${project.version} - - ${project.build.finalName}.jar - - + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + o-ran-sc/policy-agent:${project.version} + + ${basedir} + Dockerfile + + ${project.version} + + + + + + + -- 2.16.6