blob: 0b440d239d09085ca7a6db6be6451a9334517a9c [file] [log] [blame]
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -04001<?xml version="1.0" encoding="UTF-8"?>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -05002<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">
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -04005
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -05006 <parent>
7 <groupId>org.onap.ccsdk.parent</groupId>
8 <artifactId>odlparent-lite</artifactId>
9 <version>1.2.1-SNAPSHOT</version>
10 </parent>
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010011
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050012 <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>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040017
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050018 <name>ccsdk :: distribution :: ${project.artifactId}</name>
19 <description>Creates ansible-server Docker container</description>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040020
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050021 <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>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040029
30
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050031 <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>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040048
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050049 <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>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -040074
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050075 <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>
Taka Cho9bec8482019-02-18 14:31:27 -0500100 <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>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500120 </executions>
121 </plugin>
122 </plugins>
123 </build>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -0400124
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500125 <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>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -0400160
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500161 <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>
Timoney, Dan (dt5972)12622052018-09-12 10:53:10 -0400178</project>