Docker image generated and pushed.
Issue-ID: SMO-147
Change-Id: Ie6cc0cfe34bb966cebb9b9b310888880b4d9f5bc
Signed-off-by: aravind.est <aravindhan.a@est.tech>
topology-exposure-inventory:
container_name: topology-exposure-inventory
- image: topology-exposure-inventory:latest
+ image: o-ran-sc/smo-teiv-exposure:latest
ports:
- 31074:8080
depends_on:
topology-ingestion-inventory:
container_name: topology-ingestion-inventory
- image: topology-exposure-inventory:latest
- environment:
- - SPRING_PROFILES_ACTIVE=ingestion
+ image: o-ran-sc/smo-teiv-ingestion:latest
depends_on:
- dbpostgresql
deploy:
<version.sonar-maven-plugin>3.9.1.2184</version.sonar-maven-plugin>
<version.antrun-maven-plugin>3.1.0</version.antrun-maven-plugin>
<version.antlr>4.13.0</version.antlr>
+ <docker-maven-plugin>0.43.4</docker-maven-plugin>
<!-- JaCoCo plugin for Java Code Coverage -->
<version.jacoco-maven.plugin>0.8.8</version.jacoco-maven.plugin>
<!-- Minimum ratio or percentage of instructions to be covered, used by
ARG USER_NAME="topology-exposure-inventory"
RUN echo "$USER_ID:x:$USER_ID:0:An Identity for $USER_NAME:/nonexistent:/bin/false" >>/etc/passwd
-# TODO version in the jar file should be moved out
-ARG JAR_FILE="target/topology-exposure-inventory-jar-0.0.1-SNAPSHOT.jar"
-ADD $JAR_FILE topology-exposure-inventory-app.jar
+ARG JAR
+WORKDIR /opt/app/teiv
-RUN find / -perm /u=s,g=s -type f -exec chmod a-s {} \; || true
+ADD src/main/resources/application.yaml /opt/app/teiv/config/application.yaml
+ADD target/${JAR} /opt/app/teiv/topology-exposure-inventory-app.jar
USER $USER_ID
ARG BUILD_DATE
ARG APP_VERSION
LABEL \
- org.opencontainers.image.title=topology-exposure-inventory-jsb \
+ org.opencontainers.image.title=topology-exposure-jsb \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.revision=$COMMIT \
org.opencontainers.image.vendor=ORAN \
--- /dev/null
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024 Ericsson
+# Modifications Copyright (C) 2024 OpenInfra Foundation Europe
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+
+FROM debian:bullseye-slim
+
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends \
+ openjdk-17-jdk-headless && \
+ rm -rf /var/lib/apt/lists/*
+
+ARG USER_ID=40514
+RUN echo "$USER_ID:!::0:::::" >>/etc/shadow
+
+ARG USER_NAME="topology-exposure-inventory"
+RUN echo "$USER_ID:x:$USER_ID:0:An Identity for $USER_NAME:/nonexistent:/bin/false" >>/etc/passwd
+
+ARG JAR
+WORKDIR /opt/app/teiv
+
+ENV SPRING_PROFILES_ACTIVE=ingestion
+
+ADD src/main/resources/application.yaml /opt/app/teiv/config/application.yaml
+ADD target/${JAR} /opt/app/teiv/topology-exposure-inventory-app.jar
+
+USER $USER_ID
+
+CMD ["/bin/sh", "-c", "java ${JAVA_OPTS} -jar topology-exposure-inventory-app.jar"]
+
+ARG COMMIT
+ARG BUILD_DATE
+ARG APP_VERSION
+LABEL \
+ org.opencontainers.image.title=topology-ingestion-jsb \
+ org.opencontainers.image.created=$BUILD_DATE \
+ org.opencontainers.image.revision=$COMMIT \
+ org.opencontainers.image.vendor=ORAN \
+ org.opencontainers.image.version=$APP_VERSION
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin}</version>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>build-push-smo-teiv-exposure-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/smo-teiv-exposure:${project.version}
+ </name>
+ <build>
+ <contextDir>${project.basedir}</contextDir>
+ <dockerFile>exposure.Dockerfile</dockerFile>
+ <args>
+ <JAR>${project.build.finalName}.jar</JAR>
+ </args>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ </execution>
+ <execution>
+ <id>build-push-smo-teiv-ingestion-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/smo-teiv-ingestion:${project.version}
+ </name>
+ <build>
+ <contextDir>${project.basedir}</contextDir>
+ <dockerFile>ingestion.Dockerfile</dockerFile>
+ <args>
+ <JAR>${project.build.finalName}.jar</JAR>
+ </args>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>