Revert "Backport Dublin ansible server"
[ccsdk/distribution.git] / 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"
3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
5     <parent>
6         <groupId>org.onap.ccsdk.parent</groupId>
7         <artifactId>odlparent-lite</artifactId>
8         <version>1.1.3</version>
9     </parent>
10     <modelVersion>4.0.0</modelVersion>
11     <packaging>pom</packaging>
12     <groupId>org.onap.ccsdk.distribution</groupId>
13     <artifactId>ansible-server</artifactId>
14     <version>0.3.4-SNAPSHOT</version>
15
16     <name>ccsdk :: distribution :: ${project.artifactId}</name>
17     <description>Creates ansible-server Docker container</description>
18
19     <properties>
20         <image.name>onap/ccsdk-ansible-server-image</image.name>
21         <ccsdk.project.version>${project.version}</ccsdk.project.version>
22                 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
23         <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
24         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
25     </properties>
26
27
28     <build>
29         <plugins>
30             <plugin>
31                 <groupId>org.codehaus.groovy.maven</groupId>
32                 <artifactId>gmaven-plugin</artifactId>
33                 <executions>
34                     <execution>
35                         <phase>validate</phase>
36                         <goals>
37                             <goal>execute</goal>
38                         </goals>
39                         <configuration>
40                                                         <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
41                         </configuration>
42                     </execution>
43                 </executions>
44             </plugin>
45
46             <plugin>
47                 <artifactId>maven-resources-plugin</artifactId>
48                 <version>2.6</version>
49                 <executions>
50                     <execution>
51                         <id>copy-dockerfile</id>
52                         <goals>
53                             <goal>copy-resources</goal>
54                         </goals><!-- here the phase you need -->
55                         <phase>validate</phase>
56                         <configuration>
57                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
58                             <resources>
59                                 <resource>
60                                     <directory>src/main/docker</directory>
61                                     <includes>
62                                         <include>Dockerfile</include>
63                                     </includes>
64                                     <filtering>true</filtering>
65                                 </resource>
66                             </resources>
67                         </configuration>
68                     </execution>
69                     <execution>
70                         <id>copy-requirements</id>
71                         <goals>
72                             <goal>copy-resources</goal>
73                         </goals><!-- here the phase you need -->
74                         <phase>validate</phase>
75                         <configuration>
76                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
77                             <resources>
78                                 <resource>
79                                     <directory>src/main/resources</directory>
80                                     <includes>
81                                         <include>requirements.txt</include>
82                                     </includes>
83                                     <filtering>false</filtering>
84                                 </resource>
85                             </resources>
86                         </configuration>
87                     </execution>
88                     <execution>
89                         <id>copy-scripts</id>
90                         <goals>
91                             <goal>copy-resources</goal>
92                         </goals><!-- here the phase you need -->
93                         <phase>validate</phase>
94                         <configuration>
95                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
96                             <resources>
97                                 <resource>
98                                     <directory>src/main/scripts</directory>
99                                     <includes>
100                                         <include>*</include>
101                                     </includes>
102                                     <filtering>false</filtering>
103                                 </resource>
104                             </resources>
105                         </configuration>
106                     </execution>
107
108                     <execution>
109                         <id>copy-yml</id>
110                         <goals>
111                             <goal>copy-resources</goal>
112                         </goals><!-- here the phase you need -->
113                         <phase>validate</phase>
114                         <configuration>
115                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/Playbooks</outputDirectory>
116                             <resources>
117                                 <resource>
118                                     <directory>src/main/yml</directory>
119                                     <includes>
120                                         <include>*</include>
121                                     </includes>
122                                     <filtering>false</filtering>
123                                 </resource>
124                             </resources>
125                         </configuration>
126                     </execution>
127                 </executions>
128             </plugin>
129
130             <plugin>
131                 <artifactId>exec-maven-plugin</artifactId>
132                 <groupId>org.codehaus.mojo</groupId>
133                 <version>1.5.0</version>
134                 <executions>
135                     <execution>
136                         <id>change python permissions</id>
137                         <phase>process-sources</phase>
138                         <goals>
139                             <goal>exec</goal>
140                         </goals>
141                         <configuration>
142                             <executable>/usr/bin/find</executable>
143                             <arguments>
144                                 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
145                                 <argument>-name</argument>
146                                 <argument>*.py</argument>
147                                 <argument>-exec</argument>
148                                 <argument>chmod</argument>
149                                 <argument>+x</argument>
150                                 <argument>{}</argument>
151                                 <argument>;</argument>
152                             </arguments>
153                         </configuration>
154                     </execution>
155                         <execution>
156                                                 <id>change shell permissions</id>
157                                                 <phase>process-sources</phase>
158                                                 <goals>
159                                                         <goal>exec</goal>
160                                                 </goals>
161                                                 <configuration>
162                                                         <executable>/usr/bin/find</executable>
163                                                         <arguments>
164                                                                 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
165                                                                 <argument>-name</argument>
166                                                                 <argument>*.sh</argument>
167                                                                 <argument>-exec</argument>
168                                                                 <argument>chmod</argument>
169                                                                 <argument>+x</argument>
170                                                                 <argument>{}</argument>
171                                                                 <argument>;</argument>
172                                                         </arguments>
173                                                 </configuration>
174                                         </execution>
175                 </executions>
176             </plugin>
177         </plugins>
178     </build>
179
180     <profiles>
181         <profile>
182             <id>docker</id>
183             <build>
184                 <plugins>
185                     <plugin>
186                         <groupId>io.fabric8</groupId>
187                         <artifactId>docker-maven-plugin</artifactId>
188                         <version>0.16.5</version>
189                         <inherited>false</inherited>
190                         <configuration>
191                             <images>
192                                 <image>
193                                     <name>${image.name}</name>
194                                     <build>
195                                         <cleanup>try</cleanup>
196                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
197                                         <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
198                                         <tags>
199                                                                                         <tag>${project.docker.latestminortag.version}</tag>
200                                                                                         <tag>${project.docker.latestfulltag.version}</tag>
201                                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
202                                         </tags>
203                                     </build>
204                                 </image>
205                             </images>
206                         </configuration>
207                         <executions>
208                             <execution>
209                                 <id>generate-images</id>
210                                 <phase>package</phase>
211                                 <goals>
212                                     <goal>build</goal>
213                                 </goals>
214                             </execution>
215
216                             <execution>
217                                 <id>push-images</id>
218                                 <phase>deploy</phase>
219                                 <goals>
220                                     <goal>build</goal>
221                                     <goal>push</goal>
222                                 </goals>
223                             </execution>
224                         </executions>
225                     </plugin>
226                 </plugins>
227             </build>
228         </profile>
229     </profiles>
230     <organization>
231         <name>ONAP</name>
232     </organization>
233 </project>