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>
6 <groupId>org.onap.so</groupId>
7 <artifactId>packages</artifactId>
8 <version>1.2.0-SNAPSHOT</version>
11 <packaging>pom</packaging>
12 <groupId>org.onap.so</groupId>
13 <artifactId>docker</artifactId>
15 <name>MSO Docker Deliveries</name>
16 <description>OpenECOMP MSO Docker Deliveries</description>
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>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>
27 <mso.project.version>${project.version}</mso.project.version>
31 <finalName>${project.artifactId}-${project.version}</finalName>
34 <groupId>org.codehaus.groovy.maven</groupId>
35 <artifactId>gmaven-plugin</artifactId>
38 <phase>validate</phase>
44 println project.properties['mso.project.version'];
46 if ( project.properties['mso.project.version'] != null ) {
47 versionArray = project.properties['mso.project.version'].split('\\.');
50 if ( project.properties['mso.project.version'].endsWith("-SNAPSHOT") ) {
51 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
53 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
56 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
64 <groupId>org.apache.maven.plugins</groupId>
65 <artifactId>maven-scm-plugin</artifactId>
66 <version>1.9.5</version>
69 <id>chef-repo-checkout</id>
73 <phase>initialize</phase>
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>
84 <id>mso-config-checkout</id>
88 <phase>initialize</phase>
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>
101 <groupId>io.fabric8</groupId>
102 <artifactId>docker-maven-plugin</artifactId>
103 <version>0.16.5</version>
106 <verbose>true</verbose>
107 <apiVersion>1.23</apiVersion>
111 <name>openecomp/jacoco:1.0</name>
112 <alias>jacoco</alias>
114 <cleanup>try</cleanup>
115 <dockerFileDir>docker-files</dockerFileDir>
116 <dockerFile>docker-files/Dockerfile.jacoco</dockerFile>
121 <name>openecomp/ubuntu-update:1.0</name>
122 <alias>ubuntu-update</alias>
125 <cleanup>try</cleanup>
126 <dockerFileDir>docker-files</dockerFileDir>
127 <dockerFile>docker-files/Dockerfile.ubuntu-16.04-update</dockerFile>
132 <name>openecomp/wildfly:1.0</name>
133 <alias>wildfly</alias>
136 <cleanup>try</cleanup>
137 <dockerFileDir>docker-files</dockerFileDir>
138 <dockerFile>docker-files/Dockerfile.wildfly-10</dockerFile>
143 <name>openecomp/mso-arquillian:%l</name>
144 <alias>mso-arquillian</alias>
147 <tag>${project.docker.latesttag.version}</tag>
148 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
150 <cleanup>try</cleanup>
151 <dockerFileDir>docker-files</dockerFileDir>
152 <dockerFile>docker-files/Dockerfile.mso-arquillian</dockerFile>
157 <name>openecomp/mso:%l</name>
161 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
162 <tag>${project.docker.latesttag.version}</tag>
164 <cleanup>try</cleanup>
165 <dockerFileDir>docker-files</dockerFileDir>
166 <dockerFile>docker-files/Dockerfile.mso-chef-final</dockerFile>
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>
181 <id>clean-images</id>
182 <phase>pre-clean</phase>
187 <removeAll>true</removeAll>
188 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l</image>
193 <id>generate-images</id>
194 <phase>generate-sources</phase>
202 <phase>deploy</phase>
208 <image>openecomp/mso-arquillian:%l,openecomp/mso:%l,openecomp/jacoco:1.0</image>
216 <groupId>org.apache.maven.plugins</groupId>
217 <artifactId>maven-deploy-plugin</artifactId>
218 <version>2.8</version>