Make neng produce Dockerimage 53/68453/1
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 21 Sep 2018 15:08:46 +0000 (11:08 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 21 Sep 2018 15:10:52 +0000 (11:10 -0400)
Change-Id: Iea7694a0f39d2614ec880d6c6fafe305baa2bea7
Issue-ID: CCSDK-593
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
ms/neng/pom.xml

index 8f6c7b1..81c1e66 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- 
+<!--
  * ============LICENSE_START=======================================================
  * ONAP : CCSDK.apps
  * ================================================================================
@@ -8,9 +8,9 @@
  * 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.
@@ -19,7 +19,7 @@
  * ============LICENSE_END=========================================================
   -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.onap.ccsdk.apps</groupId>
         <ccsdk.distribution.version>0.2.4</ccsdk.distribution.version>
         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
         <docker.push.phase>deploy</docker.push.phase>
-        <docker.build.phase>deploy</docker.build.phase>
         <docker.verbose>true</docker.verbose>
         <ccsdk.project.version>${project.version}</ccsdk.project.version>
         <image.name>onap/ccsdk-apps-ms-neng</image.name>
-
     </properties>
 
     <profiles>
                                 <goals>
                                     <goal>copy-resources</goal>
                                 </goals>
-                                <phase>${docker.build.phase}</phase>
+                                <phase>validate</phase>
                                 <configuration>
                                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
                                     <resources>
                                 <goals>
                                     <goal>copy-resources</goal>
                                 </goals>
-                                <phase>${docker.build.phase}</phase>
+                                <phase>validate</phase>
                                 <configuration>
                                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
                                     <resources>
                                 <goals>
                                     <goal>copy-resources</goal>
                                 </goals>
-                                <phase>${docker.build.phase}</phase>
+                                <phase>validate</phase>
                                 <configuration>
                                     <outputDirectory>${basedir}/target/docker-stage/opt/etc/config</outputDirectory>
                                     <resources>
                             </execution>
                         </executions>
                     </plugin>
-    
-    
+
+
                     <plugin>
                         <groupId>io.fabric8</groupId>
                         <artifactId>docker-maven-plugin</artifactId>
                             <verbose>true</verbose>
                         </configuration>
                         <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
                             <execution>
                                 <id>push-images</id>
-                                <phase>${docker.build.phase}</phase>
+                                <phase>${docker.push.phase}</phase>
                                 <goals>
                                     <goal>build</goal>
                                     <goal>push</goal>
             <id>${userId}</id>
         </developer>
     </developers>
-   
+
+
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
         <version>1.1.0-SNAPSHOT</version>
-        <relativePath />
+        <relativePath/>
     </parent>
 
     <dependencyManagement>
                             <source>
                                 println project.properties['ccsdk.project.version'];
                                 def versionArray;
-                                if (project.properties['ccsdk.project.version'] != null ) {
+                                if (project.properties['ccsdk.project.version'] != null) {
                                     versionArray = project.properties['ccsdk.project.version'].split('\\.');
                                 }
 
-                                if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
-                                {
-                                    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+                                if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT")) {
+                                    project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
                                 } else {
-                                    project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
+                                    project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
                                 }
 
                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
                 <artifactId>exec-maven-plugin</artifactId>
                 <groupId>org.codehaus.mojo</groupId>
             </plugin>
+
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugins>
         </pluginManagement>
     </build>
-    
-</project>
-
+</project>
\ No newline at end of file