Update base docker image to use java 11 33/118333/3
authorHarish Venkata Kajur <vk250x@att.com>
Wed, 24 Feb 2021 03:55:16 +0000 (22:55 -0500)
committerHarish Venkata Kajur <vk250x@att.com>
Wed, 24 Feb 2021 04:35:22 +0000 (23:35 -0500)
Also update maven plugin to target java 11

Issue-ID: AAI-3272
Change-Id: Iac09b0d91022cf7fdfc932e67753e164ee6463cf
Signed-off-by: Harish Venkata Kajur <vk250x@att.com>
pom.xml
sparkybe-onap-application/pom.xml
sparkybe-onap-application/src/main/docker/Dockerfile
sparkybe-onap-service/pom.xml
version.properties

diff --git a/pom.xml b/pom.xml
index 09805bc..1288934 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
     
     <groupId>org.onap.aai</groupId>
     <artifactId>sparky-be</artifactId>
-    <version>2.0.2-SNAPSHOT</version>
+    <version>2.0.3-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>aai-sparky-be</name>
 
 
        <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
 
+        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+        <maven-compiler-plugin.source>11</maven-compiler-plugin.source>
+        <maven-compiler-plugin.target>11</maven-compiler-plugin.target>
+        <maven-compiler-plugin.test.source>11</maven-compiler-plugin.test.source>
+        <maven-compiler-plugin.test.target>11</maven-compiler-plugin.test.target>
     </properties>
 
        <dependencyManagement>
        <build>
          <pluginManagement>
            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>${maven-compiler-plugin.version}</version>
+                    <inherited>true</inherited>
+                    <configuration>
+                        <source>${maven-compiler-plugin.source}</source>
+                        <target>${maven-compiler-plugin.target}</target>
+                        <testSource>${maven-compiler-plugin.test.source}</testSource>
+                        <testTarget>${maven-compiler-plugin.test.target}</testTarget>
+                    </configuration>
+                </plugin>
                <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-deploy-plugin</artifactId>
index 0642cca..e216301 100644 (file)
@@ -5,12 +5,12 @@
        <parent>
          <groupId>org.onap.aai</groupId>
          <artifactId>sparky-be</artifactId>
-         <version>2.0.2-SNAPSHOT</version>
+         <version>2.0.3-SNAPSHOT</version>
        </parent>
 
        <groupId>org.onap.aai.sparky-be</groupId>
        <artifactId>sparkybe-onap-application</artifactId>
-       <version>2.0.2-SNAPSHOT</version>
+       <version>2.0.3-SNAPSHOT</version>
        <packaging>jar</packaging>
 
     <properties>
@@ -36,7 +36,7 @@
         </aai.build.directory>
         <aai.docker.namespace>onap</aai.docker.namespace>
         <aai.base.image>alpine</aai.base.image>
-        <aai.base.image.version>1.6.0</aai.base.image.version>
+        <aai.base.image.version>1.8.1</aai.base.image.version>
         <!-- This will be used for the docker images as the default format of maven build has issues -->
         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
     </properties>
index 035abd2..6f95de0 100644 (file)
@@ -4,41 +4,21 @@ ARG MICRO_HOME=/opt/app/sparky
 ARG BIN_HOME=$MICRO_HOME/bin
 ARG UI_LOGS=/var/log/onap/AAI-UI
 
-# Build up the deployment folder structure
-RUN mkdir -p $MICRO_HOME $MICRO_HOME/logs $UI_LOGS
-
-# Changes related to:AAI-2180
-# Additional optional steps for Ubuntu
-RUN if  ((uname -v | grep -i "ubuntu") || ( cat /etc/*release|grep -i "ubuntu")      ) ; then \
-   #####################################
-   #if JAVA doesnt exist then install it: 
-   ######################################
-   if type  java  2>/dev/null; then \  
-     echo "skipping java installation"; \      
-   else \
-     apt-get update && apt-get install -y software-properties-common; \
-     ## sudo -E is required to preserve the environment. If you remove that line, it will most like freeze at this step
-     sudo -E add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk ; \
-     ## Setup JAVA_HOME, this is useful for docker commandline
-     JAVA_HOME=usr/lib/jvm/java-8-openjdk-amd64; \
-     export JAVA_HOME ; \
-   fi; \
-fi
-
-RUN groupadd aaiadmin -g 1000
-RUN adduser -u 1000 -h /opt/aaihome/aaiadmin -S -D -G aaiadmin -s /bin/bash aaiadmin
+USER root
 
 WORKDIR $MICRO_HOME
-RUN chown -R aaiadmin:aaiadmin $MICRO_HOME $MICRO_HOME/logs $UI_LOGS
 
 COPY --chown=aaiadmin:aaiadmin /maven/sparkybe-onap-application/ .
 
-USER aaiadmin
+# Build up the deployment folder structure
+RUN mkdir -p $MICRO_HOME $MICRO_HOME/logs $UI_LOGS && \
+    chown -R aaiadmin:aaiadmin $MICRO_HOME/logs $UI_LOGS && \
+    chmod 755 $BIN_HOME/* && \
+    ln -snf /logs $MICRO_HOME/logs
 
-RUN chmod 755 $BIN_HOME/* \
-    && ln -snf /logs $MICRO_HOME/logs
+USER aaiadmin
 
 EXPOSE 8000 8000
 EXPOSE 9517 9517
-    
+
 CMD ["/opt/app/sparky/bin/start.sh"]
index 421bd16..97f10cb 100644 (file)
@@ -4,12 +4,12 @@
        <parent>
          <groupId>org.onap.aai</groupId>
          <artifactId>sparky-be</artifactId>
-         <version>2.0.2-SNAPSHOT</version>
+         <version>2.0.3-SNAPSHOT</version>
        </parent>
 
        <groupId>org.onap.aai.sparky-be</groupId>
        <artifactId>sparkybe-onap-service</artifactId>
-       <version>2.0.2-SNAPSHOT</version>
+       <version>2.0.3-SNAPSHOT</version>
        <packaging>jar</packaging>
 
        <properties>
index bb52871..9bb11f5 100644 (file)
@@ -4,7 +4,7 @@
 
 major=2
 minor=0
-patch=2
+patch=3
 
 base_version=${major}.${minor}.${patch}