#!/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.
# 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
<junit-platform-surefire-provider.version>1.3.2</junit-platform-surefire-provider.version>
<formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
<spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
- <dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
+ <docker-maven-plugin>0.30.0</docker-maven-plugin>
</properties>
<dependencies>
<dependency>
</executions>
</plugin>
<plugin>
- <groupId>com.spotify</groupId>
- <artifactId>dockerfile-maven-plugin</artifactId>
- <version>${dockerfile-maven-plugin.version}</version>
- <configuration>
- <repository>oransc/policy-agent</repository>
- <tag>${project.version}</tag>
- <buildArgs>
- <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
- </buildArgs>
- </configuration>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin}</version>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>push-policy-agent-image</id>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ <configuration>
+ <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
+ <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
+ <images>
+ <image>
+ <name>o-ran-sc/policy-agent:${project.version}</name>
+ <build>
+ <contextDir>${basedir}</contextDir>
+ <dockerFile>Dockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>