Chore: Add gerrit maven verify GHA workflow
[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.7.0-SNAPSHOT</version>
9     </parent>
10
11     <artifactId>installation-ansible-server</artifactId>
12     <packaging>pom</packaging>
13
14     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
15     <description>Creates ansible-server Docker container</description>
16     <organization>
17         <name>ONAP</name>
18     </organization>
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>${ccsdk.docker.ansible.server.version}</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     <build>
30         <plugins>
31             <plugin>
32                 <groupId>org.codehaus.gmaven</groupId>
33                 <artifactId>groovy-maven-plugin</artifactId>
34                 <version>2.1.1</version>
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>true</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.34.0</version>
85                         <inherited>false</inherited>
86                         <configuration>
87                             <images>
88                                 <image>
89                                     <name>${image.name}</name>
90                                     <build>
91                                         <cleanup>try</cleanup>
92                                         <noCache>true</noCache>
93                                         <contextDir>${basedir}/target/docker-stage</contextDir>
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                             <verbose>${docker.verbose}</verbose>
104                             <skipPush>${docker.skip.push}</skipPush>
105                         </configuration>
106                         <executions>
107                             <execution>
108                                 <id>build-push-images</id>
109                                 <goals>
110                                     <goal>build</goal>
111                                     <goal>push</goal>
112                                 </goals>
113                             </execution>
114                         </executions>
115                     </plugin>
116                 </plugins>
117             </build>
118         </profile>
119     </profiles>
120 </project>