blob: bf5b2e3ccbb760d8b72b04270684c605094e2b8d [file] [log] [blame]
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2021 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
24 <modelVersion>4.0.0</modelVersion>
25
26 <parent>
27 <groupId>org.onap.policy.clamp</groupId>
28 <artifactId>clamp-packages</artifactId>
liamfallon9fa11a02022-05-03 17:22:19 +010029 <version>6.3.0-SNAPSHOT</version>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010030 </parent>
31
32 <packaging>pom</packaging>
33 <artifactId>policy-clamp-docker</artifactId>
34 <name>${project.artifactId}</name>
35 <description>Policy clamp docker image</description>
36
37 <properties>
38 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
40 <dist.project.version>${project.version}</dist.project.version>
41 <docker.skip>false</docker.skip>
42 <docker.skip.build>false</docker.skip.build>
43 <docker.skip.push>false</docker.skip.push>
44 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
45 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
46 <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>
53 <groupId>org.codehaus.groovy.maven</groupId>
54 <artifactId>gmaven-plugin</artifactId>
55 <version>1.0</version>
56 <executions>
57 <execution>
58 <phase>validate</phase>
59 <goals>
60 <goal>execute</goal>
61 </goals>
62 <configuration>
63 <source>
64 println 'Project version: ' + project.properties['dist.project.version']
65 if (project.properties['dist.project.version'] != null) {
66 def versionArray = project.properties['dist.project.version'].split('-')
67 def minMaxVersionArray = versionArray[0].tokenize('.')
68 if (project.properties['dist.project.version'].endsWith("-SNAPSHOT")) {
69 project.properties['project.docker.latest.minmax.tag.version'] =
70 minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-SNAPSHOT-latest"
71 } else {
72 project.properties['project.docker.latest.minmax.tag.version'] =
73 minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-STAGING-latest"
74 }
75 println 'New tag for docker: ' + project.properties['project.docker.latest.minmax.tag.version']
76 }
77 </source>
78 </configuration>
79 </execution>
80 </executions>
81 </plugin>
82
83 <plugin>
84 <groupId>io.fabric8</groupId>
85 <artifactId>docker-maven-plugin</artifactId>
86
87 <configuration>
88 <verbose>true</verbose>
89 <apiVersion>1.23</apiVersion>
90 <pullRegistry>${docker.pull.registry}</pullRegistry>
91 <pushRegistry>${docker.push.registry}</pushRegistry>
92
93 <images>
94 <image>
liamfallon43098042022-01-25 19:55:43 +000095 <name>onap/policy-clamp-runtime-acm</name>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010096 <build>
97 <cleanup>try</cleanup>
liamfallon43098042022-01-25 19:55:43 +000098 <dockerFile>AcmRuntimeDockerfile</dockerFile>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010099 <tags>
100 <tag>${project.version}</tag>
101 <tag>${project.version}-${maven.build.timestamp}</tag>
102 <tag>${project.docker.latest.minmax.tag.version}</tag>
103 </tags>
104 <assembly>
105 <inline>
106 <dependencySets>
107 <dependencySet>
108 <includes>
109 <include>org.onap.policy.clamp:policy-clamp-tarball</include>
110 </includes>
111 <outputDirectory>/lib</outputDirectory>
liamfallon43098042022-01-25 19:55:43 +0000112 <outputFileNameMapping>policy-clamp-runtime-acm.tar.gz</outputFileNameMapping>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +0100113 </dependencySet>
FrancescoFioraEst252a4bb2021-07-23 15:53:46 +0100114 <dependencySet>
115 <includes>
liamfallon43098042022-01-25 19:55:43 +0000116 <include>org.onap.policy.clamp:policy-clamp-runtime-acm</include>
FrancescoFioraEst252a4bb2021-07-23 15:53:46 +0100117 </includes>
118 <outputFileNameMapping>app.jar</outputFileNameMapping>
119 </dependencySet>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +0100120 </dependencySets>
121 </inline>
122 </assembly>
123 </build>
124 </image>
125 <image>
liamfallon43098042022-01-25 19:55:43 +0000126 <name>onap/policy-clamp-ac-pf-ppnt</name>
127 <alias>onap-policy-clamp-ac-pf-ppnt</alias>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +0100128 <build>
129 <cleanup>try</cleanup>
130 <dockerFile>PolicyParticipantDockerfile</dockerFile>
131 <tags>
132 <tag>${project.version}</tag>
133 <tag>${project.version}-${maven.build.timestamp}</tag>
134 <tag>${project.docker.latest.minmax.tag.version}</tag>
135 </tags>
136 <assembly>
137 <inline>
138 <dependencySets>
139 <dependencySet>
140 <includes>
141 <include>org.onap.policy.clamp:policy-clamp-tarball</include>
142 </includes>
143 <outputDirectory>/lib</outputDirectory>
144 <outputFileNameMapping>policy-participant.tar.gz</outputFileNameMapping>
145 </dependencySet>
146 <dependencySet>
147 <includes>
148 <include>org.onap.policy.clamp.participant:policy-clamp-participant-impl-policy</include>
149 </includes>
150 <outputFileNameMapping>app.jar</outputFileNameMapping>
151 </dependencySet>
152 </dependencySets>
153 </inline>
154 </assembly>
155 </build>
156 </image>
157 <image>
liamfallon43098042022-01-25 19:55:43 +0000158 <name>onap/policy-clamp-ac-k8s-ppnt</name>
159 <alias>onap-policy-clamp-ac-k8s-ppnt</alias>
rameshiyer279ab7dc72021-07-07 08:02:55 +0100160 <build>
161 <cleanup>try</cleanup>
162 <dockerFile>KubernetesParticipantDockerfile</dockerFile>
163 <tags>
164 <tag>${project.version}</tag>
165 <tag>${project.version}-${maven.build.timestamp}</tag>
166 <tag>${project.docker.latest.minmax.tag.version}</tag>
167 </tags>
168 <assembly>
169 <inline>
170 <dependencySets>
171 <dependencySet>
172 <includes>
173 <include>org.onap.policy.clamp:policy-clamp-tarball</include>
174 </includes>
175 <outputDirectory>/lib</outputDirectory>
176 <outputFileNameMapping>kubernetes-participant.tar.gz</outputFileNameMapping>
177 </dependencySet>
178 <dependencySet>
179 <includes>
180 <include>org.onap.policy.clamp.participant:policy-clamp-participant-impl-kubernetes</include>
181 </includes>
182 <outputFileNameMapping>app.jar</outputFileNameMapping>
183 </dependencySet>
184 </dependencySets>
185 </inline>
186 </assembly>
187 </build>
188 </image>
189 <image>
liamfallon43098042022-01-25 19:55:43 +0000190 <name>onap/policy-clamp-ac-http-ppnt</name>
191 <alias>onap-policy-clamp-ac-http-ppnt</alias>
rameshiyer27befb22b2021-09-06 12:16:56 +0100192 <build>
193 <cleanup>try</cleanup>
194 <dockerFile>HttpParticipantDockerfile</dockerFile>
195 <tags>
196 <tag>${project.version}</tag>
197 <tag>${project.version}-${maven.build.timestamp}</tag>
198 <tag>${project.docker.latest.minmax.tag.version}</tag>
199 </tags>
200 <assembly>
201 <inline>
202 <dependencySets>
203 <dependencySet>
204 <includes>
205 <include>org.onap.policy.clamp:policy-clamp-tarball</include>
206 </includes>
207 <outputDirectory>/lib</outputDirectory>
208 <outputFileNameMapping>http-participant.tar.gz</outputFileNameMapping>
209 </dependencySet>
210 <dependencySet>
211 <includes>
212 <include>org.onap.policy.clamp.participant:policy-clamp-participant-impl-http</include>
213 </includes>
214 <outputFileNameMapping>app.jar</outputFileNameMapping>
215 </dependencySet>
216 </dependencySets>
217 </inline>
218 </assembly>
219 </build>
220 </image>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +0100221 </images>
222 </configuration>
223
224 <executions>
225 <execution>
226 <id>clean-images</id>
227 <phase>pre-clean</phase>
228 <goals>
229 <goal>remove</goal>
230 </goals>
231 <configuration>
232 <removeAll>true</removeAll>
233 </configuration>
234 </execution>
235
236 <execution>
237 <id>generate-images</id>
238 <phase>generate-sources</phase>
239 <goals>
240 <goal>build</goal>
241 </goals>
242 </execution>
243
244 <execution>
245 <id>push-images</id>
246 <phase>deploy</phase>
247 <goals>
248 <goal>build</goal>
249 <goal>push</goal>
250 </goals>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +0100251 </execution>
252 </executions>
253 </plugin>
254
255 <plugin>
256 <groupId>org.apache.maven.plugins</groupId>
257 <artifactId>maven-deploy-plugin</artifactId>
258 <configuration>
259 <skip>true</skip>
260 </configuration>
261 </plugin>
262 </plugins>
263 </build>
264
265 <dependencies>
266 <dependency>
267 <groupId>org.onap.policy.clamp</groupId>
268 <artifactId>policy-clamp-tarball</artifactId>
269 <version>${project.version}</version>
270 <classifier>tarball</classifier>
271 <type>tar.gz</type>
272 </dependency>
273 <dependency>
274 <groupId>org.onap.policy.clamp.participant</groupId>
275 <artifactId>policy-clamp-participant-impl-policy</artifactId>
276 <version>${project.version}</version>
277 </dependency>
278 <dependency>
279 <groupId>org.onap.policy.clamp.participant</groupId>
rameshiyer279ab7dc72021-07-07 08:02:55 +0100280 <artifactId>policy-clamp-participant-impl-kubernetes</artifactId>
281 <version>${project.version}</version>
282 </dependency>
rameshiyer27befb22b2021-09-06 12:16:56 +0100283 <dependency>
284 <groupId>org.onap.policy.clamp.participant</groupId>
285 <artifactId>policy-clamp-participant-impl-http</artifactId>
286 <version>${project.version}</version>
287 </dependency>
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +0100288 </dependencies>
289</project>