Update snapshot and/or references of policy/docker to latest snapshots
[policy/docker.git] / policy-db-migrator / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2021-2022 Nordix Foundation
4   ================================================================================
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16
17   SPDX-License-Identifier: Apache-2.0
18   ============LICENSE_END=========================================================
19 -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <groupId>org.onap.policy.docker</groupId>
26         <artifactId>docker</artifactId>
27         <version>3.1.3-SNAPSHOT</version>
28     </parent>
29
30     <artifactId>policy-db-migrator</artifactId>
31     <packaging>pom</packaging>
32
33     <name>Policy db-migrator docker image</name>
34     <description>Policy db-migrator docker image.</description>
35
36     <properties>
37         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
39         <dist.project.version>${project.version}</dist.project.version>
40         <docker.skip>false</docker.skip>
41         <docker.skip.build>false</docker.skip.build>
42         <docker.skip.push>false</docker.skip.push>
43         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
44         <docker.dbm.imagename>onap/policy-db-migrator</docker.dbm.imagename>
45         <docker.dbm.dockerFile>Dockerfile</docker.dbm.dockerFile>
46         <docker.dbm.contextDir>${project.basedir}/src/main/docker</docker.dbm.contextDir>
47     </properties>
48
49     <build>
50         <finalName>${project.artifactId}-${project.version}</finalName>
51         <plugins>
52             <plugin>
53                 <groupId>org.codehaus.gmaven</groupId>
54                 <artifactId>groovy-maven-plugin</artifactId>
55                 <executions>
56                     <execution>
57                         <phase>validate</phase>
58                         <goals>
59                             <goal>execute</goal>
60                         </goals>
61                         <configuration>
62                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
63                         </configuration>
64                     </execution>
65                 </executions>
66             </plugin>
67             <plugin>
68                 <groupId>io.github.git-commit-id</groupId>
69                 <artifactId>git-commit-id-maven-plugin</artifactId>
70             </plugin>
71             <plugin>
72                 <groupId>io.fabric8</groupId>
73                 <artifactId>docker-maven-plugin</artifactId>
74                 <configuration>
75                     <verbose>true</verbose>
76                     <apiVersion>1.23</apiVersion>
77                     <pullRegistry>${docker.pull.registry}</pullRegistry>
78                     <pushRegistry>${docker.push.registry}</pushRegistry>
79                     <images>
80                         <image>
81                             <name>${docker.dbm.imagename}</name>
82                             <build>
83                                 <cleanup>try</cleanup>
84                                 <dockerFile>${docker.dbm.dockerFile}</dockerFile>
85                                 <contextDir>${docker.dbm.contextDir}</contextDir>
86                                 <tags>
87                                     <tag>${project.version}</tag>
88                                     <tag>${project.version}-${maven.build.timestamp}</tag>
89                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
90                                 </tags>
91                             </build>
92                         </image>
93                     </images>
94                 </configuration>
95
96                 <executions>
97                     <execution>
98                         <id>clean-images</id>
99                         <phase>pre-clean</phase>
100                         <goals>
101                             <goal>remove</goal>
102                         </goals>
103                         <configuration>
104                             <removeAll>true</removeAll>
105                         </configuration>
106                     </execution>
107
108                     <execution>
109                         <id>generate-images</id>
110                         <phase>generate-sources</phase>
111                         <goals>
112                             <goal>build</goal>
113                         </goals>
114                     </execution>
115
116                     <execution>
117                         <id>push-images</id>
118                         <phase>deploy</phase>
119                         <goals>
120                             <goal>build</goal>
121                             <goal>push</goal>
122                         </goals>
123                     </execution>
124                 </executions>
125             </plugin>
126             <plugin>
127                 <groupId>org.apache.maven.plugins</groupId>
128                 <artifactId>maven-deploy-plugin</artifactId>
129                 <configuration>
130                     <skip>true</skip>
131                 </configuration>
132             </plugin>
133             <plugin>
134                 <groupId>org.apache.maven.plugins</groupId>
135                 <artifactId>maven-install-plugin</artifactId>
136                 <configuration>
137                     <skip>true</skip>
138                 </configuration>
139             </plugin>
140         </plugins>
141     </build>
142 </project>