1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
6 <groupId>org.openecomp.appc.deployment</groupId>
7 <artifactId>installation</artifactId>
8 <version>1.1.0-SNAPSHOT</version>
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <groupId>org.openecomp.appc.deployment</groupId>
14 <artifactId>installation-appc</artifactId>
15 <version>1.1.0-SNAPSHOT</version>
17 <name>Installation - APPC Docker</name>
18 <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
21 <image.name>openecomp/appc-image</image.name>
22 <appc.version>${project.version}</appc.version>
23 <!--This version will be over-ridden by jenkins
24 injecting the version.properties variable file during docker build-->
25 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
26 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
33 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
35 <artifactId>maven-resources-plugin</artifactId>
36 <version>2.6</version>
39 <id>copy-dockerfile</id>
41 <goal>copy-resources</goal>
42 </goals><!-- here the phase you need -->
43 <phase>validate</phase>
45 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
48 <directory>src/main/docker</directory>
50 <include>Dockerfile</include>
52 <filtering>true</filtering>
61 <goal>copy-resources</goal>
62 </goals><!-- here the phase you need -->
63 <phase>validate</phase>
65 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
68 <directory>src/main/scripts</directory>
70 <include>*.sh</include>
72 <filtering>false</filtering>
78 <!-- Two commented execution tags below in case / when appc needs to add .dump mysql files or keystore files -->
82 <goal>copy-resources</goal>
84 <phase>validate</phase>
86 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
89 <directory>src/main/resources</directory>
91 <include>*.dump</include>
93 <filtering>false</filtering>
99 <id>copy-keystores</id>
101 <goal>copy-resources</goal>
103 <phase>validate</phase>
105 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
108 <directory>../src/main/stores</directory>
110 <include>*.jks</include>
112 <filtering>false</filtering>
119 <id>copy-properties</id>
121 <goal>copy-resources</goal>
123 <phase>validate</phase>
125 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
128 <directory>../src/main/appc-properties</directory>
130 <include>*.properties</include>
132 <filtering>false</filtering>
140 <artifactId>exec-maven-plugin</artifactId>
141 <groupId>org.codehaus.mojo</groupId>
142 <version>1.5.0</version>
145 <id>Get features</id>
146 <phase>generate-sources</phase>
151 <executable>bash</executable>
152 <environmentVariables>
153 <APPC_VERSION>${appc.version}</APPC_VERSION>
154 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
155 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
156 </environmentVariables>
158 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
159 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
165 <id>change shell permissions</id>
166 <phase>process-sources</phase>
171 <executable>find</executable>
173 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
174 <argument>-name</argument>
175 <argument>*.sh</argument>
176 <argument>-exec</argument>
177 <argument>chmod</argument>
178 <argument>+x</argument>
179 <argument>{}</argument>
180 <argument>;</argument>
195 <groupId>org.codehaus.groovy.maven</groupId>
196 <artifactId>gmaven-plugin</artifactId>
199 <phase>validate</phase>
205 <ver>${project.version}</ver>
206 <timestamp>${maven.build.timestamp}</timestamp>
209 println project.properties['ver'];
211 if ( project.properties['ver'] != null ) {
212 versionArray = project.properties['ver'].split('\\.');
214 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
215 project.properties['dockertag1']=project.properties['ver'] + "-latest";
216 project.properties['dockertag2']="latest";
218 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
219 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
221 println 'docker tag 1: ' + project.properties['dockertag1'];
222 println 'docker tag 2: ' + project.properties['dockertag2'];
229 <groupId>io.fabric8</groupId>
230 <artifactId>docker-maven-plugin</artifactId>
231 <version>0.16.5</version>
232 <inherited>false</inherited>
236 <name>${image.name}</name>
238 <cleanup>try</cleanup>
239 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
240 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
242 <tag>${dockertag1}</tag>
243 <tag>${dockertag2}</tag>
251 <id>generate-images</id>
252 <phase>package</phase>
260 <phase>deploy</phase>
269 <!-- This is to add any extra scripts, sql dump files, properties files
270 APPC may need even after inheriting from the sdnc base image -->
272 <artifactId>maven-resources-plugin</artifactId>
273 <version>2.6</version>
276 <id>copy-dockerfile</id>
278 <goal>copy-resources</goal>
279 </goals><!-- here the phase you need -->
280 <phase>validate</phase>
282 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
285 <directory>src/main/docker</directory>
287 <include>Dockerfile</include>
289 <filtering>true</filtering>
296 <id>copy-scripts</id>
298 <goal>copy-resources</goal>
299 </goals><!-- here the phase you need -->
300 <phase>validate</phase>
302 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
305 <directory>src/main/scripts</directory>
307 <include>*.sh</include>
309 <filtering>false</filtering>
315 <!-- Two commented execution tags below in case / when appc needs
316 to add .dump mysql files or keystore files -->
317 <!--<execution> <id>copy-data</id> <goals> <goal>copy-resources</goal>
318 </goals> <phase>validate</phase> <configuration> <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
319 <resources> <resource> <directory>src/main/resources</directory> <includes>
320 <include>*.dump</include> </includes> <filtering>false</filtering> </resource>
321 </resources> </configuration> </execution> <execution> <id>copy-keystores</id>
322 <goals> <goal>copy-resources</goal> </goals> <phase>validate</phase> <configuration>
323 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
324 <resources> <resource> <directory>../src/main/stores</directory> <includes>
325 <include>*.jks</include> </includes> <filtering>false</filtering> </resource>
326 </resources> </configuration> </execution> -->
329 <id>copy-properties</id>
331 <goal>copy-resources</goal>
333 <phase>validate</phase>
335 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
338 <directory>../src/main/appc-properties</directory>
340 <include>*.properties</include>
342 <filtering>false</filtering>
350 <artifactId>exec-maven-plugin</artifactId>
351 <groupId>org.codehaus.mojo</groupId>
352 <version>1.5.0</version>
355 <id>Get features</id>
356 <phase>generate-sources</phase>
361 <executable>bash</executable>
362 <environmentVariables>
363 <APPC_VERSION>${appc.version}</APPC_VERSION>
364 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
365 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
366 </environmentVariables>
368 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
369 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
375 <id>change shell permissions</id>
376 <phase>process-sources</phase>
381 <executable>/usr/bin/find</executable>
383 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
384 <argument>-name</argument>
385 <argument>*.sh</argument>
386 <argument>-exec</argument>
387 <argument>chmod</argument>
388 <argument>+x</argument>
389 <argument>{}</argument>
390 <argument>;</argument>
403 <name>openECOMP</name>