blob: 219aa48db6474b3ade75eeaf4ffae03fc755503a [file] [log] [blame]
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -05001<!--
2 ============LICENSE_START=======================================================
Pamela Dragosh60592582021-02-24 07:16:07 -05003 Copyright (C) 2019,2021 AT&T Intellectual Property. All rights reserved.
Rashmi Pujar5f919672022-02-04 21:49:30 -05004 Modifications Copyright (C) 2020-2022 Bell Canada.
danielhanrahan3c97dd42022-05-17 15:37:02 +01005 Modifications Copyright (C) 2022 Nordix Foundation.
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -05006 ================================================================================
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
23<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25
26 <modelVersion>4.0.0</modelVersion>
27
28 <parent>
29 <groupId>org.onap.policy.api</groupId>
Ram Krishna Verma1d4ce8d2020-02-05 16:28:33 -050030 <artifactId>api-packages</artifactId>
liamfallonbe1caa42022-05-03 17:21:48 +010031 <version>2.7.0-SNAPSHOT</version>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050032 </parent>
33
34 <packaging>pom</packaging>
35 <artifactId>policy-api-docker</artifactId>
Ram Krishna Verma1d4ce8d2020-02-05 16:28:33 -050036 <name>${project.artifactId}</name>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050037 <description>Policy api docker image</description>
38
39 <properties>
40 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
42 <dist.project.version>${project.version}</dist.project.version>
43 <docker.skip>false</docker.skip>
44 <docker.skip.build>false</docker.skip.build>
45 <docker.skip.push>false</docker.skip.push>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050046 <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
47 </properties>
48
49 <build>
50 <finalName>${project.artifactId}-${project.version}</finalName>
51 <plugins>
52 <plugin>
Taka Cho477b30c2021-08-09 14:35:06 -040053 <groupId>org.codehaus.gmaven</groupId>
54 <artifactId>groovy-maven-plugin</artifactId>
55 <version>2.1.1</version>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050056 <executions>
57 <execution>
58 <phase>validate</phase>
59 <goals>
60 <goal>execute</goal>
61 </goals>
62 <configuration>
Taka Cho477b30c2021-08-09 14:35:06 -040063 <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050064 </configuration>
65 </execution>
66 </executions>
67 </plugin>
68
69 <plugin>
70 <groupId>io.fabric8</groupId>
71 <artifactId>docker-maven-plugin</artifactId>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050072
73 <configuration>
74 <verbose>true</verbose>
75 <apiVersion>1.23</apiVersion>
76 <pullRegistry>${docker.pull.registry}</pullRegistry>
77 <pushRegistry>${docker.push.registry}</pushRegistry>
78
79 <images>
80 <image>
81 <name>onap/policy-api</name>
82 <build>
83 <cleanup>try</cleanup>
danielhanrahan3c97dd42022-05-17 15:37:02 +010084 <dockerFile>${dockerFile}</dockerFile>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050085 <tags>
86 <tag>${project.version}</tag>
87 <tag>${project.version}-${maven.build.timestamp}</tag>
Rashmi Pujar11e73492019-06-07 15:48:40 -040088 <tag>${project.docker.latest.minmax.tag.version}</tag>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050089 </tags>
90 <assembly>
91 <inline>
92 <dependencySets>
93 <dependencySet>
94 <includes>
95 <include>org.onap.policy.api:policy-api-tarball</include>
96 </includes>
97 <outputDirectory>/lib</outputDirectory>
98 <outputFileNameMapping>policy-api.tar.gz</outputFileNameMapping>
99 </dependencySet>
Rashmi Pujar5f919672022-02-04 21:49:30 -0500100 <dependencySet>
101 <includes>
102 <include>org.onap.policy.api:api-main</include>
103 </includes>
104 <outputFileNameMapping>api.jar</outputFileNameMapping>
105 </dependencySet>
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -0500106 </dependencySets>
107 </inline>
108 </assembly>
109 </build>
110 </image>
111 </images>
112 </configuration>
113
114 <executions>
115 <execution>
116 <id>clean-images</id>
117 <phase>pre-clean</phase>
118 <goals>
119 <goal>remove</goal>
120 </goals>
121 <configuration>
122 <removeAll>true</removeAll>
123 </configuration>
124 </execution>
125
126 <execution>
127 <id>generate-images</id>
128 <phase>generate-sources</phase>
129 <goals>
130 <goal>build</goal>
131 </goals>
132 </execution>
133
134 <execution>
135 <id>push-images</id>
136 <phase>deploy</phase>
137 <goals>
138 <goal>build</goal>
139 <goal>push</goal>
140 </goals>
141 <configuration>
142 <image>onap/policy-api</image>
143 </configuration>
144 </execution>
145 </executions>
146 </plugin>
147
148 <plugin>
149 <groupId>org.apache.maven.plugins</groupId>
150 <artifactId>maven-deploy-plugin</artifactId>
151 <configuration>
152 <skip>true</skip>
153 </configuration>
154 </plugin>
155 </plugins>
156 </build>
157
158 <dependencies>
159 <dependency>
160 <groupId>org.onap.policy.api</groupId>
161 <artifactId>policy-api-tarball</artifactId>
162 <version>${project.version}</version>
163 <classifier>tarball</classifier>
164 <type>tar.gz</type>
165 </dependency>
166 </dependencies>
danielhanrahan3c97dd42022-05-17 15:37:02 +0100167</project>