Step version for Jakarta
[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     <artifactId>openecomp-sdc-docker-db-init</artifactId>
7     <packaging>pom</packaging>
8
9     <url>http://maven.apache.org</url>
10
11     <parent>
12         <groupId>org.openecomp.sdc</groupId>
13         <artifactId>openecomp-sdc-docker-dist</artifactId>
14         <version>1.10.0-SNAPSHOT</version>
15     </parent>
16
17
18     <properties>
19         <docker.image.name>sdc-onboard-cassandra-init</docker.image.name>
20         <docker.namespace>onap</docker.namespace>
21         <docker.password>docker</docker.password>
22         <docker.username>docker</docker.username>
23         <docker.registry>nexus3.onap.org:10001</docker.registry>
24     </properties>
25
26     <build>
27         <plugins>
28             <plugin>
29                 <groupId>org.apache.maven.plugins</groupId>
30                 <artifactId>maven-clean-plugin</artifactId>
31                 <executions>
32                     <execution>
33                         <id>clean-docker-artifacts</id>
34                         <phase>clean</phase>
35                         <goals>
36                             <goal>clean</goal>
37                         </goals>
38                         <configuration>
39                             <filesets>
40                                 <fileset>
41                                     <directory>
42                                         artifacts
43                                     </directory>
44                                     <followSymlinks>false</followSymlinks>
45                                     <includes>
46                                         <include>init_keyspaces.cql</include>
47                                         <include>init_schemas.cql</include>
48                                         <include>upgrade-scripts/**</include>
49                                     </includes>
50                                 </fileset>
51                             </filesets>
52                         </configuration>
53                     </execution>
54                 </executions>
55             </plugin>
56             <plugin>
57                 <artifactId>maven-resources-plugin</artifactId>
58                 <version>3.0.2</version>
59                 <executions>
60                     <execution>
61                         <id>copy-resources-war</id>
62                         <phase>verify</phase>
63                         <goals>
64                             <goal>copy-resources</goal>
65                         </goals>
66                         <configuration>
67                             <outputDirectory>${project.basedir}/artifacts</outputDirectory>
68                             <resources>
69                                 <resource>
70                                     <directory>
71                                         ${project.parent.basedir}/../../openecomp-be/tools/install/database
72                                     </directory>
73                                     <includes>
74                                         <include>init_keyspaces.cql</include>
75                                         <include>init_schemas.cql</include>
76                                         <include>upgrade-scripts/**</include>
77                                     </includes>
78                                 </resource>
79                             </resources>
80                         </configuration>
81                     </execution>
82                 </executions>
83             </plugin>
84             <plugin>
85                 <groupId>io.fabric8</groupId>
86                 <artifactId>docker-maven-plugin</artifactId>
87
88                 <configuration>
89                     <verbose>${verbose}</verbose>
90                     <apiVersion>${docker.api.version}</apiVersion>
91                     <registry>nexus3.onap.org:10001</registry>
92                     <authConfig>
93                         <pull>
94                             <username>${docker.username}</username>
95                             <password>${docker.password}</password>
96                         </pull>
97                     </authConfig>
98                     <images>
99
100                         <!-- Build backend image -->
101                         <image>
102                             <name>${docker.namespace}/${docker.image.name}</name>
103                             <alias>${docker.image.name}</alias>
104                             <build>
105                                 <cleanup>try</cleanup>
106                                 <dockerFileDir>${project.basedir}/artifacts</dockerFileDir>
107                                 <tags>
108                                     <tag>latest</tag>
109                                     <tag>
110                                         ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
111                                     </tag>
112                                     <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-${maven.build.timestamp}</tag>
113                                 </tags>
114                             </build>
115                         </image>
116                     </images>
117                 </configuration>
118                 <executions>
119                     <execution>
120                         <id>clean-images</id>
121                         <phase>pre-clean</phase>
122                         <goals>
123                             <goal>remove</goal>
124                         </goals>
125                         <configuration>
126                             <removeAll>true</removeAll>
127                             <image>${docker.namespace}/${docker.image.name}</image>
128                         </configuration>
129                     </execution>
130
131                     <execution>
132                         <id>generate-images</id>
133                         <phase>install</phase>
134                         <goals>
135                             <goal>build</goal>
136                         </goals>
137                     </execution>
138
139                     <execution>
140                         <id>push-images</id>
141                         <phase>deploy</phase>
142                         <goals>
143                             <goal>push</goal>
144                         </goals>
145                         <configuration>
146                             <image>${docker.namespace}/${docker.image.name}</image>
147                         </configuration>
148                     </execution>
149                 </executions>
150             </plugin>
151         </plugins>
152     </build>
153 </project>