Change ccsdk image 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.4.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.4.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.0</appc.release.version>
44                 <appc.snapshot.version>1.4.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.4.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                                                                         </includes>
161                                                                         <filtering>false</filtering>
162                                                                 </resource>
163                                                         </resources>
164                                                 </configuration>
165                                         </execution>
166                                 </executions>
167                         </plugin>
168                         <plugin>
169                                 <artifactId>exec-maven-plugin</artifactId>
170                                 <groupId>org.codehaus.mojo</groupId>
171                                 <version>1.5.0</version>
172                                 <executions>
173                                         <execution>
174                                                 <id>Get features</id>
175                                                 <phase>generate-sources</phase>
176                                                 <goals>
177                                                         <goal>exec</goal>
178                                                 </goals>
179                                                 <configuration>
180                                                         <executable>bash</executable>
181                                                         <environmentVariables>
182                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
183                                                                 <APPC_CDT_VERSION>${appc.cdt.version}</APPC_CDT_VERSION>
184                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
185                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
186                                                         </environmentVariables>
187                                                         <arguments>
188                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
189                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
190                                                         </arguments>
191                                                 </configuration>
192                                         </execution>
193
194                                         <execution>
195                                                 <id>change shell permissions</id>
196                                                 <phase>process-sources</phase>
197                                                 <goals>
198                                                         <goal>exec</goal>
199                                                 </goals>
200                                                 <configuration>
201                                                         <executable>find</executable>
202                                                         <arguments>
203                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
204                                                                 <argument>-name</argument>
205                                                                 <argument>*.sh</argument>
206                                                                 <argument>-exec</argument>
207                                                                 <argument>chmod</argument>
208                                                                 <argument>+x</argument>
209                                                                 <argument>{}</argument>
210                                                                 <argument>;</argument>
211                                                         </arguments>
212                                                 </configuration>
213                                         </execution>
214                                 </executions>
215                         </plugin>
216                 </plugins>
217         </build>
218
219         <profiles>
220                 <profile>
221                         <id>docker</id>
222                         <build>
223                                 <plugins>
224                                         <plugin>
225                                                 <groupId>org.codehaus.groovy.maven</groupId>
226                                                 <artifactId>gmaven-plugin</artifactId>
227                                                 <executions>
228                                                         <execution>
229                                                                 <phase>validate</phase>
230                                                                 <goals>
231                                                                         <goal>execute</goal>
232                                                                 </goals>
233                                                                 <configuration>
234                                                                         <properties>
235                                                                                 <ver>${project.version}</ver>
236                                                                                 <timestamp>${maven.build.timestamp}</timestamp>
237                                                                         </properties>
238                                                                         <source>
239                                                                                 println project.properties['ver'];
240                                                                                 def versionArray;
241                                                                                 if ( project.properties['ver'] != null ) {
242                                                                                 versionArray = project.properties['ver'].split('\\.');
243                                                                                 }
244                                                                                 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
245                                                                                 project.properties['dockertag1']=project.properties['ver'] + "-latest";
246                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
247                                                                                 project.properties['appc.version']=project.properties['appc.snapshot.version'];
248                                                                                 } else {
249                                                                                 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
250                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
251                                                                                 project.properties['appc.version']=project.properties['appc.release.version'];
252                                                                                 }
253                                                                                 println 'docker tag 1: ' + project.properties['dockertag1'];
254                                                                                 println 'docker tag 2: ' + project.properties['dockertag2'];
255                                                                         </source>
256                                                                 </configuration>
257                                                         </execution>
258                                                 </executions>
259                                         </plugin>
260                                         <plugin>
261                                                 <groupId>io.fabric8</groupId>
262                                                 <artifactId>docker-maven-plugin</artifactId>
263                                                 <version>0.16.5</version>
264                                                 <inherited>false</inherited>
265                                                 <configuration>
266                                                         <images>
267                                                                 <image>
268                                                                         <name>${image.name}</name>
269                                                                         <build>
270                                                                                 <cleanup>try</cleanup>
271                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
272                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
273                                                                                 <tags>
274                                                                                         <tag>${dockertag1}</tag>
275                                                                                         <tag>${dockertag2}</tag>
276                                                                                 </tags>
277                                                                         </build>
278                                                                 </image>
279                                                         </images>
280                                                 </configuration>
281                                                 <executions>
282                                                         <execution>
283                                                                 <id>generate-images</id>
284                                                                 <phase>package</phase>
285                                                                 <goals>
286                                                                         <goal>build</goal>
287                                                                 </goals>
288                                                         </execution>
289
290                                                         <execution>
291                                                                 <id>push-images</id>
292                                                                 <phase>deploy</phase>
293                                                                 <goals>
294                                                                         <goal>build</goal>
295                                                                         <goal>push</goal>
296                                                                 </goals>
297                                                         </execution>
298                                                 </executions>
299                                         </plugin>
300
301                                         <!-- This is to add any extra scripts, sql dump files, properties files 
302                                                 APPC may need even after inheriting from the sdnc base image -->
303                                         <plugin>
304                                                 <artifactId>maven-resources-plugin</artifactId>
305                                                 <version>2.6</version>
306                                                 <executions>
307                                                         <execution>
308                                                                 <id>copy-dockerfile</id>
309                                                                 <goals>
310                                                                         <goal>copy-resources</goal>
311                                                                 </goals><!-- here the phase you need -->
312                                                                 <phase>validate</phase>
313                                                                 <configuration>
314                                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
315                                                                         <resources>
316                                                                                 <resource>
317                                                                                         <directory>src/main/docker</directory>
318                                                                                         <includes>
319                                                                                                 <include>Dockerfile</include>
320                                                                                         </includes>
321                                                                                         <filtering>true</filtering>
322                                                                                 </resource>
323                                                                         </resources>
324                                                                 </configuration>
325                                                         </execution>
326
327                                                         <execution>
328                                                                 <id>copy-scripts</id>
329                                                                 <goals>
330                                                                         <goal>copy-resources</goal>
331                                                                 </goals><!-- here the phase you need -->
332                                                                 <phase>validate</phase>
333                                                                 <configuration>
334                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
335                                                                         <resources>
336                                                                                 <resource>
337                                                                                         <directory>src/main/scripts</directory>
338                                                                                         <includes>
339                                                                                                 <include>*.sh</include>
340                                                                                         </includes>
341                                                                                         <filtering>false</filtering>
342                                                                                 </resource>
343                                                                         </resources>
344                                                                 </configuration>
345                                                         </execution>
346
347                                                         <execution>
348                                                                 <id>copy-data</id>
349                                                                 <goals>
350                                                                         <goal>copy-resources</goal>
351                                                                 </goals>
352                                                                 <phase>validate</phase>
353                                                                 <configuration>
354                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
355                                                                         <resources>
356                                                                                 <resource>
357                                                                                         <directory>src/main/resources</directory>
358                                                                                         <includes>
359                                                                                                 <include>*.dump</include>
360                                                                                                 <include>*.sh</include>
361                                                                                                 <include>*.cfg</include>
362                                                                                                 <include>*.xml</include>                
363                                                                                         </includes>
364                                                                                         <filtering>false</filtering>
365                                                                                 </resource>
366                                                                         </resources>
367                                                                 </configuration>
368                                                         </execution>
369                                                         
370                                                         <execution>
371                                                                 <id>copy-keystores</id>
372                                                                 <goals>
373                                                                         <goal>copy-resources</goal>
374                                                                 </goals>
375                                                                 <phase>validate</phase>
376                                                                 <configuration>
377                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
378                                                                         <resources>
379                                                                                 <resource>
380                                                                                         <directory>../src/main/stores</directory>
381                                                                                         <includes>
382                                                                                                 <include>*.jks</include>
383                                                                                                 <include>*.p12</include>
384                                                                                                 <include>*.keyfile</include>
385                                                                                         </includes>
386                                                                                         <filtering>false</filtering>
387                                                                                 </resource>
388                                                                         </resources>
389                                                                 </configuration>
390                                                         </execution>
391
392                                                         <execution>
393                                                                 <id>copy-properties</id>
394                                                                 <goals>
395                                                                         <goal>copy-resources</goal>
396                                                                 </goals>
397                                                                 <phase>validate</phase>
398                                                                 <configuration>
399                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
400                                                                         <resources>
401                                                                                 <resource>
402                                                                                         <directory>../src/main/properties</directory>
403                                                                                         <includes>
404                                                                                                 <include>*.properties</include>
405                                                                                         </includes>
406                                                                                         <filtering>false</filtering>
407                                                                                 </resource>
408                                                                         </resources>
409                                                                 </configuration>
410                                                         </execution>
411                                                 </executions>
412                                         </plugin>
413                                         <plugin>
414                                                 <artifactId>exec-maven-plugin</artifactId>
415                                                 <groupId>org.codehaus.mojo</groupId>
416                                                 <version>1.5.0</version>
417                                                 <executions>
418                                                         <execution>
419                                                                 <id>Get features</id>
420                                                                 <phase>generate-sources</phase>
421                                                                 <goals>
422                                                                         <goal>exec</goal>
423                                                                 </goals>
424                                                                 <configuration>
425                                                                         <executable>bash</executable>
426                                                                         <environmentVariables>
427                                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
428                                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
429                                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
430                                                                         </environmentVariables>
431                                                                         <arguments>
432                                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
433                                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
434                                                                                 <argument>${basedir}/target/docker-stage</argument>
435                                                                         </arguments>
436                                                                 </configuration>
437                                                         </execution>
438
439                                                         <execution>
440                                                                 <id>change shell permissions</id>
441                                                                 <phase>process-sources</phase>
442                                                                 <goals>
443                                                                         <goal>exec</goal>
444                                                                 </goals>
445                                                                 <configuration>
446                                                                         <executable>find</executable>
447                                                                         <arguments>
448                                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
449                                                                                 <argument>-name</argument>
450                                                                                 <argument>*.sh</argument>
451                                                                                 <argument>-exec</argument>
452                                                                                 <argument>chmod</argument>
453                                                                                 <argument>+x</argument>
454                                                                                 <argument>{}</argument>
455                                                                                 <argument>;</argument>
456                                                                         </arguments>
457                                                                 </configuration>
458                                                         </execution>
459                                                 </executions>
460                                         </plugin>
461                                 </plugins>
462                         </build>
463
464                 </profile>
465         </profiles>
466         
467         <organization>
468                 <name>ONAP</name>
469         </organization>
470         
471 </project>