Fix Docker image 84/79684/1
authorRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 5 Mar 2019 09:05:32 +0000 (09:05 +0000)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 5 Mar 2019 09:05:32 +0000 (09:05 +0000)
Change-Id: Icf8a37ea63e78d70256571d1bce424e629a04b55
Issue-ID: DCAEGEN2-1269
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
datafile-app-server/pom.xml
datafile-app-server/src/main/resources/Dockerfile

index 3ceccdb..d74889d 100644 (file)
         <version>${dockerfile.maven.version}</version>
         <configuration>
           <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
-          <tag>${project.version}</tag>
           <dockerfile>${project.build.outputDirectory}/Dockerfile</dockerfile>
-          <buildArgs>
-            <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
-          </buildArgs>
+          <imageTags>
+            <tag>latest</tag>
+          </imageTags>
         </configuration>
         <executions>
           <execution>
             <phase>deploy</phase>
             <goals>
               <goal>tag</goal>
+              <goal>push</goal>
             </goals>
             <configuration>
-              <image>${docker.image.name}:latest</image>
-              <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
-              <pushImage>true</pushImage>
+              <image>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</image>
             </configuration>
           </execution>
           <execution>
             <phase>deploy</phase>
             <goals>
               <goal>tag</goal>
+              <goal>push</goal>
             </goals>
             <configuration>
-              <image>${docker.image.name}:latest</image>
+              <image>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</image>
               <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
-              <pushImage>true</pushImage>
             </configuration>
           </execution>
           <execution>
             <phase>deploy</phase>
             <goals>
               <goal>tag</goal>
+              <goal>push</goal>
             </goals>
             <configuration>
-              <image>${docker.image.name}:latest</image>
+              <image>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</image>
               <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
-              <pushImage>true</pushImage>
             </configuration>
           </execution>
         </executions>
index 1869d36..6ab30cc 100644 (file)
@@ -22,8 +22,7 @@ FROM openjdk:8-jre-alpine
 WORKDIR /opt/app/datafile
 RUN mkdir -p /var/log/ONAP
 
-ARG JAR_FILE
-ADD /target/${JAR_FILE} /opt/app/datafile/datafile-app-server.jar
+ADD /target/datafile-app-server.jar /opt/app/datafile/
 
 ADD /config/application.yaml /opt/app/datafile/config/
 ADD /config/cacerts /opt/app/datafile/config/