Handle onboard ALTER tables to support upgrade
[sdc.git] / openecomp-be / dist / sdc-onboard-db-init-docker / pom.xml
1 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <name>openecomp-sdc-docker-db-init</name>
6     <groupId>org.openecomp.sdc</groupId>
7     <artifactId>openecomp-sdc-docker-db-init</artifactId>
8     <packaging>pom</packaging>
9
10     <url>http://maven.apache.org</url>
11
12     <parent>
13         <groupId>org.openecomp.sdc</groupId>
14         <artifactId>openecomp-sdc-docker-dist</artifactId>
15         <version>1.6.0-SNAPSHOT</version>
16     </parent>
17
18
19     <properties>
20         <docker.image.name>sdc-onboard-cassandra-init</docker.image.name>
21         <docker.namespace>onap</docker.namespace>
22         <docker.password>docker</docker.password>
23         <docker.username>docker</docker.username>
24         <docker.registry>nexus3.onap.org:10001</docker.registry>
25     </properties>
26
27     <build>
28         <plugins>
29             <plugin>
30                 <artifactId>maven-resources-plugin</artifactId>
31                 <version>3.0.2</version>
32                 <executions>
33                     <execution>
34                         <id>copy-resources-war</id>
35                         <phase>verify</phase>
36                         <goals>
37                             <goal>copy-resources</goal>
38                         </goals>
39                         <configuration>
40                             <outputDirectory>${project.basedir}/artifacts</outputDirectory>
41                             <resources>
42                                 <resource>
43                                     <directory>
44                                         ${project.parent.basedir}/../../openecomp-be/tools/install/database
45                                     </directory>
46                                     <includes>
47                                         <include>init_keyspaces.cql</include>
48                                         <include>init_schemas.cql</include>
49                                     </includes>
50                                 </resource>
51                             </resources>
52                         </configuration>
53                     </execution>
54                 </executions>
55             </plugin>
56             <plugin>
57                 <groupId>io.fabric8</groupId>
58                 <artifactId>docker-maven-plugin</artifactId>
59
60                 <configuration>
61                     <apiVersion>1.23</apiVersion>
62                     <registry>nexus3.onap.org:10001</registry>
63                     <authConfig>
64                         <pull>
65                             <username>${docker.username}</username>
66                             <password>${docker.password}</password>
67                         </pull>
68                     </authConfig>
69                     <images>
70
71                         <!-- Build backend image -->
72                         <image>
73                             <name>${docker.namespace}/${docker.image.name}</name>
74                             <alias>${docker.image.name}</alias>
75                             <build>
76                                 <cleanup>try</cleanup>
77                                 <dockerFileDir>${project.basedir}/artifacts</dockerFileDir>
78                                 <tags>
79                                     <tag>${docker.tag}</tag>
80                                     <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
81                                 </tags>
82                             </build>
83                         </image>
84                     </images>
85                 </configuration>
86                 <executions>
87                     <execution>
88                         <id>clean-images</id>
89                         <phase>pre-clean</phase>
90                         <goals>
91                             <goal>remove</goal>
92                         </goals>
93                         <configuration>
94                             <removeAll>true</removeAll>
95                             <image>${docker.namespace}/${docker.image.name}</image>
96                         </configuration>
97                     </execution>
98
99                     <execution>
100                         <id>generate-images</id>
101                         <phase>install</phase>
102                         <goals>
103                             <goal>build</goal>
104                         </goals>
105                     </execution>
106
107                     <execution>
108                         <id>push-images</id>
109                         <phase>deploy</phase>
110                         <goals>
111                             <goal>push</goal>
112                         </goals>
113                         <configuration>
114                             <image>${docker.namespace}/${docker.image.name}</image>
115                         </configuration>
116                     </execution>
117                 </executions>
118             </plugin>
119         </plugins>
120     </build>
121 </project>