blob: b13bbcfb4d415f27555b5f64a83c88ecbee412ff [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>
ChrisC025301d2017-01-31 11:40:03 +010027 </properties>
28
29 <build>
30 <finalName>${project.artifactId}-${project.version}</finalName>
31 <plugins>
xg353yb6b7bef2017-04-11 13:30:42 +020032 <plugin>
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070033 <groupId>org.codehaus.groovy.maven</groupId>
34 <artifactId>gmaven-plugin</artifactId>
35 <executions>
36 <execution>
37 <phase>validate</phase>
38 <goals>
39 <goal>execute</goal>
40 </goals>
41 <configuration>
42 <source>
43 println project.properties['mso.project.version'];
44 def versionArray;
45 if ( project.properties['mso.project.version'] != null ) {
46 versionArray = project.properties['mso.project.version'].split('\\.');
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070047 }
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070048
49 if ( project.properties['mso.project.version'].endsWith("-SNAPSHOT") ) {
50 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
51 } else {
52 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
53 }
54
55 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
56 </source>
57 </configuration>
58 </execution>
59 </executions>
60 </plugin>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070061
ChrisC025301d2017-01-31 11:40:03 +010062 <plugin>
Anaël Closson13e0d022017-02-14 11:17:50 +010063 <groupId>org.apache.maven.plugins</groupId>
64 <artifactId>maven-scm-plugin</artifactId>
65 <version>1.9.5</version>
66 <executions>
67 <execution>
68 <id>chef-repo-checkout</id>
69 <goals>
70 <goal>checkout</goal>
71 </goals>
72 <phase>initialize</phase>
73 <configuration>
xg353yb6b7bef2017-04-11 13:30:42 +020074 <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.repo}</connectionUrl>
Anaël Closson13e0d022017-02-14 11:17:50 +010075 <checkoutDirectory>src/main/docker/docker-files/chef-configs/chef-repo</checkoutDirectory>
xg353yb6b7bef2017-04-11 13:30:42 +020076 <scmVersion>${mso.chef.git.branchname}</scmVersion>
Anaël Closson13e0d022017-02-14 11:17:50 +010077 <scmVersionType>branch</scmVersionType>
78 <skipCheckoutIfExists>true</skipCheckoutIfExists>
79 <pushChanges>false</pushChanges>
80 </configuration>
81 </execution>
82 <execution>
83 <id>mso-config-checkout</id>
84 <goals>
85 <goal>checkout</goal>
86 </goals>
87 <phase>initialize</phase>
88 <configuration>
xg353yb6b7bef2017-04-11 13:30:42 +020089 <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.config}</connectionUrl>
Anaël Closson13e0d022017-02-14 11:17:50 +010090 <checkoutDirectory>src/main/docker/docker-files/chef-configs/mso-config</checkoutDirectory>
xg353yb6b7bef2017-04-11 13:30:42 +020091 <scmVersion>${mso.chef.git.branchname}</scmVersion>
Anaël Closson13e0d022017-02-14 11:17:50 +010092 <scmVersionType>branch</scmVersionType>
93 <skipCheckoutIfExists>true</skipCheckoutIfExists>
94 <pushChanges>false</pushChanges>
95 </configuration>
96 </execution>
97 </executions>
98 </plugin>
99 <plugin>
ChrisC025301d2017-01-31 11:40:03 +0100100 <groupId>io.fabric8</groupId>
101 <artifactId>docker-maven-plugin</artifactId>
102 <version>0.16.5</version>
103
104 <configuration>
105 <verbose>true</verbose>
106 <apiVersion>1.23</apiVersion>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100107
ChrisC025301d2017-01-31 11:40:03 +0100108 <images>
109 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100110 <name>openecomp/jacoco:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100111 <alias>jacoco</alias>
112 <build>
113 <cleanup>try</cleanup>
114 <dockerFileDir>docker-files</dockerFileDir>
115 <dockerFile>docker-files/Dockerfile.jacoco</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100116
ChrisC025301d2017-01-31 11:40:03 +0100117 </build>
118 </image>
119 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100120 <name>openecomp/ubuntu-update:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100121 <alias>ubuntu-update</alias>
122 <build>
123
124 <cleanup>try</cleanup>
125 <dockerFileDir>docker-files</dockerFileDir>
126 <dockerFile>docker-files/Dockerfile.ubuntu-16.04-update</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100127
ChrisC025301d2017-01-31 11:40:03 +0100128 </build>
129 </image>
130 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100131 <name>openecomp/wildfly:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100132 <alias>wildfly</alias>
133 <build>
134
135 <cleanup>try</cleanup>
136 <dockerFileDir>docker-files</dockerFileDir>
137 <dockerFile>docker-files/Dockerfile.wildfly-10</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100138
ChrisC025301d2017-01-31 11:40:03 +0100139 </build>
140 </image>
141 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100142 <name>openecomp/mso-arquillian:%l</name>
ChrisC025301d2017-01-31 11:40:03 +0100143 <alias>mso-arquillian</alias>
144 <build>
JulienBec3f8ddf2017-03-08 02:19:21 -0800145 <tags>
xg353yb6b7bef2017-04-11 13:30:42 +0200146 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -0800147 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
148 </tags>
ChrisC025301d2017-01-31 11:40:03 +0100149 <cleanup>try</cleanup>
150 <dockerFileDir>docker-files</dockerFileDir>
151 <dockerFile>docker-files/Dockerfile.mso-arquillian</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100152
ChrisC025301d2017-01-31 11:40:03 +0100153 </build>
154 </image>
155 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100156 <name>openecomp/mso:%l</name>
ChrisC025301d2017-01-31 11:40:03 +0100157 <alias>mso</alias>
158 <build>
JulienBec3f8ddf2017-03-08 02:19:21 -0800159 <tags>
160 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -0700161 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -0800162 </tags>
ChrisC025301d2017-01-31 11:40:03 +0100163 <cleanup>try</cleanup>
164 <dockerFileDir>docker-files</dockerFileDir>
165 <dockerFile>docker-files/Dockerfile.mso-chef-final</dockerFile>
166 <assembly>
167 <basedir>/</basedir>
168
169 <user>jboss:jboss:jboss</user>
170 <basedir>/opt/jboss/wildfly/standalone/deployments</basedir>
171 <descriptor>../../../../deliveries/src/main/assembly/war-pack/mso-wars.xml</descriptor>
172 </assembly>
173 </build>
174 </image>
175
ChrisC025301d2017-01-31 11:40:03 +0100176 </images>
177 </configuration>
178 <executions>
179 <execution>
180 <id>clean-images</id>
181 <phase>pre-clean</phase>
182 <goals>
183 <goal>remove</goal>
184 </goals>
185 <configuration>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100186 <removeAll>true</removeAll>
Anaël Closson5167cc22017-02-08 11:14:58 +0100187 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l</image>
ChrisC025301d2017-01-31 11:40:03 +0100188 </configuration>
189 </execution>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100190
ChrisC025301d2017-01-31 11:40:03 +0100191 <execution>
192 <id>generate-images</id>
193 <phase>generate-sources</phase>
194 <goals>
195 <goal>build</goal>
196 </goals>
197 </execution>
198
199 <execution>
200 <id>push-images</id>
201 <phase>deploy</phase>
202 <goals>
203 <goal>build</goal>
204 <goal>push</goal>
205 </goals>
206 <configuration>
Anaël Closson5167cc22017-02-08 11:14:58 +0100207 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l,openecomp/jacoco:1.0</image>
ChrisC025301d2017-01-31 11:40:03 +0100208 </configuration>
209 </execution>
210 </executions>
211
212 </plugin>
213
214 <plugin>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-deploy-plugin</artifactId>
217 <version>2.8</version>
218 <configuration>
219 <skip>true</skip>
220 </configuration>
221 </plugin>
222 </plugins>
223 </build>
224
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100225</project>