Set version to 6.0.0
[cli.git] / deployment / docker / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     Copyright 2017 Huawei Technologies Co., Ltd.
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 <project xmlns="http://maven.apache.org/POM/4.0.0"
18          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
20          http://maven.apache.org/xsd/maven-4.0.0.xsd">
21     <modelVersion>4.0.0</modelVersion>
22
23     <parent>
24         <groupId>org.onap.cli</groupId>
25         <artifactId>cli-deployment</artifactId>
26         <version>6.0.0-SNAPSHOT</version>
27     </parent>
28
29     <artifactId>cli-docker</artifactId>
30     <name>cli/deployment/docker</name>
31     <version>6.0.0-SNAPSHOT</version>
32     <packaging>pom</packaging>
33
34   <properties>
35         <docker.image.name>onap/cli</docker.image.name>
36         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
37         <docker.push.registry></docker.push.registry>
38         <skip.docker.build>true</skip.docker.build>
39         <skip.docker.tag>true</skip.docker.tag>
40         <skip.docker.push>true</skip.docker.push>
41   </properties>
42
43     <build>
44         <plugins>
45             <plugin>
46                 <groupId>com.spotify</groupId>
47                 <artifactId>docker-maven-plugin</artifactId>
48                 <version>0.4.11</version>
49                 <configuration>
50                     <verbose>true</verbose>
51                     <imageName>${docker.image.name}</imageName>
52                     <serverId>docker-hub</serverId>
53                     <dockerDirectory>${basedir}/src/main/docker</dockerDirectory>
54                     <resources>
55                         <resource>
56                             <targetPath>/STAGE</targetPath>
57                             <directory>${basedir}/../zip/target/deployunzip</directory>
58                             <includes>
59                                 <include>**/*</include>
60                             </includes>
61                         </resource>
62                         <resource>
63                             <targetPath>/STAGE/http</targetPath>
64                             <directory>${basedir}/../http/</directory>
65                             <includes>
66                                 <include>**/*</include>
67                             </includes>
68                         </resource>
69                         <resource>
70                             <targetPath>/STAGE/installer</targetPath>
71                             <directory>${basedir}/../zip/target/deployoutput</directory>
72                             <includes>
73                                 <include>**/*</include>
74                             </includes>
75                         </resource>
76                     </resources>
77                 </configuration>
78                 <executions>
79                     <execution>
80                         <id>build-image</id>
81                         <phase>package</phase>
82                         <goals>
83                             <goal>build</goal>
84                         </goals>
85                         <configuration>
86                             <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
87                         </configuration>
88                     </execution>
89                     <execution>
90                         <id>tag-image-timestamped-version</id>
91                         <phase>deploy</phase>
92                         <goals>
93                             <goal>tag</goal>
94                         </goals>
95                         <configuration>
96                             <image>${docker.image.name}</image>
97                             <newName>${docker.push.registry}/${docker.image.name}:${project.version}-${maven.build.timestamp}</newName>
98                             <pushImage>${skip.docker.push}</pushImage>
99                             <skipDockerTag>${skip.docker.tag}</skipDockerTag>
100                         </configuration>
101                     </execution>
102                     <execution>
103                         <id>tag-image-project-version</id>
104                         <phase>deploy</phase>
105                         <goals>
106                             <goal>tag</goal>
107                         </goals>
108                         <configuration>
109                             <image>${docker.image.name}</image>
110                             <newName>${docker.push.registry}/${docker.image.name}:${project.version}</newName>
111                             <pushImage>${skip.docker.push}</pushImage>
112                             <skipDockerTag>${skip.docker.tag}</skipDockerTag>
113                         </configuration>
114                     </execution>
115                     <execution>
116                         <id>tag-image-latest-version</id>
117                         <phase>deploy</phase>
118                         <goals>
119                             <goal>tag</goal>
120                         </goals>
121                         <configuration>
122                             <image>${docker.image.name}</image>
123                             <newName>${docker.push.registry}/${docker.image.name}:latest</newName>
124                             <pushImage>${skip.docker.push}</pushImage>
125                             <skipDockerTag>${skip.docker.tag}</skipDockerTag>
126                         </configuration>
127                     </execution>
128                 </executions>
129             </plugin>
130         </plugins>
131     </build>
132 </project>