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