Update El Alto version
[msb/apigateway.git] / distributions / msb-apigateway / pom.xml
index 848a5fc..844252e 100644 (file)
@@ -3,18 +3,22 @@
   <parent>
     <groupId>org.onap.msb.apigateway.distributions</groupId>
     <artifactId>distributions-parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.5</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.onap.msb.apigateway.distributions</groupId>
   <artifactId>msb-apigateway</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.5</version>
   <name>onap/msb/apigateway/distributions/msb-apigateway</name>
   <packaging>pom</packaging>
 
   <properties>
     <packageid>msb-apigateway</packageid>
-    <version.output>target/version</version.output>
+    <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+    <version.output>${project.basedir}/target/version</version.output>
+    <docker.image.name>onap/msb/msb_apigateway</docker.image.name>
+    <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
+    <docker.latest.tag>${project.version}-latest</docker.latest.tag>
   </properties>
 
   <profiles>
@@ -27,7 +31,7 @@
         <dependency>
             <groupId>org.onap.msb.apigateway.apiroute</groupId>
             <artifactId>apiroute-standalone</artifactId>
-            <type>zip</type>   
+            <type>zip</type>
             <version>${project.version}</version>
             <optional>true</optional>
         </dependency>
@@ -36,7 +40,7 @@
         <dependency>
             <groupId>org.onap.msb.apigateway</groupId>
             <artifactId>redis-ext</artifactId>
-            <type>tar.gz</type>      
+            <type>tar.gz</type>
             <classifier>${classifier.linux64}</classifier>
             <version>${project.version}</version>
             <optional>true</optional>
@@ -45,7 +49,7 @@
         <dependency>
           <groupId>org.onap.msb.apigateway</groupId>
           <artifactId>openresty-ext</artifactId>
-          <type>tar.gz</type>      
+          <type>tar.gz</type>
           <classifier>${classifier.linux64}</classifier>
           <version>${project.version}</version>
           <optional>true</optional>
                       <artifactItem>
                         <groupId>org.onap.msb.apigateway.apiroute</groupId>
                         <artifactId>apiroute-standalone</artifactId>
-                        <type>zip</type>   
-                      </artifactItem>               
+                        <type>zip</type>
+                      </artifactItem>
                       <artifactItem>
                         <groupId>org.onap.msb.apigateway</groupId>
                         <artifactId>redis-ext</artifactId>
-                        <type>tar.gz</type>      
-                        <classifier>${classifier.linux64}</classifier>           
-                      </artifactItem>  
+                        <type>tar.gz</type>
+                        <classifier>${classifier.linux64}</classifier>
+                      </artifactItem>
                       <artifactItem>
                         <groupId>org.onap.msb.apigateway</groupId>
                         <artifactId>openresty-ext</artifactId>
-                        <type>tar.gz</type>      
-                        <classifier>${classifier.linux64}</classifier>          
-                      </artifactItem>                      
+                        <type>tar.gz</type>
+                        <classifier>${classifier.linux64}</classifier>
+                      </artifactItem>
                   </artifactItems>
                   <excludes>**/*.bat,**/*.cmd,**/*.exe</excludes>
                   <outputDirectory>${linux64outputdir}</outputDirectory>
@@ -90,7 +94,7 @@
                   <overWriteSnapshots>true</overWriteSnapshots>
                   <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
                 </configuration>
-            </execution>      
+            </execution>
           </executions>
         </plugin>
 
           <artifactId>maven-resources-plugin</artifactId>
           <executions>
             <execution>
-              <id>copy-msb-resources-linux</id>                 
+              <id>copy-msb-resources-linux</id>
               <phase>prepare-package</phase>
               <goals>
                 <goal>copy-resources</goal>
               <configuration>
                 <outputDirectory>${linux64outputdir}</outputDirectory>
                 <includeEmptyDirs>true</includeEmptyDirs>
-                <resources>     
+                <resources>
                   <resource>
                     <directory>src/assembly/resources/</directory>
                     <filtering>false</filtering>
                     <excludes>
                       <exclude>**/*.bat</exclude>
                     </excludes>
-                  </resource>  
+                  </resource>
                 </resources>
                 <overwrite>true</overwrite>
               </configuration>
             </execution>
             <execution>
-              <id>copy-resources-dockerfile</id>                 
+              <id>copy-resources-dockerfile</id>
               <phase>process-resources</phase>
               <goals>
                 <goal>copy-resources</goal>
               </goals>
-              <configuration>            
+              <configuration>
                 <outputDirectory>${version.output}</outputDirectory>
                 <includeEmptyDirs>true</includeEmptyDirs>
-                <resources>     
+                <resources>
                   <resource>
                     <directory>${dockerFileDir}</directory>
                     <filtering>false</filtering>
                     <includes>
                       <include>**/*</include>
                     </includes>
-                  </resource>  
+                  </resource>
                 </resources>
                 <overwrite>true</overwrite>
               </configuration>
-            </execution>     
+            </execution>
           </executions>
-        </plugin>  
+        </plugin>
 
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
               </configuration>
             </execution>
           </executions>
-        </plugin> 
-
-
-      </plugins>
+        </plugin>
+        </plugins>
       </build>
     </profile>
-
-  </profiles>    
+    <profile>
+      <id>docker</id>
+      <build>
+          <plugins>
+               <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.19.1</version>
+                        <dependencies>
+                            <dependency>
+                                <groupId>com.github.jnr</groupId>
+                                <artifactId>jnr-unixsocket</artifactId>
+                                <version>0.13</version>
+                            </dependency>
+                        </dependencies>
+                        <configuration>
+                            <verbose>true</verbose>
+                            <apiVersion>1.23</apiVersion>
+                            <registry>nexus3.onap.org:10003</registry>
+                            <images>
+                                <image>
+                                    <name>${docker.image.name}</name>
+                                    <alias>docker_msb_apigateway</alias>
+                                    <build>
+                                        <cleanup>true</cleanup>
+                                        <tags>
+                                            <tag>${docker.tag}</tag>
+                                            <tag>${docker.latest.tag}</tag>
+                                        </tags>
+                                        <dockerFileDir>${version.output}</dockerFileDir>
+                                        <!--assembly>
+                                            <descriptorRef>artifact</descriptorRef>
+                                        </assembly-->
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>clean-images</id>
+                                <phase>pre-clean</phase>
+                                <goals>
+                                    <goal>remove</goal>
+                                </goals>
+                                <configuration>
+                                    <removeAll>true</removeAll>
+                                    <image>docker_msb_apigateway</image>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>push-images</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>push</goal>
+                                </goals>
+                                <configuration>
+                                    <image>${docker.image.name}</image>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>  
+          </plugins>
+      </build>
+    </profile>
+  </profiles>
 
 </project>
-