Fix has docker build to conform to self-release
[optf/has.git] / conductor / pom.xml
1 <?xml version="1.0"?>
2 <!--
3     Copyright (c) 2018 Intel Corporation. All rights reserved.
4     Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
5
6     Licensed under the Apache License, Version 2.0 (the "License"); you may
7     not use this file except in compliance with the License. You may obtain
8     a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14     WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15     License for the specific language governing permissions and limitations
16     under the License.
17 -->
18 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20     <modelVersion>4.0.0</modelVersion>
21     <packaging>pom</packaging>
22
23     <parent>
24         <groupId>org.onap.optf.has</groupId>
25         <version>2.0.1-SNAPSHOT</version>
26         <artifactId>optf-has</artifactId>
27     </parent>
28
29     <groupId>org.onap.optf.has</groupId>
30     <artifactId>optf-has-conductor</artifactId>
31     <version>2.0.1-SNAPSHOT</version>
32
33     <name>optf-has-conductor</name>
34     <description>Homing Allocation Service/Conductor</description>
35     <build>
36         <plugins>
37             <plugin>
38                 <artifactId>exec-maven-plugin</artifactId>
39                 <groupId>org.codehaus.mojo</groupId>
40                 <executions>
41                     <execution>
42                         <id>tox-test</id>
43                         <phase>test</phase>
44                         <goals>
45                             <goal>exec</goal>
46                         </goals>
47                         <configuration>
48                             <executable>
49                                 ${session.executionRootDirectory}/sonar.sh
50                             </executable>
51                         </configuration>
52                     </execution>
53                 </executions>
54             </plugin>
55             <plugin>
56                 <artifactId>maven-assembly-plugin</artifactId>
57                 <configuration>
58                     <appendAssemblyId>false</appendAssemblyId>
59                     <descriptors>
60                         <descriptor>assembly.xml</descriptor>
61                     </descriptors>
62                 </configuration>
63                 <executions>
64                     <execution>
65                         <id>make-assembly</id>
66                         <phase>package</phase>
67                         <goals>
68                             <goal>single</goal>
69                         </goals>
70                     </execution>
71                 </executions>
72             </plugin>
73             <plugin>
74                                 <groupId>org.codehaus.groovy.maven</groupId>
75                                 <artifactId>gmaven-plugin</artifactId>
76                                 <version>1.0</version>
77                                 <executions>
78                                         <execution>
79                                                 <phase>validate</phase>
80                                                 <goals>
81                                                         <goal>execute</goal>
82                                                 </goals>
83                                                 <configuration>
84                                                         <source>${project.basedir}/../script/TagVersion.groovy</source>
85                                                 </configuration>
86                                         </execution>
87                                 </executions>
88                         </plugin>
89                         <plugin>
90                                 <groupId>io.fabric8</groupId>
91                                 <artifactId>docker-maven-plugin</artifactId>
92                                 <version>0.26.0</version>
93                                 <configuration>
94                                         <verbose>true</verbose>
95                                         <apiVersion>1.23</apiVersion>
96                                         <images>
97                                                 <image>
98                                                         <name>${image.namespace}</name>
99                                                         <alias>optf-has</alias>
100                                                         <build>
101                                                                 <cleanup>true</cleanup>
102                                                                 <tags>
103                                                                         <tag>latest</tag>
104                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
105                                                                         <tag>${project.docker.latesttag.version}</tag>
106                                                                 </tags>
107
108                                                                 <dockerFile>${project.basedir}/docker/Dockerfile</dockerFile>
109                                                                 <assembly>
110                                                                         <descriptor>${project.basedir}/docker/assembly/has-files.xml</descriptor>
111                                                                         <name>onap-has-tm</name>
112                                                                 </assembly>
113                                                                 <args>
114                                                                         <MVN_ARTIFACT_VERSION>${project.version}</MVN_ARTIFACT_VERSION>
115                                                                         <REPO>${project.repo}</REPO>
116                                                                 </args>
117                                                         </build>
118                                                 </image>
119                                         </images>
120                                 </configuration>
121                                 <executions>
122                                         <execution>
123                                                 <id>generate-images</id>
124                                                 <phase>install</phase>
125                                                 <goals>
126                                                         <goal>build</goal>
127                                                 </goals>
128                                         </execution>
129                                         <execution>
130                                                 <id>push-images</id>
131                                                 <phase>deploy</phase>
132                                                 <goals>
133                                                         <goal>build</goal>
134                                                         <goal>push</goal>
135                                                 </goals>
136                                                 <configuration>
137                                                         <image>${image.namespace}:%l</image>
138                                                 </configuration>
139                                         </execution>
140                                 </executions>
141                         </plugin>
142         </plugins>
143     </build>
144 </project>