Fix docker tags
[sdnc/oam.git] / installation / ansible-server / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5
6     <parent>
7         <groupId>org.onap.ccsdk.parent</groupId>
8         <artifactId>odlparent-lite</artifactId>
9         <version>1.2.1-SNAPSHOT</version>
10     </parent>
11     <modelVersion>4.0.0</modelVersion>
12     <packaging>pom</packaging>
13     <groupId>org.onap.sdnc.oam</groupId>
14     <artifactId>installation-ansible-server</artifactId>
15     <version>1.5.0-SNAPSHOT</version>
16
17     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
18     <description>Creates ansible-server Docker container</description>
19
20     <properties>
21         <image.name>onap/sdnc-ansible-server-image</image.name>
22         <sdnc.project.version>${project.version}</sdnc.project.version>
23         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
24         <ccsdk.docker.version>0.4-STAGING-latest</ccsdk.docker.version>
25         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
26         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
27     </properties>
28
29
30     <build>
31         <plugins>
32             <plugin>
33                 <groupId>org.codehaus.groovy.maven</groupId>
34                 <artifactId>gmaven-plugin</artifactId>
35                 <executions>
36                     <execution>
37                         <phase>validate</phase>
38                         <goals>
39                             <goal>execute</goal>
40                         </goals>
41                         <configuration>
42                             <source>${basedir}/../TagVersion.groovy</source>
43                         </configuration>
44                     </execution>
45                 </executions>
46             </plugin>
47
48             <plugin>
49                 <artifactId>maven-resources-plugin</artifactId>
50                 <version>2.6</version>
51                 <executions>
52                     <execution>
53                         <id>copy-files</id>
54                         <goals>
55                             <goal>copy-resources</goal>
56                         </goals><!-- here the phase you need -->
57                         <phase>validate</phase>
58                         <configuration>
59                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
60                             <resources>
61                                 <resource>
62                                     <directory>src/main</directory>
63                                     <includes>
64                                         <include>**/*</include>
65                                     </includes>
66                                     <filtering>false</filtering>
67                                 </resource>
68                             </resources>
69                         </configuration>
70                     </execution>
71                 </executions>
72             </plugin>
73         </plugins>
74     </build>
75
76     <profiles>
77         <profile>
78             <id>docker</id>
79             <build>
80                 <plugins>
81                     <plugin>
82                         <groupId>io.fabric8</groupId>
83                         <artifactId>docker-maven-plugin</artifactId>
84                         <version>0.16.5</version>
85                         <inherited>false</inherited>
86                         <configuration>
87                             <images>
88                                 <image>
89                                     <name>${image.name}</name>
90                                     <build>
91                                         <cleanup>try</cleanup>
92                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
93                                         <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
94                                         <tags>
95                                             <tag>${project.docker.latestminortag.version}</tag>
96                                             <tag>${project.docker.latestfulltag.version}</tag>
97                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
98                                         </tags>
99                                     </build>
100                                 </image>
101                             </images>
102                         </configuration>
103                         <executions>
104                             <execution>
105                                 <id>generate-images</id>
106                                 <phase>package</phase>
107                                 <goals>
108                                     <goal>build</goal>
109                                 </goals>
110                             </execution>
111
112                             <execution>
113                                 <id>push-images</id>
114                                 <phase>deploy</phase>
115                                 <goals>
116                                     <goal>build</goal>
117                                     <goal>push</goal>
118                                 </goals>
119                             </execution>
120                         </executions>
121                     </plugin>
122                 </plugins>
123             </build>
124         </profile>
125     </profiles>
126     <organization>
127         <name>ONAP</name>
128     </organization>
129 </project>