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