5cc0f99d67488ec51da50435a865ad156177371a
[vnfsdk/refrepo.git] / vnfmarket-be / deployment / docker / docker-refrepo / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     Copyright 2017 Huawei Technologies Co., Ltd.
4     Copyright 2020 Nokia
5
6     Licensed under the Apache License, Version 2.0 (the "License");
7     you may not use this file except in compliance with the License.
8     You may obtain 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,
14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15     See the License for the specific language governing permissions and
16     limitations under the License.
17  -->
18 <project xmlns="http://maven.apache.org/POM/4.0.0"
19          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
21          http://maven.apache.org/xsd/maven-4.0.0.xsd">
22     <modelVersion>4.0.0</modelVersion>
23
24     <parent>
25         <groupId>org.onap.vnfsdk.refrepo</groupId>
26         <artifactId>vnfmarket-deployment</artifactId>
27         <version>1.6.3-SNAPSHOT</version>
28         <relativePath>../..</relativePath>
29     </parent>
30
31     <artifactId>vnfmarket-docker-refrepo</artifactId>
32     <name>vnfmarket/deployment/docker/refrepo</name>
33     <packaging>pom</packaging>
34     <version>1.6.3-SNAPSHOT</version>
35
36   <properties>
37         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
38         <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
39         <push.docker.image>true</push.docker.image>
40         <docker.skip>false</docker.skip>
41         <docker.noCache>true</docker.noCache>
42         <docker.skip.build>false</docker.skip.build>
43         <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily>
44   </properties>
45
46
47     <profiles>
48         <profile>
49             <id>docker</id>
50             <build>
51                 <plugins>
52                     <plugin>
53                         <groupId>com.spotify</groupId>
54                         <artifactId>docker-maven-plugin</artifactId>
55                         <version>1.0.0</version>
56                         <configuration>
57                             <verbose>true</verbose>
58                             <imageName>onap/vnfsdk/refrepo</imageName>
59                             <noCache>${docker.noCache}</noCache>
60                             <serverId>${onap.nexus.dockerregistry.daily}</serverId>
61                             <dockerDirectory>${basedir}/src/main/docker</dockerDirectory>
62                             <resources>
63                                 <resource>
64                                     <targetPath>/STAGE</targetPath>
65                                     <directory>${basedir}/../../zip/target/deployunzip</directory>
66                                     <includes>
67                                         <include>**/*</include>
68                                     </includes>
69                                 </resource>
70                             </resources>
71                         </configuration>
72                         <dependencies>
73                             <dependency>
74                                 <groupId>javax.activation</groupId>
75                                 <artifactId>javax.activation-api</artifactId>
76                                 <version>${javax.activation-api.version}</version>
77                             </dependency>
78                             <dependency>
79                                 <groupId>javax.xml.bind</groupId>
80                                 <artifactId>jaxb-api</artifactId>
81                                 <version>${jaxb-api.version}</version>
82                             </dependency>
83                         </dependencies>
84                         <executions>
85                             <execution>
86                                 <id>build-image</id>
87                                 <phase>package</phase>
88                                 <goals>
89                                     <goal>build</goal>
90                                 </goals>
91                                 <configuration>
92                                     <skipDockerBuild>false</skipDockerBuild>
93                                 </configuration>
94                             </execution>
95                             <execution>
96                                 <id>tag-image-timestamped-version</id>
97                                 <phase>package</phase>
98                                 <goals>
99                                     <goal>tag</goal>
100                                 </goals>
101                                 <configuration>
102                                     <image>onap/vnfsdk/refrepo</image>
103                                     <newName>${docker.push.registry}/onap/vnfsdk/refrepo:${project.version}-${maven.build.timestamp}</newName>
104                                     <pushImage>${push.docker.image}</pushImage>
105                                     <skipDockerTag>false</skipDockerTag>
106                                 </configuration>
107                             </execution>
108                             <execution>
109                                 <id>tag-image-latest-version</id>
110                                 <phase>package</phase>
111                                 <goals>
112                                     <goal>tag</goal>
113                                 </goals>
114                                 <configuration>
115                                     <image>onap/vnfsdk/refrepo</image>
116                                     <newName>${docker.push.registry}/onap/vnfsdk/refrepo:latest</newName>
117                                     <pushImage>${push.docker.image}</pushImage>
118                                     <skipDockerTag>false</skipDockerTag>
119                                 </configuration>
120                             </execution>
121
122                         </executions>
123                     </plugin>
124                 </plugins>
125             </build>
126         </profile>
127     </profiles>
128 </project>