[MSO-8] Update the maven dependency
[so.git] / packages / docker / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3         <modelVersion>4.0.0</modelVersion>
4
5         <parent>
6                 <groupId>org.openecomp.mso</groupId>
7                 <artifactId>packages</artifactId>
8                 <version>1.1.0-SNAPSHOT</version>
9         </parent>
10
11         <packaging>pom</packaging>
12         <groupId>org.openecomp.mso</groupId>
13         <artifactId>docker</artifactId>
14
15         <name>MSO Docker Deliveries</name>
16         <description>OpenECOMP MSO Docker Deliveries</description>
17
18         <properties>
19                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21                 <!-- If the maven profile "docker" is specified the parameter -Dmso.git.url=<MsoGitRepo> must be provided
22                      i.e: mvn clean install -P docker -Dmso.git.url=https://gerrit.openecomp.org/r-->
23                 <mso.chef.git.url.prefix>${env.GIT_NO_PROJECT}</mso.chef.git.url.prefix>
24                 <mso.chef.git.branchname>master</mso.chef.git.branchname>
25                 <mso.chef.git.url.suffix.chef.repo>mso/chef-repo</mso.chef.git.url.suffix.chef.repo>
26                 <mso.chef.git.url.suffix.chef.config>mso/mso-config</mso.chef.git.url.suffix.chef.config>
27                 <mso.project.version>${project.version}</mso.project.version>
28         </properties>
29
30         <build>
31                 <finalName>${project.artifactId}-${project.version}</finalName>
32                 <plugins>
33                     <plugin>
34                 <groupId>org.codehaus.groovy.maven</groupId>
35                 <artifactId>gmaven-plugin</artifactId>
36                 <executions>
37                   <execution>
38                     <phase>validate</phase>
39                     <goals>
40                       <goal>execute</goal>
41                     </goals>
42                     <configuration>
43                       <source>
44                         println project.properties['mso.project.version'];
45                         def versionArray;
46                         if ( project.properties['mso.project.version'] != null ) {
47                             versionArray = project.properties['mso.project.version'].split('\\.');
48                         } 
49
50                         if ( project.properties['mso.project.version'].endsWith("-SNAPSHOT") ) {
51                             project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
52                         } else {
53                             project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
54                         }
55
56                         println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
57                       </source>
58                     </configuration>
59                   </execution>
60               </executions>
61             </plugin>
62             
63                         <plugin>
64                                 <groupId>org.apache.maven.plugins</groupId>
65                                 <artifactId>maven-scm-plugin</artifactId>
66                                 <version>1.9.5</version>
67                                 <executions>
68                                         <execution>
69                                                 <id>chef-repo-checkout</id>
70                                                 <goals>
71                                                         <goal>checkout</goal>
72                                                 </goals>
73                                                 <phase>initialize</phase>
74                                                 <configuration>
75                                                         <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.repo}</connectionUrl>
76                                                         <checkoutDirectory>src/main/docker/docker-files/chef-configs/chef-repo</checkoutDirectory>
77                                                         <scmVersion>${mso.chef.git.branchname}</scmVersion>
78                                                         <scmVersionType>branch</scmVersionType>
79                                                         <skipCheckoutIfExists>true</skipCheckoutIfExists>
80                                                         <pushChanges>false</pushChanges>
81                                                 </configuration>
82                                         </execution>
83                                         <execution>
84                                                 <id>mso-config-checkout</id>
85                                                 <goals>
86                                                         <goal>checkout</goal>
87                                                 </goals>
88                                                 <phase>initialize</phase>
89                                                 <configuration>
90                                                         <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.config}</connectionUrl>
91                                                         <checkoutDirectory>src/main/docker/docker-files/chef-configs/mso-config</checkoutDirectory>
92                                                         <scmVersion>${mso.chef.git.branchname}</scmVersion>
93                                                         <scmVersionType>branch</scmVersionType>
94                                                         <skipCheckoutIfExists>true</skipCheckoutIfExists>
95                                                         <pushChanges>false</pushChanges>
96                                                 </configuration>
97                                         </execution>
98                                 </executions>
99                         </plugin>
100                         <plugin>
101                                 <groupId>io.fabric8</groupId>
102                                 <artifactId>docker-maven-plugin</artifactId>
103                                 <version>0.16.5</version>
104
105                                 <configuration>
106                                         <verbose>true</verbose>
107                                         <apiVersion>1.23</apiVersion>
108
109                                         <images>
110                                                 <image>
111                                                         <name>openecomp/jacoco:1.0</name>
112                                                         <alias>jacoco</alias>
113                                                         <build>
114                                                                 <cleanup>try</cleanup>
115                                                                 <dockerFileDir>docker-files</dockerFileDir>
116                                                                 <dockerFile>docker-files/Dockerfile.jacoco</dockerFile>
117
118                                                         </build>
119                                                 </image>
120                                                 <image>
121                                                         <name>openecomp/ubuntu-update:1.0</name>
122                                                         <alias>ubuntu-update</alias>
123                                                         <build>
124
125                                                                 <cleanup>try</cleanup>
126                                                                 <dockerFileDir>docker-files</dockerFileDir>
127                                                                 <dockerFile>docker-files/Dockerfile.ubuntu-16.04-update</dockerFile>
128
129                                                         </build>
130                                                 </image>
131                                                 <image>
132                                                         <name>openecomp/wildfly:1.0</name>
133                                                         <alias>wildfly</alias>
134                                                         <build>
135
136                                                                 <cleanup>try</cleanup>
137                                                                 <dockerFileDir>docker-files</dockerFileDir>
138                                                                 <dockerFile>docker-files/Dockerfile.wildfly-10</dockerFile>
139
140                                                         </build>
141                                                 </image>
142                                                 <image>
143                                                         <name>openecomp/mso-arquillian:%l</name>
144                                                         <alias>mso-arquillian</alias>
145                                                         <build>
146                                                                 <tags>
147                                                                     <tag>${project.docker.latesttag.version}</tag>
148                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
149                                                                 </tags>
150                                                                 <cleanup>try</cleanup>
151                                                                 <dockerFileDir>docker-files</dockerFileDir>
152                                                                 <dockerFile>docker-files/Dockerfile.mso-arquillian</dockerFile>
153
154                                                         </build>
155                                                 </image>
156                                                 <image>
157                                                         <name>openecomp/mso:%l</name>
158                                                         <alias>mso</alias>
159                                                         <build>
160                                                                 <tags>
161                                                                     <tag>${project.docker.latesttag.version}</tag>
162                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
163                                                                 </tags>
164                                                                 <cleanup>try</cleanup>
165                                                                 <dockerFileDir>docker-files</dockerFileDir>
166                                                                 <dockerFile>docker-files/Dockerfile.mso-chef-final</dockerFile>
167                                                                 <assembly>
168                                                                         <basedir>/</basedir>
169
170                                                                         <user>jboss:jboss:jboss</user>
171                                                                         <basedir>/opt/jboss/wildfly/standalone/deployments</basedir>
172                                                                         <descriptor>../../../../deliveries/src/main/assembly/war-pack/mso-wars.xml</descriptor>
173                                                                 </assembly>
174                                                         </build>
175                                                 </image>
176
177                                         </images>
178                                 </configuration>
179                                 <executions>
180                                         <execution>
181                                                 <id>clean-images</id>
182                                                 <phase>pre-clean</phase>
183                                                 <goals>
184                                                         <goal>remove</goal>
185                                                 </goals>
186                                                 <configuration>
187                                                         <removeAll>true</removeAll>
188                                                         <image>openecomp/mso-arquillian:%l,openecomp/mso:%l</image>
189                                                 </configuration>
190                                         </execution>
191
192                                         <execution>
193                                                 <id>generate-images</id>
194                                                 <phase>generate-sources</phase>
195                                                 <goals>
196                                                         <goal>build</goal>
197                                                 </goals>
198                                         </execution>
199
200                                         <execution>
201                                                 <id>push-images</id>
202                                                 <phase>deploy</phase>
203                                                 <goals>
204                                                         <goal>build</goal>
205                                                         <goal>push</goal>
206                                                 </goals>
207                                                 <configuration>
208                                                         <image>openecomp/mso-arquillian:%l,openecomp/mso:%l,openecomp/jacoco:1.0</image>
209                                                 </configuration>
210                                         </execution>
211                                 </executions>
212
213                         </plugin>
214
215                         <plugin>
216                                 <groupId>org.apache.maven.plugins</groupId>
217                                 <artifactId>maven-deploy-plugin</artifactId>
218                                 <version>2.8</version>
219                                 <configuration>
220                                         <skip>true</skip>
221                                 </configuration>
222                         </plugin>
223                 </plugins>
224         </build>
225
226 </project>