blob: 1957dc7928a89eccf84c3eb8fb0180ac7c4be5f1 [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>
Arthur Martella22e015f2018-02-22 14:24:40 -050012 <groupId>org.onap.so</groupId>
ChrisC025301d2017-01-31 11:40:03 +010013 <artifactId>docker</artifactId>
14
15 <name>MSO Docker Deliveries</name>
Anaël Closson5167cc22017-02-08 11:14:58 +010016 <description>OpenECOMP MSO Docker Deliveries</description>
ChrisC025301d2017-01-31 11:40:03 +010017
18 <properties>
19 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Alexis de Talhouët07efe432017-03-06 15:37:39 -050021 <!-- If the maven profile "docker" is specified the parameter -Dmso.git.url=<MsoGitRepo> must be provided
xg353yb6b7bef2017-04-11 13:30:42 +020022 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>
Rob Daugherty2c5310a2017-07-20 11:09:23 -040025 <mso.chef.git.url.suffix.chef.repo>so/chef-repo</mso.chef.git.url.suffix.chef.repo>
26 <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 -070027 <mso.project.version>${project.version}</mso.project.version>
ChrisC025301d2017-01-31 11:40:03 +010028 </properties>
29
30 <build>
31 <finalName>${project.artifactId}-${project.version}</finalName>
32 <plugins>
xg353yb6b7bef2017-04-11 13:30:42 +020033 <plugin>
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070034 <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('\\.');
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070048 }
Determe, Sebastien (sd378r)8d5a9b02017-03-27 07:51:22 -070049
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>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070062
ChrisC025301d2017-01-31 11:40:03 +010063 <plugin>
Anaël Closson13e0d022017-02-14 11:17:50 +010064 <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>
xg353yb6b7bef2017-04-11 13:30:42 +020075 <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.repo}</connectionUrl>
Anaël Closson13e0d022017-02-14 11:17:50 +010076 <checkoutDirectory>src/main/docker/docker-files/chef-configs/chef-repo</checkoutDirectory>
xg353yb6b7bef2017-04-11 13:30:42 +020077 <scmVersion>${mso.chef.git.branchname}</scmVersion>
Anaël Closson13e0d022017-02-14 11:17:50 +010078 <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>
xg353yb6b7bef2017-04-11 13:30:42 +020090 <connectionUrl>scm:git:${mso.chef.git.url.prefix}/${mso.chef.git.url.suffix.chef.config}</connectionUrl>
Anaël Closson13e0d022017-02-14 11:17:50 +010091 <checkoutDirectory>src/main/docker/docker-files/chef-configs/mso-config</checkoutDirectory>
xg353yb6b7bef2017-04-11 13:30:42 +020092 <scmVersion>${mso.chef.git.branchname}</scmVersion>
Anaël Closson13e0d022017-02-14 11:17:50 +010093 <scmVersionType>branch</scmVersionType>
94 <skipCheckoutIfExists>true</skipCheckoutIfExists>
95 <pushChanges>false</pushChanges>
96 </configuration>
97 </execution>
98 </executions>
99 </plugin>
100 <plugin>
ChrisC025301d2017-01-31 11:40:03 +0100101 <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>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100108
ChrisC025301d2017-01-31 11:40:03 +0100109 <images>
110 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100111 <name>openecomp/jacoco:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100112 <alias>jacoco</alias>
113 <build>
114 <cleanup>try</cleanup>
115 <dockerFileDir>docker-files</dockerFileDir>
116 <dockerFile>docker-files/Dockerfile.jacoco</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100117
ChrisC025301d2017-01-31 11:40:03 +0100118 </build>
119 </image>
120 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100121 <name>openecomp/ubuntu-update:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100122 <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>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100128
ChrisC025301d2017-01-31 11:40:03 +0100129 </build>
130 </image>
131 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100132 <name>openecomp/wildfly:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +0100133 <alias>wildfly</alias>
134 <build>
135
136 <cleanup>try</cleanup>
137 <dockerFileDir>docker-files</dockerFileDir>
138 <dockerFile>docker-files/Dockerfile.wildfly-10</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100139
ChrisC025301d2017-01-31 11:40:03 +0100140 </build>
141 </image>
142 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100143 <name>openecomp/mso-arquillian:%l</name>
ChrisC025301d2017-01-31 11:40:03 +0100144 <alias>mso-arquillian</alias>
145 <build>
JulienBec3f8ddf2017-03-08 02:19:21 -0800146 <tags>
xg353yb6b7bef2017-04-11 13:30:42 +0200147 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -0800148 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
149 </tags>
ChrisC025301d2017-01-31 11:40:03 +0100150 <cleanup>try</cleanup>
151 <dockerFileDir>docker-files</dockerFileDir>
152 <dockerFile>docker-files/Dockerfile.mso-arquillian</dockerFile>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100153
ChrisC025301d2017-01-31 11:40:03 +0100154 </build>
155 </image>
156 <image>
Anaël Closson5167cc22017-02-08 11:14:58 +0100157 <name>openecomp/mso:%l</name>
ChrisC025301d2017-01-31 11:40:03 +0100158 <alias>mso</alias>
159 <build>
JulienBec3f8ddf2017-03-08 02:19:21 -0800160 <tags>
161 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -0700162 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -0800163 </tags>
ChrisC025301d2017-01-31 11:40:03 +0100164 <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
ChrisC025301d2017-01-31 11:40:03 +0100177 </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>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100187 <removeAll>true</removeAll>
Anaël Closson5167cc22017-02-08 11:14:58 +0100188 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l</image>
ChrisC025301d2017-01-31 11:40:03 +0100189 </configuration>
190 </execution>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100191
ChrisC025301d2017-01-31 11:40:03 +0100192 <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>
Anaël Closson5167cc22017-02-08 11:14:58 +0100208 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l,openecomp/jacoco:1.0</image>
ChrisC025301d2017-01-31 11:40:03 +0100209 </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
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100226</project>