blob: 8e410e02c7f5726b196febca5140eec9ea34b950 [file] [log] [blame]
Dan Timoney471dafa2017-08-21 14:44:05 -04001<?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.distribution</groupId>
7 <artifactId>distribution-root</artifactId>
8 <version>0.1.0-SNAPSHOT</version>
9 </parent>
10 <modelVersion>4.0.0</modelVersion>
11 <packaging>pom</packaging>
12 <artifactId>distribution-odlsli</artifactId>
13 <version>0.1.0-SNAPSHOT</version>
14
15 <name>Distribution - odlsli</name>
16 <description>Creates SDN Controller Docker container</description>
17
18 <properties>
19 <image.name>onap/ccsdk-odlsli-image</image.name>
20 <ccsdk.project.version>${project.version}</ccsdk.project.version>
Dan Timoneyf90cfc92017-09-11 16:20:29 -040021 <ccsdk.core.version>0.1.2-SNAPSHOT</ccsdk.core.version>
Dan Timoney471dafa2017-08-21 14:44:05 -040022 <ccsdk.adaptors.version>${project.version}</ccsdk.adaptors.version>
23 <ccsdk.northbound.version>${project.version}</ccsdk.northbound.version>
24 <ccsdk.plugins.version>${project.version}</ccsdk.plugins.version>
25 <ccsdk.mysql-connector-java.version>5.1.39</ccsdk.mysql-connector-java.version>
26 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
27 </properties>
28
29
30 <build>
31 <plugins>
32
33
34 <plugin>
35 <groupId>org.codehaus.groovy.maven</groupId>
36 <artifactId>gmaven-plugin</artifactId>
37 <executions>
38 <execution>
39 <phase>validate</phase>
40 <goals>
41 <goal>execute</goal>
42 </goals>
43 <configuration>
44 <source>
45 println project.properties['ccsdk.project.version'];
46 def versionArray;
47 if ( project.properties['ccsdk.project.version'] != null ) {
48 versionArray = project.properties['ccsdk.project.version'].split('\\.');
49 }
50
51 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
52 {
53 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
54 } else {
55 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
56 }
57
58 println 'New Tag for docker:' +
59 project.properties['project.docker.latesttag.version'];
60 </source>
61 </configuration>
62 </execution>
63 </executions>
64 </plugin>
65
66
67
68 <plugin>
69 <artifactId>maven-resources-plugin</artifactId>
70 <version>2.6</version>
71 <executions>
72 <execution>
73 <id>copy-dockerfile</id>
74 <goals>
75 <goal>copy-resources</goal>
76 </goals><!-- here the phase you need -->
77 <phase>validate</phase>
78 <configuration>
79 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
80 <resources>
81 <resource>
82 <directory>src/main/docker</directory>
83 <includes>
84 <include>Dockerfile</include>
85 </includes>
86 <filtering>true</filtering>
87 </resource>
88 </resources>
89 </configuration>
90 </execution>
91
92 <execution>
93 <id>copy-scripts</id>
94 <goals>
95 <goal>copy-resources</goal>
96 </goals><!-- here the phase you need -->
97 <phase>validate</phase>
98 <configuration>
99 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
100 <resources>
101 <resource>
102 <directory>src/main/scripts</directory>
103 <includes>
104 <include>*.sh</include>
105 </includes>
106 <filtering>false</filtering>
107 </resource>
108 </resources>
109 </configuration>
110 </execution>
111
112 <execution>
113 <id>copy-tarballs</id>
114 <goals>
115 <goal>copy-resources</goal>
116 </goals><!-- here the phase you need -->
117 <phase>validate</phase>
118 <configuration>
119 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
120 <resources>
121 <resource>
122 <directory>src/main/resources</directory>
123 <includes>
124 <include>idmlight.db.mv.db</include>
125 </includes>
126 <filtering>false</filtering>
127 </resource>
128 </resources>
129 </configuration>
130 </execution>
131 <execution>
Marcus G K Williams1bc6ad32017-09-18 14:27:27 -0700132 <id>copy-config</id>
133 <goals>
134 <goal>copy-resources</goal>
135 </goals><!-- here the phase you need -->
136 <phase>validate</phase>
137 <configuration>
138 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
139 <resources>
140 <resource>
141 <directory>src/main/resources</directory>
142 <includes>
143 <include>org.ops4j.pax.logging.cfg</include>
144 </includes>
145 <filtering>false</filtering>
146 </resource>
147 </resources>
148 </configuration>
149 </execution>
150 <execution>
Dan Timoney471dafa2017-08-21 14:44:05 -0400151 <id>copy-data</id>
152 <goals>
153 <goal>copy-resources</goal>
154 </goals><!-- here the phase you need -->
155 <phase>validate</phase>
156 <configuration>
157 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
158 <resources>
159 <resource>
160 <directory>src/main/resources</directory>
161 <includes>
162 <include>*.dump</include>
163 </includes>
164 <filtering>false</filtering>
165 </resource>
166 </resources>
167 </configuration>
168 </execution>
169 <execution>
170 <id>copy-properties</id>
171 <goals>
172 <goal>copy-resources</goal>
173 </goals><!-- here the phase you need -->
174 <phase>validate</phase>
175 <configuration>
176 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
177 <resources>
178 <resource>
179 <directory>src/main/properties</directory>
180 <includes>
181 <include>*.properties</include>
182 </includes>
183 <filtering>false</filtering>
184 </resource>
185 </resources>
186 </configuration>
187 </execution>
188 <execution>
189 <id>copy-keystores</id>
190 <goals>
191 <goal>copy-resources</goal>
192 </goals><!-- here the phase you need -->
193 <phase>validate</phase>
194 <configuration>
195 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
196 <resources>
197 <resource>
Rich Tabedzki7db84e02017-10-18 18:41:07 +0000198 <directory>src/main/stores</directory>
Dan Timoney471dafa2017-08-21 14:44:05 -0400199 <includes>
200 <include>*.jks</include>
201 </includes>
202 <filtering>false</filtering>
203 </resource>
204 </resources>
205 </configuration>
206 </execution>
207 </executions>
208 </plugin>
209 <plugin>
210 <artifactId>exec-maven-plugin</artifactId>
211 <groupId>org.codehaus.mojo</groupId>
212 <version>1.5.0</version>
213 <executions>
214
215 <execution>
216 <id>Get features</id>
217 <phase>generate-sources</phase>
218 <goals>
219 <goal>exec</goal>
220 </goals>
221 <configuration>
222 <executable>/bin/bash</executable>
223 <environmentVariables>
224 <SDNC_CORE_VERSION>${ccsdk.core.version}</SDNC_CORE_VERSION>
225 <SDNC_ADAPTORS_VERSION>${ccsdk.adaptors.version}</SDNC_ADAPTORS_VERSION>
226 <SDNC_NORTHBOUND_VERSION>${ccsdk.northbound.version}</SDNC_NORTHBOUND_VERSION>
227 <SDNC_PLUGINS_VERSION>${ccsdk.plugins.version}</SDNC_PLUGINS_VERSION>
228 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
229 </environmentVariables>
230 <arguments>
231 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
232 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
233 </arguments>
234 </configuration>
235 </execution>
236
237 <execution>
238 <id>change shell permissions</id>
239 <phase>process-sources</phase>
240 <goals>
241 <goal>exec</goal>
242 </goals>
243 <configuration>
244 <executable>/usr/bin/find</executable>
245 <arguments>
246 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
247 <argument>-name</argument>
248 <argument>*.sh</argument>
249 <argument>-exec</argument>
250 <argument>chmod</argument>
251 <argument>+x</argument>
252 <argument>{}</argument>
253 <argument>;</argument>
254 </arguments>
255 </configuration>
256 </execution>
257 </executions>
258 </plugin>
259
260
261 </plugins>
262
263 </build>
264
265 <profiles>
266 <profile>
267 <id>docker</id>
268 <build>
269 <plugins>
270 <plugin>
271 <groupId>io.fabric8</groupId>
272 <artifactId>docker-maven-plugin</artifactId>
273 <version>0.16.5</version>
274 <inherited>false</inherited>
275 <configuration>
276 <images>
277 <image>
278 <name>${image.name}</name>
279 <build>
280 <cleanup>try</cleanup>
281 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
282 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
283 <tags>
284 <tag>${project.version}</tag>
285 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
286 <tag>${project.docker.latesttag.version}</tag>
287 </tags>
288 </build>
289 </image>
290 </images>
291 </configuration>
292 <executions>
293 <execution>
294 <id>generate-images</id>
295 <phase>package</phase>
296 <goals>
297 <goal>build</goal>
298 </goals>
299 </execution>
300
301 <execution>
302 <id>push-images</id>
303 <phase>deploy</phase>
304 <goals>
305 <goal>build</goal>
306 <goal>push</goal>
307 </goals>
308 </execution>
309 </executions>
310 </plugin>
311 </plugins>
312 </build>
313 </profile>
314 </profiles>
315 <organization>
316 <name>openECOMP</name>
317 </organization>
318</project>