make ansible container backward compatible
[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"
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
12         <modelVersion>4.0.0</modelVersion>
13         <packaging>pom</packaging>
14         <groupId>org.onap.ccsdk.distribution</groupId>
15         <artifactId>ansible-server</artifactId>
16         <version>0.4.1-SNAPSHOT</version>
17
18         <name>ccsdk :: distribution :: ${project.artifactId}</name>
19         <description>Creates ansible-server Docker container</description>
20
21         <properties>
22                 <image.name>onap/ccsdk-ansible-server-image</image.name>
23                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
24                 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
25                 <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
26                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
27                 <docker.verbose>true</docker.verbose>
28         </properties>
29
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}/../src/main/scripts/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-dockerfile</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
75                         <plugin>
76                                 <artifactId>exec-maven-plugin</artifactId>
77                                 <groupId>org.codehaus.mojo</groupId>
78                                 <version>1.5.0</version>
79                                 <executions>
80                                         <execution>
81                                                 <id>change python permissions</id>
82                                                 <phase>process-sources</phase>
83                                                 <goals>
84                                                         <goal>exec</goal>
85                                                 </goals>
86                                                 <configuration>
87                                                         <executable>/usr/bin/find</executable>
88                                                         <arguments>
89                                                                 <argument>${basedir}/target/docker-stage/ansible-server</argument>
90                                                                 <argument>-name</argument>
91                                                                 <argument>*.py</argument>
92                                                                 <argument>-exec</argument>
93                                                                 <argument>chmod</argument>
94                                                                 <argument>+x</argument>
95                                                                 <argument>{}</argument>
96                                                                 <argument>;</argument>
97                                                         </arguments>
98                                                 </configuration>
99                                         </execution>
100                                         <execution>
101                                                  <id>change shell permissions</id>
102                                                  <phase>process-sources</phase>
103                                                  <goals>
104                                                            <goal>exec</goal>
105                                                  </goals>
106                                                  <configuration>
107                                                           <executable>/usr/bin/find</executable>
108                                                   <arguments>
109                                                         <argument>${basedir}/target/docker-stage/ansible-server</argument>
110                                                         <argument>-name</argument>
111                                                         <argument>*.sh</argument>
112                                                         <argument>-exec</argument>
113                                                         <argument>chmod</argument>
114                                                         <argument>+x</argument>
115                                                         <argument>{}</argument>
116                                                         <argument>;</argument>
117                                                   </arguments>
118                                                 </configuration>
119                                         </execution>
120                                 </executions>
121                         </plugin>
122                 </plugins>
123         </build>
124
125         <profiles>
126                 <profile>
127                         <id>docker</id>
128                         <build>
129                                 <plugins>
130                                         <plugin>
131                                                 <groupId>io.fabric8</groupId>
132                                                 <artifactId>docker-maven-plugin</artifactId>
133                                                 <version>0.16.5</version>
134                                                 <inherited>false</inherited>
135                                                 <configuration>
136                                                         <images>
137                                                                 <image>
138                                                                         <name>${image.name}</name>
139                                                                         <build>
140                                                                                 <cleanup>try</cleanup>
141                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
142                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
143                                                                                 <tags>
144                                                                                         <tag>${project.docker.latestminortag.version}</tag>
145                                                                                         <tag>${project.docker.latestfulltag.version}</tag>
146                                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
147                                                                                 </tags>
148                                                                         </build>
149                                                                 </image>
150                                                         </images>
151                                                 </configuration>
152                                                 <executions>
153                                                         <execution>
154                                                                 <id>generate-images</id>
155                                                                 <phase>package</phase>
156                                                                 <goals>
157                                                                         <goal>build</goal>
158                                                                 </goals>
159                                                         </execution>
160
161                                                         <execution>
162                                                                 <id>push-images</id>
163                                                                 <phase>deploy</phase>
164                                                                 <goals>
165                                                                         <goal>build</goal>
166                                                                         <goal>push</goal>
167                                                                 </goals>
168                                                         </execution>
169                                                 </executions>
170                                         </plugin>
171                                 </plugins>
172                         </build>
173                 </profile>
174         </profiles>
175         <organization>
176                 <name>ONAP</name>
177         </organization>
178 </project>

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use