Release version 1.4.1 ccsdk/distribution artifacts
[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/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <groupId>org.onap.ccsdk.distribution</groupId>
7         <artifactId>distribution-root</artifactId>
8         <version>1.4.2-SNAPSHOT</version>
9     </parent>
10
11     <groupId>org.onap.ccsdk.distribution</groupId>
12     <artifactId>ansible-server</artifactId>
13     <version>1.4.2-SNAPSHOT</version>
14     <packaging>pom</packaging>
15
16     <name>ccsdk-distribution :: ${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/ccsdk-ansible-server-image</image.name>
24                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
25                 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
26                 <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
27                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
28         <docker.verbose>true</docker.verbose>
29         <docker.skip.push>false</docker.skip.push>
30     </properties>
31
32     <build>
33         <plugins>
34             <plugin>
35                 <groupId>org.codehaus.groovy.maven</groupId>
36                 <artifactId>gmaven-plugin</artifactId>
37                 <version>1.0</version>
38                 <executions>
39                     <execution>
40                         <phase>validate</phase>
41                         <goals>
42                             <goal>execute</goal>
43                         </goals>
44                         <configuration>
45                             <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
46                         </configuration>
47                     </execution>
48                 </executions>
49             </plugin>
50
51             <plugin>
52                 <artifactId>maven-resources-plugin</artifactId>
53                 <version>2.6</version>
54                 <executions>
55                     <execution>
56                         <id>copy-dockerfile</id>
57                         <goals>
58                             <goal>copy-resources</goal>
59                         </goals><!-- here the phase you need -->
60                         <phase>validate</phase>
61                         <configuration>
62                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
63                             <resources>
64                                 <resource>
65                                     <directory>src/main</directory>
66                                     <includes>
67                                         <include>**/*</include>
68                                     </includes>
69                                     <filtering>false</filtering>
70                                 </resource>
71                             </resources>
72                         </configuration>
73                     </execution>
74                 </executions>
75             </plugin>
76             <plugin>
77                 <groupId>org.apache.maven.plugins</groupId>
78                 <artifactId>maven-antrun-plugin</artifactId>
79                 <version>1.8</version>
80                 <executions>
81                     <execution>
82                         <id>change-permissions</id>
83                         <phase>process-sources</phase>
84                         <configuration>
85                             <target>
86                                 <chmod perm="+x" type="file">
87                                     <fileset dir="${basedir}/target/docker-stage/ansible-server">
88                                         <include name="**/*.py"/>
89                                         <include name="**/*.sh"/>
90                                     </fileset>
91                                 </chmod>
92                             </target>
93                         </configuration>
94                         <goals>
95                             <goal>run</goal>
96                         </goals>
97                     </execution>
98                 </executions>
99             </plugin>
100         </plugins>
101     </build>
102
103     <profiles>
104         <profile>
105             <id>docker</id>
106             <build>
107                 <plugins>
108                     <plugin>
109                         <groupId>io.fabric8</groupId>
110                         <artifactId>docker-maven-plugin</artifactId>
111                         <version>0.34.0</version>
112                         <inherited>false</inherited>
113                         <configuration>
114                             <images>
115                                 <image>
116                                     <name>${image.name}</name>
117                                     <build>
118                                         <cleanup>try</cleanup>
119                                         <noCache>true</noCache>
120                                         <contextDir>${basedir}/target/docker-stage</contextDir>
121                                         <dockerFile>Dockerfile</dockerFile>
122                                         <tags>
123                                             <tag>${project.docker.latestminortag.version}</tag>
124                                             <tag>${project.docker.latestfulltag.version}</tag>
125                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
126                                         </tags>
127                                     </build>
128                                 </image>
129                             </images>
130                             <verbose>${docker.verbose}</verbose>
131                             <skipPush>${docker.skip.push}</skipPush>
132                         </configuration>
133                         <executions>
134                             <execution>
135                                 <id>build-push-images</id>
136                                 <goals>
137                                     <goal>build</goal>
138                                     <goal>push</goal>
139                                 </goals>
140                             </execution>
141                         </executions>
142                     </plugin>
143                 </plugins>
144             </build>
145         </profile>
146     </profiles>
147 </project>