Add dockers tag with timestamp and latest 17/78417/2
authorIttay Stern <ittay.stern@att.com>
Wed, 13 Feb 2019 17:15:21 +0000 (19:15 +0200)
committerIttay Stern <ittay.stern@att.com>
Wed, 13 Feb 2019 17:24:40 +0000 (19:24 +0200)
Change-Id: I22d1b3bd50c780ae1aff8eb49078a9f098cb55c7
Issue-ID: VID-421
Signed-off-by: Ittay Stern <ittay.stern@att.com>
deliveries/pom.xml

index 1b89e1e..13db1c7 100755 (executable)
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-        <groupId>org.onap.vid</groupId>\r
-        <artifactId>vid-parent</artifactId>\r
-        <version>4.0.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <packaging>pom</packaging>\r
-    <artifactId>vid-deliveries</artifactId>\r
-\r
-    <name>VID Deliveries</name>\r
-    <description>ONAP VID Deliveries</description>\r
-    <properties>\r
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\r
-        <docker.push.registry>${docker_registry}</docker.push.registry>\r
-        <docker.verbose>true</docker.verbose>\r
-    </properties>\r
-\r
-    <profiles>\r
-\r
-        <profile>\r
-            <id>docker-proxy</id>\r
-            <!-- activate profile if environment variable `http_proxy` is set -->\r
-            <activation>\r
-                <property>\r
-                    <name>env.http_proxy</name>\r
-                </property>\r
-            </activation>\r
-            <properties>\r
-                <docker.buildArg.http_proxy>${env.http_proxy}</docker.buildArg.http_proxy>\r
-            </properties>\r
-        </profile>\r
-\r
-    </profiles>\r
-\r
-    <build>\r
-        <finalName>${project.artifactId}-${project.version}</finalName>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>io.fabric8</groupId>\r
-                <artifactId>docker-maven-plugin</artifactId>\r
-                <version>0.28.0</version>\r
-\r
-                <configuration>\r
-                    <verbose>true</verbose>\r
-                    <apiVersion>1.23</apiVersion>\r
-                    <images>\r
-                        <image>\r
-                            <name>onap/vid:${project.version}</name>\r
-                            <build>\r
-                                <cleanup>remove</cleanup>\r
-                                <dockerFileDir>docker-files</dockerFileDir>\r
-                                <assembly>\r
-                                    <basedir>/</basedir>\r
-                                    <user>vidadmin:vidadmin:vidadmin</user>\r
-                                    <descriptor>assembly/assembly-for-plugin.xml</descriptor>\r
-                                </assembly>\r
-                                <tags>\r
-                                    <tag>4.0-STAGING-latest</tag>\r
-                                    <tag>latest</tag>\r
-                                </tags>\r
-\r
-                            </build>\r
-                        </image>\r
-                    </images>\r
-                </configuration>\r
-\r
-                <executions>\r
-                    <execution>\r
-                        <id>generate-image</id>\r
-                        <phase>package</phase>\r
-                        <goals>\r
-                            <goal>build</goal>\r
-                        </goals>\r
-                    </execution>\r
-\r
-                    <execution>\r
-                        <id>push-image</id>\r
-                        <phase>deploy</phase>\r
-                        <goals>\r
-                            <goal>build</goal>\r
-                            <goal>push</goal>\r
-                        </goals>\r
-                    </execution>\r
-                </executions>\r
-\r
-            </plugin>\r
-\r
-            <plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-deploy-plugin</artifactId>\r
-                <version>2.8</version>\r
-                <configuration>\r
-                    <skip>true</skip>\r
-                </configuration>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-\r
-</project>\r
+<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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onap.vid</groupId>
+        <artifactId>vid-parent</artifactId>
+        <version>4.0.0-SNAPSHOT</version>
+    </parent>
+
+    <packaging>pom</packaging>
+    <artifactId>vid-deliveries</artifactId>
+
+    <name>VID Deliveries</name>
+    <description>ONAP VID Deliveries</description>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <docker.push.registry>${docker_registry}</docker.push.registry>
+        <docker.verbose>true</docker.verbose>
+        <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
+        <docker.latest.tag>${project.version}-latest</docker.latest.tag>
+
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+    </properties>
+
+    <profiles>
+
+        <profile>
+            <id>docker-proxy</id>
+            <!-- activate profile if environment variable `http_proxy` is set -->
+            <activation>
+                <property>
+                    <name>env.http_proxy</name>
+                </property>
+            </activation>
+            <properties>
+                <docker.buildArg.http_proxy>${env.http_proxy}</docker.buildArg.http_proxy>
+            </properties>
+        </profile>
+
+    </profiles>
+
+    <build>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>0.28.0</version>
+
+                <configuration>
+                    <verbose>true</verbose>
+                    <apiVersion>1.23</apiVersion>
+                    <images>
+                        <image>
+                            <name>onap/vid:${project.version}</name>
+                            <build>
+                                <cleanup>remove</cleanup>
+                                <dockerFileDir>docker-files</dockerFileDir>
+                                <assembly>
+                                    <basedir>/</basedir>
+                                    <user>vidadmin:vidadmin:vidadmin</user>
+                                    <descriptor>assembly/assembly-for-plugin.xml</descriptor>
+                                </assembly>
+                                <tags>
+                                    <tag>4.0-STAGING-latest</tag>
+                                    <tag>latest</tag>
+                                    <tag>${docker.tag}</tag>
+                                    <tag>${docker.latest.tag}</tag>
+                                </tags>
+
+                            </build>
+                        </image>
+                    </images>
+                </configuration>
+
+                <executions>
+                    <execution>
+                        <id>generate-image</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>push-image</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>build</goal>
+                            <goal>push</goal>
+                        </goals>
+                    </execution>
+                </executions>
+
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>2.8</version>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>