saul.gill | b7e9563 | 2024-04-26 09:24:48 +0100 | [diff] [blame^] | 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 | Modifications Copyright (C) 2022-2023 Nordix Foundation. |
| 7 | ================================================================================ |
| 8 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | you may not use this file except in compliance with the License. |
| 10 | You may obtain a copy of the License at |
| 11 | |
| 12 | http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | |
| 14 | Unless required by applicable law or agreed to in writing, software |
| 15 | distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | See the License for the specific language governing permissions and |
| 18 | limitations under the License. |
| 19 | |
| 20 | SPDX-License-Identifier: Apache-2.0 |
| 21 | ============LICENSE_END========================================================= |
| 22 | --> |
| 23 | <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"> |
| 24 | <modelVersion>4.0.0</modelVersion> |
| 25 | <parent> |
| 26 | <groupId>org.onap.policy.apex-pdp.packages</groupId> |
| 27 | <artifactId>apex-packages</artifactId> |
| 28 | <version>3.1.2-SNAPSHOT</version> |
| 29 | </parent> |
| 30 | |
| 31 | <artifactId>apex-pdp-docker</artifactId> |
| 32 | <packaging>pom</packaging> |
| 33 | <name>Policy APEX PDP - Docker build</name> |
| 34 | <description>ONAP Policy APEX PDP Docker Build</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 | <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir> |
| 44 | <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format> |
| 45 | </properties> |
| 46 | |
| 47 | <build> |
| 48 | <finalName>${project.artifactId}-${project.version}</finalName> |
| 49 | <plugins> |
| 50 | <plugin> |
| 51 | <groupId>org.codehaus.gmaven</groupId> |
| 52 | <artifactId>groovy-maven-plugin</artifactId> |
| 53 | <executions> |
| 54 | <execution> |
| 55 | <phase>validate</phase> |
| 56 | <goals> |
| 57 | <goal>execute</goal> |
| 58 | </goals> |
| 59 | <configuration> |
| 60 | <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source> |
| 61 | </configuration> |
| 62 | </execution> |
| 63 | </executions> |
| 64 | </plugin> |
| 65 | |
| 66 | <plugin> |
| 67 | <groupId>io.github.git-commit-id</groupId> |
| 68 | <artifactId>git-commit-id-maven-plugin</artifactId> |
| 69 | </plugin> |
| 70 | |
| 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>onap/policy-apex-pdp</name> |
| 82 | <build> |
| 83 | <cleanup>try</cleanup> |
| 84 | <dockerFile>${dockerFile}</dockerFile> |
| 85 | <contextDir>${docker.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 | <assembly> |
| 92 | <inline> |
| 93 | <dependencySets> |
| 94 | <dependencySet> |
| 95 | <includes> |
| 96 | <include>org.onap.policy.apex-pdp.packages:apex-pdp-package-full</include> |
| 97 | </includes> |
| 98 | <outputDirectory>.</outputDirectory> |
| 99 | <outputFileNameMapping>apex-pdp-package-full.tar.gz</outputFileNameMapping> |
| 100 | </dependencySet> |
| 101 | </dependencySets> |
| 102 | </inline> |
| 103 | </assembly> |
| 104 | </build> |
| 105 | </image> |
| 106 | </images> |
| 107 | </configuration> |
| 108 | <executions> |
| 109 | <execution> |
| 110 | <id>clean-images</id> |
| 111 | <phase>pre-clean</phase> |
| 112 | <goals> |
| 113 | <goal>remove</goal> |
| 114 | </goals> |
| 115 | <configuration> |
| 116 | <removeAll>true</removeAll> |
| 117 | </configuration> |
| 118 | </execution> |
| 119 | <execution> |
| 120 | <id>generate-images</id> |
| 121 | <phase>generate-sources</phase> |
| 122 | <goals> |
| 123 | <goal>build</goal> |
| 124 | </goals> |
| 125 | </execution> |
| 126 | <execution> |
| 127 | <id>push-images</id> |
| 128 | <phase>deploy</phase> |
| 129 | <goals> |
| 130 | <goal>build</goal> |
| 131 | <goal>push</goal> |
| 132 | </goals> |
| 133 | </execution> |
| 134 | </executions> |
| 135 | </plugin> |
| 136 | |
| 137 | <plugin> |
| 138 | <groupId>org.apache.maven.plugins</groupId> |
| 139 | <artifactId>maven-deploy-plugin</artifactId> |
| 140 | <configuration> |
| 141 | <skip>true</skip> |
| 142 | </configuration> |
| 143 | </plugin> |
| 144 | </plugins> |
| 145 | </build> |
| 146 | <dependencies> |
| 147 | <dependency> |
| 148 | <groupId>${project.groupId}</groupId> |
| 149 | <artifactId>apex-pdp-package-full</artifactId> |
| 150 | <version>${project.version}</version> |
| 151 | <type>tar.gz</type> |
| 152 | </dependency> |
| 153 | </dependencies> |
| 154 | </project> |