Fix staging job
[sdnc/oam.git] / installation / sdnc / pom.xml
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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
4         <parent>
5                 <groupId>org.onap.ccsdk.parent</groupId>
6                 <artifactId>odlparent-lite</artifactId>
7                 <version>1.1.4</version>
8         </parent>
9
10         <modelVersion>4.0.0</modelVersion>
11         <packaging>pom</packaging>
12         <groupId>org.onap.sdnc.oam</groupId>
13         <artifactId>installation-sdnc</artifactId>
14         <version>1.4.5-SNAPSHOT</version>
15
16         <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17         <description>Creates SDN Controller Docker container</description>
18
19         <properties>
20                 <image.name>onap/sdnc-image</image.name>
21                 <sdnc.project.version>${project.version}</sdnc.project.version>
22                 <sdnc.northbound.version>1.4.3</sdnc.northbound.version>
23                 <ccsdk.docker.version>0.3.3</ccsdk.docker.version>
24                 <sdnc.keystore>keystore.sdnc.p12</sdnc.keystore>
25                 <sdnc.keypass>onap3.0</sdnc.keypass>
26                 <sdnc.secureport>8443</sdnc.secureport>
27                 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
28                 <docker.push.phase>deploy</docker.push.phase>
29                 <docker.verbose>true</docker.verbose>
30                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
31         </properties>
32
33         <dependencies>
34                 <dependency>
35                         <groupId>org.onap.sdnc.northbound</groupId>
36                         <artifactId>generic-resource-api-installer</artifactId>
37                         <version>${sdnc.northbound.version}</version>
38                         <classifier>repo</classifier>
39                         <type>zip</type>
40                 </dependency>
41                 <dependency>
42                         <groupId>org.onap.sdnc.northbound</groupId>
43                         <artifactId>vnfapi-installer</artifactId>
44                         <version>${sdnc.northbound.version}</version>
45                         <classifier>repo</classifier>
46                         <type>zip</type>
47                 </dependency>
48                 <dependency>
49                         <groupId>org.onap.sdnc.northbound</groupId>
50                         <artifactId>vnftools-installer</artifactId>
51                         <version>${sdnc.northbound.version}</version>
52                         <classifier>repo</classifier>
53                         <type>zip</type>
54                 </dependency>
55                 <dependency>
56                         <groupId>org.onap.sdnc.northbound</groupId>
57                         <artifactId>sdnc-northbound-features-installer</artifactId>
58                         <version>${sdnc.northbound.version}</version>
59                         <classifier>repo</classifier>
60                         <type>zip</type>
61                 </dependency>
62         </dependencies>
63
64         <build>
65                 <plugins>
66
67
68                         <plugin>
69                                 <groupId>org.codehaus.groovy.maven</groupId>
70                                 <artifactId>gmaven-plugin</artifactId>
71                                 <executions>
72                                         <execution>
73                                                 <phase>validate</phase>
74                                                 <goals>
75                                                         <goal>execute</goal>
76                                                 </goals>
77                                                 <configuration>
78                                                         <source>
79                                                                 println project.properties['sdnc.project.version'];
80                                                                 def versionArray;
81                                                                 if ( project.properties['sdnc.project.version'] != null ) {
82                                                                     versionArray = project.properties['sdnc.project.version'].split('\\.');
83                                                                 }
84
85                                                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT"))
86                                                                 {
87                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
88                                                                 } else {
89                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
90                                                                 }
91
92                                                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
93                                                         </source>
94                                                 </configuration>
95                                         </execution>
96                                 </executions>
97                         </plugin>
98
99                         <plugin>
100                                 <groupId>io.fabric8</groupId>
101                                 <artifactId>docker-maven-plugin</artifactId>
102                                 <version>0.16.5</version>
103                                 <inherited>false</inherited>
104                                 <configuration>
105                                         <images>
106                                                 <image>
107                                                         <name>${image.name}</name>
108                                                         <build>
109                                                                 <cleanup>try</cleanup>
110                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
111                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
112                                                                 <tags>
113                                                                         <tag>${project.version}</tag>
114                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
115                                                                         <tag>${project.docker.latesttag.version}</tag>
116                                                                 </tags>
117                                                         </build>
118                                                 </image>
119                                         </images>
120                                 </configuration>
121                                 <executions>
122                                         <execution>
123                                                 <id>generate-images</id>
124                                                 <phase>package</phase>
125                                                 <goals>
126                                                         <goal>build</goal>
127                                                 </goals>
128                                         </execution>
129
130                                         <execution>
131                                                 <id>push-images</id>
132                                                 <phase>${docker.push.phase}</phase>
133                                                 <goals>
134                                                         <goal>build</goal>
135                                                         <goal>push</goal>
136                                                 </goals>
137                                         </execution>
138                                 </executions>
139                         </plugin>
140
141
142
143                         <plugin>
144                                 <artifactId>maven-resources-plugin</artifactId>
145                                 <version>2.6</version>
146                                 <executions>
147                                         <execution>
148                                                 <id>copy-dockerfile</id>
149                                                 <goals>
150                                                         <goal>copy-resources</goal>
151                                                 </goals><!-- here the phase you need -->
152                                                 <phase>validate</phase>
153                                                 <configuration>
154                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
155                                                         <resources>
156                                                                 <resource>
157                                                                         <directory>src/main/docker</directory>
158                                                                         <includes>
159                                                                                 <include>Dockerfile</include>
160                                                                         </includes>
161                                                                         <filtering>true</filtering>
162                                                                 </resource>
163                                                         </resources>
164                                                 </configuration>
165                                         </execution>
166
167                                         <execution>
168                                                 <id>copy-scripts</id>
169                                                 <goals>
170                                                         <goal>copy-resources</goal>
171                                                 </goals><!-- here the phase you need -->
172                                                 <phase>validate</phase>
173                                                 <configuration>
174                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
175                                                         <resources>
176                                                                 <resource>
177                                                                         <directory>src/main/scripts</directory>
178                                                                         <includes>
179                                                                                 <include>*.sh</include>
180                                                                         </includes>
181                                                                         <filtering>false</filtering>
182                                                                 </resource>
183                                                         </resources>
184                                                 </configuration>
185                                         </execution>
186
187                                         <execution>
188                                                 <id>copy-tarballs</id>
189                                                 <goals>
190                                                         <goal>copy-resources</goal>
191                                                 </goals><!-- here the phase you need -->
192                                                 <phase>validate</phase>
193                                                 <configuration>
194                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
195                                                         <resources>
196                                                                 <resource>
197                                                                         <directory>src/main/resources</directory>
198                                                                         <includes>
199                                                                                 <include>idmlight.db.mv.db</include>
200                                                                                 <include>AAF_RootCA.cer</include>
201                                                                                 <include>truststoreONAPall.jks</include>
202                                                                         </includes>
203                                                                         <filtering>false</filtering>
204                                                                 </resource>
205                                                         </resources>
206                                                 </configuration>
207                                         </execution>
208                                         <execution>
209                                                 <id>copy-data</id>
210                                                 <goals>
211                                                         <goal>copy-resources</goal>
212                                                 </goals><!-- here the phase you need -->
213                                                 <phase>validate</phase>
214                                                 <configuration>
215                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
216                                                         <resources>
217                                                                 <resource>
218                                                                         <directory>src/main/resources</directory>
219                                                                         <includes>
220                                                                                 <include>*.dump</include>
221                                                                         </includes>
222                                                                         <filtering>false</filtering>
223                                                                 </resource>
224                                                         </resources>
225                                                 </configuration>
226                                         </execution>
227                                         <execution>
228                                                 <id>copy-properties</id>
229                                                 <goals>
230                                                         <goal>copy-resources</goal>
231                                                 </goals><!-- here the phase you need -->
232                                                 <phase>validate</phase>
233                                                 <configuration>
234                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
235                                                         <resources>
236                                                                 <resource>
237                                                                         <directory>../src/main/properties</directory>
238                                                                         <includes>
239                                                                                 <include>*.properties</include>
240                                                                         </includes>
241                                                                         <filtering>false</filtering>
242                                                                 </resource>
243                                                         </resources>
244                                                 </configuration>
245                                         </execution>
246                                         <execution>
247                                                 <id>copy-keystores</id>
248                                                 <goals>
249                                                         <goal>copy-resources</goal>
250                                                 </goals><!-- here the phase you need -->
251                                                 <phase>validate</phase>
252                                                 <configuration>
253                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
254                                                         <resources>
255                                                                 <resource>
256                                                                         <directory>../src/main/stores</directory>
257                                                                         <includes>
258                                                                                 <include>*.jks</include>
259                                                                         </includes>
260                                                                         <filtering>false</filtering>
261                                                                 </resource>
262                                                         </resources>
263                                                 </configuration>
264                                         </execution>
265                                 </executions>
266                         </plugin>
267                         <plugin>
268                                 <groupId>org.apache.maven.plugins</groupId>
269                                 <artifactId>maven-dependency-plugin</artifactId>
270                                 <version>3.0.2</version>
271                                 <executions>
272                                         <execution>
273                                                 <id>unpack sdnc features</id>
274                                                 <phase>generate-sources</phase>
275                                                 <goals>
276                                                         <goal>unpack-dependencies</goal>
277                                                 </goals>
278                                                 <configuration>
279                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
280                                                         <excludeTransitive>true</excludeTransitive>
281                                                 </configuration>
282                                         </execution>
283                                         <execution>
284                                                 <id>unpack dgs</id>
285                                                 <phase>generate-sources</phase>
286                                                 <goals>
287                                                         <goal>unpack</goal>
288                                                 </goals>
289                                                 <configuration>
290                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
291                                                         <artifactItems>
292                                                                 <artifactItem>
293                                                                         <groupId>${project.groupId}</groupId>
294                                                                         <artifactId>platform-logic-installer</artifactId>
295                                                                         <version>${project.version}</version>
296                                                                         <type>zip</type>
297                                                                 </artifactItem>
298                                                         </artifactItems>
299                                                 </configuration>
300                                         </execution>
301                                 </executions>
302                         </plugin>
303                         <plugin>
304                                 <artifactId>exec-maven-plugin</artifactId>
305                                 <groupId>org.codehaus.mojo</groupId>
306                                 <version>1.5.0</version>
307                                 <executions>
308
309                                         <execution>
310                                                 <id>change shell permissions</id>
311                                                 <phase>process-sources</phase>
312                                                 <goals>
313                                                         <goal>exec</goal>
314                                                 </goals>
315                                                 <configuration>
316                                                         <executable>/usr/bin/find</executable>
317                                                         <arguments>
318                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
319                                                                 <argument>-name</argument>
320                                                                 <argument>*.sh</argument>
321                                                                 <argument>-exec</argument>
322                                                                 <argument>chmod</argument>
323                                                                 <argument>+x</argument>
324                                                                 <argument>{}</argument>
325                                                                 <argument>;</argument>
326                                                         </arguments>
327                                                 </configuration>
328                                         </execution>
329                                 </executions>
330                         </plugin>
331
332
333                 </plugins>
334
335         </build>
336         <organization>
337                 <name>ONAP</name>
338         </organization>
339 </project>