Change cdt proxy version
[appc/deployment.git] / installation / appc / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ============LICENSE_START==========================================
4 ONAP : APPC
5 ===================================================================
6 Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
7 ===================================================================
8
9 Unless otherwise specified, all software contained herein is licensed
10 under the Apache License, Version 2.0 (the License);
11 you may not use this software except in compliance with the License.
12 You may obtain a copy of the License at
13
14     http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21 ============LICENSE_END============================================
22 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
25
26         <parent>
27                 <groupId>org.onap.appc.deployment</groupId>
28                 <artifactId>installation</artifactId>
29                 <version>1.5.0-SNAPSHOT</version>
30         </parent>
31
32         <modelVersion>4.0.0</modelVersion>
33         <packaging>pom</packaging>
34         <groupId>org.onap.appc.deployment</groupId>
35         <artifactId>installation-appc</artifactId>
36         <version>1.5.0-SNAPSHOT</version>
37
38         <name>Installation - APPC Docker</name>
39         <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
40
41         <properties>
42                 <image.name>onap/appc-image</image.name>
43                 <appc.release.version>1.4.4</appc.release.version>
44                 <appc.snapshot.version>1.5.0-SNAPSHOT</appc.snapshot.version>
45                 <!--This version will be over-ridden by jenkins 
46                     injecting the version.properties variable file during docker build-->
47                 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
48                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
49                 <!--Determines the version of the cdt-proxy-service to download and install-->
50                 <appc.cdt.version>1.5.0-SNAPSHOT</appc.cdt.version>
51         </properties>
52
53
54         <build>
55                 <plugins>
56                         
57                         <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
58                         <plugin>
59                                 <artifactId>maven-resources-plugin</artifactId>
60                                 <version>2.6</version>
61                                 <executions>
62                                         <execution>
63                                                 <id>copy-dockerfile</id>
64                                                 <goals>
65                                                         <goal>copy-resources</goal>
66                                                 </goals><!-- here the phase you need -->
67                                                 <phase>validate</phase>
68                                                 <configuration>
69                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
70                                                         <resources>
71                                                                 <resource>
72                                                                         <directory>src/main/docker</directory>
73                                                                         <includes>
74                                                                                 <include>Dockerfile</include>
75                                                                         </includes>
76                                                                         <filtering>true</filtering>
77                                                                 </resource>
78                                                         </resources>
79                                                 </configuration>
80                                         </execution>
81
82                                         <execution>
83                                                 <id>copy-scripts</id>
84                                                 <goals>
85                                                         <goal>copy-resources</goal>
86                                                 </goals><!-- here the phase you need -->
87                                                 <phase>validate</phase>
88                                                 <configuration>
89                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
90                                                         <resources>
91                                                                 <resource>
92                                                                         <directory>src/main/scripts</directory>
93                                                                         <includes>
94                                                                                 <include>*.sh</include>
95                                                                         </includes>
96                                                                         <filtering>false</filtering>
97                                                                 </resource>
98                                                         </resources>
99                                                 </configuration>
100                                         </execution>
101                                         
102                                         <execution>
103                                                 <id>copy-data</id>
104                                                 <goals>
105                                                         <goal>copy-resources</goal>
106                                                 </goals>
107                                                 <phase>validate</phase>
108                                                 <configuration>
109                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
110                                                         <resources>
111                                                                 <resource>
112                                                                         <directory>src/main/resources</directory>
113                                                                         <includes>
114                                                                                 <include>*.dump</include>
115                                                                                 <include>*.sh</include>
116                                                                                 <include>*.cfg</include>
117                                                                                 <include>*.xml</include>
118                                                                         </includes>
119                                                                         <filtering>false</filtering>
120                                                                 </resource>
121                                                         </resources>
122                                                 </configuration>
123                                         </execution>
124                                         
125                                         <execution>
126                                                 <id>copy-keystores</id>
127                                                 <goals>
128                                                         <goal>copy-resources</goal>
129                                                 </goals>
130                                                 <phase>validate</phase>
131                                                 <configuration>
132                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
133                                                         <resources>
134                                                                 <resource>
135                                                                         <directory>../src/main/stores</directory>
136                                                                         <includes>
137                                                                                 <include>*.jks</include>
138                                                                                 <include>*.p12</include>
139                                                                                 <include>*keyfile</include>
140                                                                         </includes>
141                                                                         <filtering>false</filtering>
142                                                                 </resource>
143                                                         </resources>
144                                                 </configuration>
145                                         </execution>
146                                         
147                                         <execution>
148                                                 <id>copy-properties</id>
149                                                 <goals>
150                                                         <goal>copy-resources</goal>
151                                                 </goals>
152                                                 <phase>validate</phase>
153                                                 <configuration>
154                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
155                                                         <resources>
156                                                                 <resource>
157                                                                         <directory>../src/main/properties</directory>
158                                                                         <includes>
159                                                                                 <include>*.properties</include>
160                                                                                 <include>*.csv</include>
161                                                                         </includes>
162                                                                         <filtering>false</filtering>
163                                                                 </resource>
164                                                         </resources>
165                                                 </configuration>
166                                         </execution>
167                                 </executions>
168                         </plugin>
169                         <plugin>
170                                 <artifactId>exec-maven-plugin</artifactId>
171                                 <groupId>org.codehaus.mojo</groupId>
172                                 <version>1.5.0</version>
173                                 <executions>
174                                         <execution>
175                                                 <id>Get features</id>
176                                                 <phase>generate-sources</phase>
177                                                 <goals>
178                                                         <goal>exec</goal>
179                                                 </goals>
180                                                 <configuration>
181                                                         <executable>bash</executable>
182                                                         <environmentVariables>
183                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
184                                                                 <APPC_CDT_VERSION>${appc.cdt.version}</APPC_CDT_VERSION>
185                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
186                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
187                                                         </environmentVariables>
188                                                         <arguments>
189                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
190                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
191                                                         </arguments>
192                                                 </configuration>
193                                         </execution>
194
195                                         <execution>
196                                                 <id>change shell permissions</id>
197                                                 <phase>process-sources</phase>
198                                                 <goals>
199                                                         <goal>exec</goal>
200                                                 </goals>
201                                                 <configuration>
202                                                         <executable>find</executable>
203                                                         <arguments>
204                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
205                                                                 <argument>-name</argument>
206                                                                 <argument>*.sh</argument>
207                                                                 <argument>-exec</argument>
208                                                                 <argument>chmod</argument>
209                                                                 <argument>+x</argument>
210                                                                 <argument>{}</argument>
211                                                                 <argument>;</argument>
212                                                         </arguments>
213                                                 </configuration>
214                                         </execution>
215                                 </executions>
216                         </plugin>
217                 </plugins>
218         </build>
219
220         <profiles>
221                 <profile>
222                         <id>docker</id>
223                         <build>
224                                 <plugins>
225                                         <plugin>
226                                                 <groupId>org.codehaus.groovy.maven</groupId>
227                                                 <artifactId>gmaven-plugin</artifactId>
228                                                 <executions>
229                                                         <execution>
230                                                                 <phase>validate</phase>
231                                                                 <goals>
232                                                                         <goal>execute</goal>
233                                                                 </goals>
234                                                                 <configuration>
235                                                                         <properties>
236                                                                                 <ver>${project.version}</ver>
237                                                                                 <timestamp>${maven.build.timestamp}</timestamp>
238                                                                         </properties>
239                                                                         <source>
240                                                                                 println project.properties['ver'];
241                                                                                 def versionArray;
242                                                                                 if ( project.properties['ver'] != null ) {
243                                                                                 versionArray = project.properties['ver'].split('\\.');
244                                                                                 }
245                                                                                 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
246                                                                                 project.properties['dockertag1']=project.properties['ver'] + "-latest";
247                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
248                                                                                 project.properties['appc.version']=project.properties['appc.snapshot.version'];
249                                                                                 } else {
250                                                                                 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
251                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
252                                                                                 project.properties['appc.version']=project.properties['appc.release.version'];
253                                                                                 }
254                                                                                 println 'docker tag 1: ' + project.properties['dockertag1'];
255                                                                                 println 'docker tag 2: ' + project.properties['dockertag2'];
256                                                                         </source>
257                                                                 </configuration>
258                                                         </execution>
259                                                 </executions>
260                                         </plugin>
261                                         <plugin>
262                                                 <groupId>io.fabric8</groupId>
263                                                 <artifactId>docker-maven-plugin</artifactId>
264                                                 <version>0.16.5</version>
265                                                 <inherited>false</inherited>
266                                                 <configuration>
267                                                         <images>
268                                                                 <image>
269                                                                         <name>${image.name}</name>
270                                                                         <build>
271                                                                                 <cleanup>try</cleanup>
272                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
273                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
274                                                                                 <tags>
275                                                                                         <tag>${dockertag1}</tag>
276                                                                                         <tag>${dockertag2}</tag>
277                                                                                 </tags>
278                                                                         </build>
279                                                                 </image>
280                                                         </images>
281                                                 </configuration>
282                                                 <executions>
283                                                         <execution>
284                                                                 <id>generate-images</id>
285                                                                 <phase>package</phase>
286                                                                 <goals>
287                                                                         <goal>build</goal>
288                                                                 </goals>
289                                                         </execution>
290
291                                                         <execution>
292                                                                 <id>push-images</id>
293                                                                 <phase>deploy</phase>
294                                                                 <goals>
295                                                                         <goal>build</goal>
296                                                                         <goal>push</goal>
297                                                                 </goals>
298                                                         </execution>
299                                                 </executions>
300                                         </plugin>
301
302                                         <!-- This is to add any extra scripts, sql dump files, properties files 
303                                                 APPC may need even after inheriting from the sdnc base image -->
304                                         <plugin>
305                                                 <artifactId>maven-resources-plugin</artifactId>
306                                                 <version>2.6</version>
307                                                 <executions>
308                                                         <execution>
309                                                                 <id>copy-dockerfile</id>
310                                                                 <goals>
311                                                                         <goal>copy-resources</goal>
312                                                                 </goals><!-- here the phase you need -->
313                                                                 <phase>validate</phase>
314                                                                 <configuration>
315                                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
316                                                                         <resources>
317                                                                                 <resource>
318                                                                                         <directory>src/main/docker</directory>
319                                                                                         <includes>
320                                                                                                 <include>Dockerfile</include>
321                                                                                         </includes>
322                                                                                         <filtering>true</filtering>
323                                                                                 </resource>
324                                                                         </resources>
325                                                                 </configuration>
326                                                         </execution>
327
328                                                         <execution>
329                                                                 <id>copy-scripts</id>
330                                                                 <goals>
331                                                                         <goal>copy-resources</goal>
332                                                                 </goals><!-- here the phase you need -->
333                                                                 <phase>validate</phase>
334                                                                 <configuration>
335                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
336                                                                         <resources>
337                                                                                 <resource>
338                                                                                         <directory>src/main/scripts</directory>
339                                                                                         <includes>
340                                                                                                 <include>*.sh</include>
341                                                                                         </includes>
342                                                                                         <filtering>false</filtering>
343                                                                                 </resource>
344                                                                         </resources>
345                                                                 </configuration>
346                                                         </execution>
347
348                                                         <execution>
349                                                                 <id>copy-data</id>
350                                                                 <goals>
351                                                                         <goal>copy-resources</goal>
352                                                                 </goals>
353                                                                 <phase>validate</phase>
354                                                                 <configuration>
355                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
356                                                                         <resources>
357                                                                                 <resource>
358                                                                                         <directory>src/main/resources</directory>
359                                                                                         <includes>
360                                                                                                 <include>*.dump</include>
361                                                                                                 <include>*.sh</include>
362                                                                                                 <include>*.cfg</include>
363                                                                                                 <include>*.xml</include>
364                                                                                         </includes>
365                                                                                         <filtering>false</filtering>
366                                                                                 </resource>
367                                                                         </resources>
368                                                                 </configuration>
369                                                         </execution>
370                                                         
371                                                         <execution>
372                                                                 <id>copy-keystores</id>
373                                                                 <goals>
374                                                                         <goal>copy-resources</goal>
375                                                                 </goals>
376                                                                 <phase>validate</phase>
377                                                                 <configuration>
378                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
379                                                                         <resources>
380                                                                                 <resource>
381                                                                                         <directory>../src/main/stores</directory>
382                                                                                         <includes>
383                                                                                                 <include>*.jks</include>
384                                                                                                 <include>*.p12</include>
385                                                                                                 <include>*.keyfile</include>
386                                                                                         </includes>
387                                                                                         <filtering>false</filtering>
388                                                                                 </resource>
389                                                                         </resources>
390                                                                 </configuration>
391                                                         </execution>
392
393                                                         <execution>
394                                                                 <id>copy-properties</id>
395                                                                 <goals>
396                                                                         <goal>copy-resources</goal>
397                                                                 </goals>
398                                                                 <phase>validate</phase>
399                                                                 <configuration>
400                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
401                                                                         <resources>
402                                                                                 <resource>
403                                                                                         <directory>../src/main/properties</directory>
404                                                                                         <includes>
405                                                                                                 <include>*.properties</include>
406                                                                                                 <include>*.csv</include>
407                                                                                         </includes>
408                                                                                         <filtering>false</filtering>
409                                                                                 </resource>
410                                                                         </resources>
411                                                                 </configuration>
412                                                         </execution>
413                                                 </executions>
414                                         </plugin>
415                                         <plugin>
416                                                 <artifactId>exec-maven-plugin</artifactId>
417                                                 <groupId>org.codehaus.mojo</groupId>
418                                                 <version>1.5.0</version>
419                                                 <executions>
420                                                         <execution>
421                                                                 <id>Get features</id>
422                                                                 <phase>generate-sources</phase>
423                                                                 <goals>
424                                                                         <goal>exec</goal>
425                                                                 </goals>
426                                                                 <configuration>
427                                                                         <executable>bash</executable>
428                                                                         <environmentVariables>
429                                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
430                                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
431                                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
432                                                                         </environmentVariables>
433                                                                         <arguments>
434                                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
435                                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
436                                                                                 <argument>${basedir}/target/docker-stage</argument>
437                                                                         </arguments>
438                                                                 </configuration>
439                                                         </execution>
440
441                                                         <execution>
442                                                                 <id>change shell permissions</id>
443                                                                 <phase>process-sources</phase>
444                                                                 <goals>
445                                                                         <goal>exec</goal>
446                                                                 </goals>
447                                                                 <configuration>
448                                                                         <executable>find</executable>
449                                                                         <arguments>
450                                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
451                                                                                 <argument>-name</argument>
452                                                                                 <argument>*.sh</argument>
453                                                                                 <argument>-exec</argument>
454                                                                                 <argument>chmod</argument>
455                                                                                 <argument>+x</argument>
456                                                                                 <argument>{}</argument>
457                                                                                 <argument>;</argument>
458                                                                         </arguments>
459                                                                 </configuration>
460                                                         </execution>
461                                                 </executions>
462                                         </plugin>
463                                 </plugins>
464                         </build>
465
466                 </profile>
467         </profiles>
468         
469         <organization>
470                 <name>ONAP</name>
471         </organization>
472         
473 </project>