blob: fcfdcce2dc0bc4a10c894545231b40c9cb984a62 [file] [log] [blame]
Dmitry Puzikov7830af02019-03-27 13:55:13 +01001<!--
2 ============LICENSE_START=======================================================
Dmitry Puzikovc8e918d2019-04-02 10:05:05 +02003 Copyright (C) 2019 Ericsson, Tieto. All rights reserved.
Jim Hahn0fe23332020-01-13 16:36:38 -05004 Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
danielhanrahancf99a6b2022-06-28 17:39:32 +01005 Modifications Copyright (C) 2022 Nordix Foundation.
Dmitry Puzikov7830af02019-03-27 13:55:13 +01006 ================================================================================
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
liamfallon18c442a2022-07-31 19:12:28 +010023<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">
Dmitry Puzikov7830af02019-03-27 13:55:13 +010024
25 <modelVersion>4.0.0</modelVersion>
26
27 <parent>
28 <groupId>org.onap.policy.docker</groupId>
Jim Hahn0fe23332020-01-13 16:36:38 -050029 <artifactId>policy-jre</artifactId>
liamfallon73252ab2022-05-03 17:21:35 +010030 <version>2.5.0-SNAPSHOT</version>
Dmitry Puzikov7830af02019-03-27 13:55:13 +010031 </parent>
32
33 <packaging>pom</packaging>
Jim Hahn0fe23332020-01-13 16:36:38 -050034 <artifactId>policy-jre-alpine</artifactId>
35 <name>Policy alpine jre docker image</name>
36 <description>Policy alpine jre docker image</description>
Dmitry Puzikov7830af02019-03-27 13:55:13 +010037
liamfallon4fe6a2e2021-04-19 14:10:43 +010038 <properties>
39 <docker.jre.imagename>onap/policy-jre-alpine</docker.jre.imagename>
liamfallon18c442a2022-07-31 19:12:28 +010040 <integration.java.name>onap/integration-java11</integration.java.name>
41 <integration.java.version>9.0.0</integration.java.version>
liamfallon4fe6a2e2021-04-19 14:10:43 +010042 </properties>
43
liamfallon18c442a2022-07-31 19:12:28 +010044 <profiles>
45 <profile>
46 <!-- This profile is activated on Apple M1 architecture to generate the ONAP base images locally -->
47 <id>baseImage</id>
48 <activation>
49 <os>
50 <arch>aarch64</arch>
51 </os>
52 </activation>
53 <build>
54 <plugins>
55 <plugin>
liamfallon85c73752022-09-08 17:32:59 +010056 <groupId>org.apache.maven.plugins</groupId>
57 <artifactId>maven-scm-plugin</artifactId>
58 <version>1.13.0</version>
59 <dependencies>
60 <dependency>
61 <groupId>org.codehaus.plexus</groupId>
62 <artifactId>plexus-utils</artifactId>
63 <version>3.4.2</version>
64 </dependency>
65 <dependency>
66 <groupId>org.apache.maven.scm</groupId>
67 <artifactId>maven-scm-provider-gitexe</artifactId>
68 <version>1.13.0</version>
69 </dependency>
70 </dependencies>
71 <configuration>
72 <connectionType>connection</connectionType>
73 <checkoutDirectory>src/main/resources/meta</checkoutDirectory>
74 </configuration>
75 <executions>
76 <execution>
77 <id>checkout-onap-python</id>
78 <phase>validate</phase>
79 <configuration>
80 <connectionUrl>scm:git:https://gerrit.onap.org/r/integration/docker/onap-java11</connectionUrl>
81 <checkoutDirectory>${project.build.directory}/onap-java11</checkoutDirectory>
82 </configuration>
83 <goals>
84 <goal>checkout</goal>
85 </goals>
86 </execution>
87 </executions>
88 </plugin>
89 <plugin>
liamfallon18c442a2022-07-31 19:12:28 +010090 <groupId>io.fabric8</groupId>
91 <artifactId>docker-maven-plugin</artifactId>
92
93 <executions>
94 <execution>
95 <id>generate-base-image</id>
96 <phase>initialize</phase>
97 <configuration>
98 <verbose>true</verbose>
99 <apiVersion>1.23</apiVersion>
100 <pullRegistry>${docker.pull.registry}</pullRegistry>
101 <pushRegistry>${docker.push.registry}</pushRegistry>
102 <images>
103 <image>
104 <name>${integration.java.name}</name>
105 <build>
106 <cleanup>try</cleanup>
liamfallon85c73752022-09-08 17:32:59 +0100107 <contextDir>${project.build.directory}/onap-java11</contextDir>
liamfallon18c442a2022-07-31 19:12:28 +0100108 <dockerFile>BareAlpine.Dockerfile</dockerFile>
109 <tags>
110 <tag>${integration.java.version}</tag>
111 <tag>${integration.java.version}-${maven.build.timestamp}</tag>
112 <tag>${project.docker.latest.minmax.tag.version}</tag>
113 </tags>
114 </build>
115 </image>
116 </images>
117 </configuration>
118 <goals>
119 <goal>build</goal>
120 </goals>
121 </execution>
122 </executions>
123 </plugin>
124 </plugins>
125 </build>
126 </profile>
127 </profiles>
128
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100129 <build>
130 <finalName>${project.artifactId}-${project.version}</finalName>
131 <plugins>
132 <plugin>
Taka Cho446cd492021-08-10 13:38:45 -0400133 <groupId>org.codehaus.gmaven</groupId>
134 <artifactId>groovy-maven-plugin</artifactId>
135 <version>2.1.1</version>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100136 <executions>
137 <execution>
liamfallon18c442a2022-07-31 19:12:28 +0100138 <phase>prepare-package</phase>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100139 <goals>
140 <goal>execute</goal>
141 </goals>
142 <configuration>
Taka Cho446cd492021-08-10 13:38:45 -0400143 <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100144 </configuration>
145 </execution>
146 </executions>
147 </plugin>
148 <plugin>
danielhanrahancf99a6b2022-06-28 17:39:32 +0100149 <groupId>io.github.git-commit-id</groupId>
150 <artifactId>git-commit-id-maven-plugin</artifactId>
151 </plugin>
152 <plugin>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100153 <groupId>io.fabric8</groupId>
154 <artifactId>docker-maven-plugin</artifactId>
Jim Hahn0fe23332020-01-13 16:36:38 -0500155
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100156 <configuration>
157 <verbose>true</verbose>
158 <apiVersion>1.23</apiVersion>
159 <pullRegistry>${docker.pull.registry}</pullRegistry>
160 <pushRegistry>${docker.push.registry}</pushRegistry>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100161 <images>
162 <image>
liamfallon4fe6a2e2021-04-19 14:10:43 +0100163 <name>${docker.jre.imagename}</name>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100164 <build>
165 <cleanup>try</cleanup>
166 <dockerFile>Dockerfile</dockerFile>
167 <tags>
RossC3d168b02020-06-16 11:41:49 +0100168 <tag>${project.version}</tag>
169 <tag>${project.version}-${maven.build.timestamp}</tag>
Taka Cho446cd492021-08-10 13:38:45 -0400170 <tag>${project.docker.latest.minmax.tag.version}</tag>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100171 </tags>
liamfallon18c442a2022-07-31 19:12:28 +0100172 <args>
173 <INTEGRATION_JAVA_NAME>${integration.java.name}</INTEGRATION_JAVA_NAME>
174 <INTEGRATION_JAVA_VERSION>${integration.java.version}</INTEGRATION_JAVA_VERSION>
175 </args>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100176 </build>
177 </image>
178 </images>
179 </configuration>
180
181 <executions>
182 <execution>
liamfallon18c442a2022-07-31 19:12:28 +0100183 <id>clean-jre-image</id>
184 <phase>prepare-package</phase>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100185 <goals>
186 <goal>remove</goal>
187 </goals>
188 <configuration>
189 <removeAll>true</removeAll>
190 </configuration>
191 </execution>
192
193 <execution>
liamfallon18c442a2022-07-31 19:12:28 +0100194 <id>generate-jre-image</id>
195 <phase>package</phase>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100196 <goals>
197 <goal>build</goal>
198 </goals>
199 </execution>
200
201 <execution>
liamfallon18c442a2022-07-31 19:12:28 +0100202 <id>push-jre-image</id>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100203 <phase>deploy</phase>
204 <goals>
205 <goal>build</goal>
206 <goal>push</goal>
207 </goals>
208 <configuration>
liamfallon4fe6a2e2021-04-19 14:10:43 +0100209 <image>${docker.jre.imagename}</image>
Dmitry Puzikov7830af02019-03-27 13:55:13 +0100210 </configuration>
211 </execution>
212 </executions>
213 </plugin>
214 <plugin>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-deploy-plugin</artifactId>
217 <configuration>
218 <skip>true</skip>
219 </configuration>
220 </plugin>
221 <plugin>
222 <groupId>org.apache.maven.plugins</groupId>
223 <artifactId>maven-install-plugin</artifactId>
224 <configuration>
225 <skip>true</skip>
226 </configuration>
227 </plugin>
228 </plugins>
229 </build>
liamfallon18c442a2022-07-31 19:12:28 +0100230</project>