blob: 5303ce366a60451f922fa0916313caf64a811b0d [file] [log] [blame]
ChrisC025301d2017-01-31 11:40:03 +01001<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Anaël Clossonf15b97e2017-02-08 10:46:48 +01002 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
ChrisC025301d2017-01-31 11:40:03 +01003 <modelVersion>4.0.0</modelVersion>
4
5 <parent>
Arthur Martella22e015f2018-02-22 14:24:40 -05006 <groupId>org.onap.so</groupId>
ChrisC025301d2017-01-31 11:40:03 +01007 <artifactId>packages</artifactId>
Jessica Wagantall777f6372017-11-20 11:10:28 -08008 <version>1.2.0-SNAPSHOT</version>
ChrisC025301d2017-01-31 11:40:03 +01009 </parent>
10
11 <packaging>pom</packaging>
ChrisC025301d2017-01-31 11:40:03 +010012 <artifactId>docker</artifactId>
13
14 <name>MSO Docker Deliveries</name>
Anaël Closson5167cc22017-02-08 11:14:58 +010015 <description>OpenECOMP MSO Docker Deliveries</description>
ChrisC025301d2017-01-31 11:40:03 +010016
17 <properties>
18 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Alexis de Talhouët07efe432017-03-06 15:37:39 -050020 <!-- If the maven profile "docker" is specified the parameter -Dmso.git.url=<MsoGitRepo> must be provided
xg353yb6b7bef2017-04-11 13:30:42 +020021 i.e: mvn clean install -P docker -Dmso.git.url=https://gerrit.openecomp.org/r-->
22 <mso.chef.git.url.prefix>${env.GIT_NO_PROJECT}</mso.chef.git.url.prefix>
23 <mso.chef.git.branchname>master</mso.chef.git.branchname>
Rob Daugherty2c5310a2017-07-20 11:09:23 -040024 <mso.chef.git.url.suffix.chef.repo>so/chef-repo</mso.chef.git.url.suffix.chef.repo>
25 <mso.chef.git.url.suffix.chef.config>so/so-config</mso.chef.git.url.suffix.chef.config>
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070026 <mso.project.version>${project.version}</mso.project.version>
Rob Daughertyf5893182018-04-05 16:09:32 -040027 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
28 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
ChrisC025301d2017-01-31 11:40:03 +010029 </properties>
30
31 <build>
32 <finalName>${project.artifactId}-${project.version}</finalName>
33 <plugins>
xg353yb6b7bef2017-04-11 13:30:42 +020034 <plugin>
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070035 <groupId>org.codehaus.groovy.maven</groupId>
36 <artifactId>gmaven-plugin</artifactId>
Rob Daughertyb4473da2018-03-27 14:32:11 -040037 <version>1.0</version>
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070038 <executions>
39 <execution>
40 <phase>validate</phase>
41 <goals>
42 <goal>execute</goal>
43 </goals>
44 <configuration>
45 <source>
46 println project.properties['mso.project.version'];
47 def versionArray;
48 if ( project.properties['mso.project.version'] != null ) {
49 versionArray = project.properties['mso.project.version'].split('\\.');
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070050 }
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070051
52 if ( project.properties['mso.project.version'].endsWith("-SNAPSHOT") ) {
53 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
54 } else {
55 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
56 }
57
58 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
59 </source>
60 </configuration>
61 </execution>
62 </executions>
63 </plugin>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070064
ChrisC025301d2017-01-31 11:40:03 +010065 <plugin>
Anaël Closson13e0d022017-02-14 11:17:50 +010066 <groupId>org.apache.maven.plugins</groupId>
67 <artifactId>maven-scm-plugin</artifactId>
68 <version>1.9.5</version>
69 <executions>
70 <execution>
71 <id>chef-repo-checkout</id>
72 <goals>
73 <goal>checkout</goal>
74 </goals>
75 <phase>initialize</phase>
76 <configuration>
xg353yb6b7bef2017-04-11 13:30:42 +020077 <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.repo}</connectionUrl>
Anaël Closson13e0d022017-02-14 11:17:50 +010078 <checkoutDirectory>src/main/docker/docker-files/chef-configs/chef-repo</checkoutDirectory>
xg353yb6b7bef2017-04-11 13:30:42 +020079 <scmVersion>${mso.chef.git.branchname}</scmVersion>
Anaël Closson13e0d022017-02-14 11:17:50 +010080 <scmVersionType>branch</scmVersionType>
81 <skipCheckoutIfExists>true</skipCheckoutIfExists>
82 <pushChanges>false</pushChanges>
83 </configuration>
84 </execution>
85 <execution>
86 <id>mso-config-checkout</id>
87 <goals>
88 <goal>checkout</goal>
89 </goals>
90 <phase>initialize</phase>
91 <configuration>
xg353yb6b7bef2017-04-11 13:30:42 +020092 <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.config}</connectionUrl>
Anaël Closson13e0d022017-02-14 11:17:50 +010093 <checkoutDirectory>src/main/docker/docker-files/chef-configs/mso-config</checkoutDirectory>
xg353yb6b7bef2017-04-11 13:30:42 +020094 <scmVersion>${mso.chef.git.branchname}</scmVersion>
Anaël Closson13e0d022017-02-14 11:17:50 +010095 <scmVersionType>branch</scmVersionType>
96 <skipCheckoutIfExists>true</skipCheckoutIfExists>
97 <pushChanges>false</pushChanges>
98 </configuration>
99 </execution>
100 </executions>
101 </plugin>
102 <plugin>
ChrisC025301d2017-01-31 11:40:03 +0100103 <groupId>io.fabric8</groupId>
104 <artifactId>docker-maven-plugin</artifactId>
Rob Daughertyf5893182018-04-05 16:09:32 -0400105 <version>0.19.1</version>
ChrisC025301d2017-01-31 11:40:03 +0100106
107 <configuration>
108 <verbose>true</verbose>
109 <apiVersion>1.23</apiVersion>
Rob Daughertyf5893182018-04-05 16:09:32 -0400110 <pullRegistry>${docker.pull.registry}</pullRegistry>
111 <pushRegistry>${docker.push.registry}</pushRegistry>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100112
ChrisC025301d2017-01-31 11:40:03 +0100113 <images>
114 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100115 <name>openecomp/jacoco:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100116 <alias>jacoco</alias>
117 <build>
118 <cleanup>try</cleanup>
119 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertyf5893182018-04-05 16:09:32 -0400120 <dockerFile>Dockerfile.jacoco</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100121
ChrisC025301d2017-01-31 11:40:03 +0100122 </build>
123 </image>
124 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100125 <name>openecomp/ubuntu-update:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100126 <alias>ubuntu-update</alias>
127 <build>
128
129 <cleanup>try</cleanup>
130 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertyf5893182018-04-05 16:09:32 -0400131 <dockerFile>Dockerfile.ubuntu-16.04-update</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100132
ChrisC025301d2017-01-31 11:40:03 +0100133 </build>
134 </image>
135 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100136 <name>openecomp/wildfly:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100137 <alias>wildfly</alias>
138 <build>
139
140 <cleanup>try</cleanup>
141 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertyf5893182018-04-05 16:09:32 -0400142 <dockerFile>Dockerfile.wildfly-10</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100143
ChrisC025301d2017-01-31 11:40:03 +0100144 </build>
145 </image>
146 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100147 <name>openecomp/mso-arquillian:%l</name>
ChrisC025301d2017-01-31 11:40:03 +0100148 <alias>mso-arquillian</alias>
149 <build>
JulienBec3f8ddf2017-03-08 02:19:21 -0800150 <tags>
xg353yb6b7bef2017-04-11 13:30:42 +0200151 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -0800152 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
153 </tags>
ChrisC025301d2017-01-31 11:40:03 +0100154 <cleanup>try</cleanup>
155 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertyf5893182018-04-05 16:09:32 -0400156 <dockerFile>Dockerfile.mso-arquillian</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100157
ChrisC025301d2017-01-31 11:40:03 +0100158 </build>
159 </image>
160 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100161 <name>openecomp/mso:%l</name>
Arthur Martella2bcb1f22018-05-10 14:09:52 -0400162 <alias>onap/so:%1</alias>
ChrisC025301d2017-01-31 11:40:03 +0100163 <alias>mso</alias>
Arthur Martella2bcb1f22018-05-10 14:09:52 -0400164 <alias>so</alias>
ChrisC025301d2017-01-31 11:40:03 +0100165 <build>
JulienBec3f8ddf2017-03-08 02:19:21 -0800166 <tags>
167 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -0700168 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -0800169 </tags>
ChrisC025301d2017-01-31 11:40:03 +0100170 <cleanup>try</cleanup>
171 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertyf5893182018-04-05 16:09:32 -0400172 <dockerFile>Dockerfile.mso-chef-final</dockerFile>
ChrisC025301d2017-01-31 11:40:03 +0100173 <assembly>
174 <basedir>/</basedir>
175
176 <user>jboss:jboss:jboss</user>
177 <basedir>/opt/jboss/wildfly/standalone/deployments</basedir>
178 <descriptor>../../../../deliveries/src/main/assembly/war-pack/mso-wars.xml</descriptor>
179 </assembly>
180 </build>
181 </image>
182
ChrisC025301d2017-01-31 11:40:03 +0100183 </images>
184 </configuration>
185 <executions>
186 <execution>
187 <id>clean-images</id>
188 <phase>pre-clean</phase>
189 <goals>
190 <goal>remove</goal>
191 </goals>
192 <configuration>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100193 <removeAll>true</removeAll>
Anaël Closson5167cc22017-02-08 11:14:58 +0100194 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l</image>
ChrisC025301d2017-01-31 11:40:03 +0100195 </configuration>
196 </execution>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100197
ChrisC025301d2017-01-31 11:40:03 +0100198 <execution>
199 <id>generate-images</id>
200 <phase>generate-sources</phase>
201 <goals>
202 <goal>build</goal>
203 </goals>
204 </execution>
205
206 <execution>
207 <id>push-images</id>
208 <phase>deploy</phase>
209 <goals>
210 <goal>build</goal>
211 <goal>push</goal>
212 </goals>
213 <configuration>
Anaël Closson5167cc22017-02-08 11:14:58 +0100214 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l,openecomp/jacoco:1.0</image>
ChrisC025301d2017-01-31 11:40:03 +0100215 </configuration>
216 </execution>
217 </executions>
218
219 </plugin>
220
221 <plugin>
222 <groupId>org.apache.maven.plugins</groupId>
223 <artifactId>maven-deploy-plugin</artifactId>
224 <version>2.8</version>
225 <configuration>
226 <skip>true</skip>
227 </configuration>
228 </plugin>
229 </plugins>
230 </build>
231
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100232</project>