Merge "Updates for ODL Neon"
[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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
4         <parent>
5                 <groupId>org.onap.ccsdk.parent</groupId>
6                 <artifactId>odlparent-lite</artifactId>
7                 <version>1.4.0-SNAPSHOT</version>
8         </parent>
9
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.6.0-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                 <docker.verbose>true</docker.verbose>
26         </properties>
27
28
29         <build>
30                 <plugins>
31                         <plugin>
32                                 <groupId>org.codehaus.groovy.maven</groupId>
33                                 <artifactId>gmaven-plugin</artifactId>
34                                 <executions>
35                                         <execution>
36                                                 <phase>validate</phase>
37                                                 <goals>
38                                                         <goal>execute</goal>
39                                                 </goals>
40                                                 <configuration>
41                                                         <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
42                                                 </configuration>
43                                         </execution>
44                                 </executions>
45                         </plugin>
46
47                         <plugin>
48                                 <artifactId>maven-resources-plugin</artifactId>
49                                 <version>2.6</version>
50                                 <executions>
51                                         <execution>
52                                                 <id>copy-dockerfile</id>
53                                                 <goals>
54                                                         <goal>copy-resources</goal>
55                                                 </goals><!-- here the phase you need -->
56                                                 <phase>validate</phase>
57                                                 <configuration>
58                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
59                                                         <resources>
60                                                                 <resource>
61                                                                         <directory>src/main</directory>
62                                                                         <includes>
63                                                                                 <include>**/*</include>
64                                                                         </includes>
65                                                                         <filtering>false</filtering>
66                                                                 </resource>
67                                                         </resources>
68                                                 </configuration>
69                                         </execution>
70                                 </executions>
71                         </plugin>
72
73                         <plugin>
74                                 <artifactId>exec-maven-plugin</artifactId>
75                                 <groupId>org.codehaus.mojo</groupId>
76                                 <version>1.5.0</version>
77                                 <executions>
78                                         <execution>
79                                                 <id>change python permissions</id>
80                                                 <phase>process-sources</phase>
81                                                 <goals>
82                                                         <goal>exec</goal>
83                                                 </goals>
84                                                 <configuration>
85                                                         <executable>/usr/bin/find</executable>
86                                                         <arguments>
87                                                                 <argument>${basedir}/target/docker-stage/ansible-server</argument>
88                                                                 <argument>-name</argument>
89                                                                 <argument>*.py</argument>
90                                                                 <argument>-exec</argument>
91                                                                 <argument>chmod</argument>
92                                                                 <argument>+x</argument>
93                                                                 <argument>{}</argument>
94                                                                 <argument>;</argument>
95                                                         </arguments>
96                                                 </configuration>
97                                         </execution>
98                                         <execution>
99                                                  <id>change shell permissions</id>
100                                                  <phase>process-sources</phase>
101                                                  <goals>
102                                                            <goal>exec</goal>
103                                                  </goals>
104                                                  <configuration>
105                                                           <executable>/usr/bin/find</executable>
106                                                   <arguments>
107                                                         <argument>${basedir}/target/docker-stage/ansible-server</argument>
108                                                         <argument>-name</argument>
109                                                         <argument>*.sh</argument>
110                                                         <argument>-exec</argument>
111                                                         <argument>chmod</argument>
112                                                         <argument>+x</argument>
113                                                         <argument>{}</argument>
114                                                         <argument>;</argument>
115                                                   </arguments>
116                                                 </configuration>
117                                         </execution>
118                                 </executions>
119                         </plugin>
120                 </plugins>
121         </build>
122
123         <profiles>
124                 <profile>
125                         <id>docker</id>
126                         <build>
127                                 <plugins>
128                                         <plugin>
129                                                 <groupId>io.fabric8</groupId>
130                                                 <artifactId>docker-maven-plugin</artifactId>
131                                                 <version>0.28.0</version>
132                                                 <inherited>false</inherited>
133                                                 <configuration>
134                                                         <images>
135                                                                 <image>
136                                                                         <name>${image.name}</name>
137                                                                         <build>
138                                                                                 <cleanup>try</cleanup>
139                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
140                                                                                 <dockerFile>Dockerfile</dockerFile>
141                                                                                 <tags>
142                                                                                         <tag>${project.docker.latestminortag.version}</tag>
143                                                                                         <tag>${project.docker.latestfulltag.version}</tag>
144                                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
145                                                                                 </tags>
146                                                                         </build>
147                                                                 </image>
148                                                         </images>
149                                                 </configuration>
150                                                 <executions>
151                                                         <execution>
152                                                                 <id>generate-images</id>
153                                                                 <phase>package</phase>
154                                                                 <goals>
155                                                                         <goal>build</goal>
156                                                                 </goals>
157                                                         </execution>
158
159                                                         <execution>
160                                                                 <id>push-images</id>
161                                                                 <phase>deploy</phase>
162                                                                 <goals>
163                                                                         <goal>build</goal>
164                                                                         <goal>push</goal>
165                                                                 </goals>
166                                                         </execution>
167                                                 </executions>
168                                         </plugin>
169                                 </plugins>
170                         </build>
171                 </profile>
172         </profiles>
173         <organization>
174                 <name>ONAP</name>
175         </organization>
176 </project>