Muthuramalingam, Brinda Santh(bs2796) | d3efe72 | 2018-08-23 15:54:30 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
| 2 | <!--
|
| 3 | ~ Copyright © 2017-2018 AT&T Intellectual Property.
|
| 4 | ~
|
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 | ~ you may not use this file except in compliance with the License.
|
| 7 | ~ You may obtain a copy of the License at
|
| 8 | ~
|
| 9 | ~ http://www.apache.org/licenses/LICENSE-2.0
|
| 10 | ~
|
| 11 | ~ Unless required by applicable law or agreed to in writing, software
|
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 | ~ See the License for the specific language governing permissions and
|
| 15 | ~ limitations under the License.
|
| 16 | -->
|
| 17 |
|
| 18 | <project
|
| 19 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
| 20 | xmlns="http://maven.apache.org/POM/4.0.0"
|
| 21 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
| 22 | <modelVersion>4.0.0</modelVersion>
|
| 23 | <parent>
|
| 24 | <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
|
| 25 | <artifactId>parent</artifactId>
|
| 26 | <version>0.3.0-SNAPSHOT</version>
|
| 27 | <relativePath>../parent</relativePath>
|
| 28 | </parent>
|
| 29 | <artifactId>distribution</artifactId>
|
| 30 | <packaging>pom</packaging>
|
| 31 | <name>Controller Blueprints Distribution</name>
|
| 32 | <properties>
|
| 33 | <assembly.id>maven</assembly.id>
|
| 34 | <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
|
| 35 | <serviceArtifactName>controllerblueprints</serviceArtifactName>
|
| 36 | <image.name>onap/ccsdk-controllerblueprints</image.name>
|
Timoney, Dan (dt5972) | 7489607 | 2018-09-12 15:31:10 -0400 | [diff] [blame^] | 37 | <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
|
| 38 | <docker.push.phase>deploy</docker.push.phase>
|
| 39 | <docker.verbose>true</docker.verbose>
|
| 40 | </properties>
|
Muthuramalingam, Brinda Santh(bs2796) | d3efe72 | 2018-08-23 15:54:30 +0000 | [diff] [blame] | 41 |
|
| 42 | <dependencies>
|
| 43 | <dependency>
|
| 44 | <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
|
| 45 | <artifactId>application</artifactId>
|
| 46 | </dependency>
|
| 47 | </dependencies>
|
| 48 | <build>
|
| 49 | <plugins>
|
| 50 | <plugin>
|
| 51 | <artifactId>maven-resources-plugin</artifactId>
|
| 52 | <version>2.6</version>
|
| 53 | <executions>
|
| 54 | <execution>
|
| 55 | <id>copy-dockerfile</id>
|
| 56 | <goals>
|
| 57 | <goal>copy-resources</goal>
|
| 58 | </goals><!-- here the phase you need -->
|
| 59 | <phase>validate</phase>
|
| 60 | <configuration>
|
| 61 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
|
| 62 | <resources>
|
| 63 | <resource>
|
| 64 | <directory>src/main/docker</directory>
|
| 65 | <includes>
|
| 66 | <include>*</include>
|
| 67 | </includes>
|
| 68 | <filtering>true</filtering>
|
| 69 | </resource>
|
| 70 | </resources>
|
| 71 | </configuration>
|
| 72 | </execution>
|
| 73 | </executions>
|
| 74 | </plugin>
|
| 75 | <plugin>
|
| 76 | <groupId>org.apache.maven.plugins</groupId>
|
| 77 | <artifactId>maven-antrun-plugin</artifactId>
|
| 78 | <executions>
|
| 79 | <execution>
|
| 80 | <id>ant-test</id>
|
| 81 | <phase>package</phase>
|
| 82 | <configuration>
|
| 83 | <tasks>
|
| 84 | <fixcrlf srcdir="${basedir}" eol="unix"
|
| 85 | includes="**/*.sh, **/*.source"/>
|
| 86 | </tasks>
|
| 87 | </configuration>
|
| 88 | <goals>
|
| 89 | <goal>run</goal>
|
| 90 | </goals>
|
| 91 | </execution>
|
| 92 | </executions>
|
| 93 | </plugin>
|
| 94 | <plugin>
|
| 95 | <!--build the final artifact for docker deployment -->
|
| 96 | <artifactId>maven-assembly-plugin</artifactId>
|
| 97 | <version>3.0.0</version>
|
| 98 | <configuration>
|
| 99 | <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
|
| 100 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
|
| 101 | <descriptors>
|
| 102 | <descriptor>src/main/docker/distribution.xml</descriptor>
|
| 103 | </descriptors>
|
| 104 | <tarLongFileMode>posix</tarLongFileMode>
|
| 105 | </configuration>
|
| 106 | <executions>
|
| 107 | <execution>
|
| 108 | <id>${assembly.id}</id>
|
| 109 | <phase>package</phase>
|
| 110 | <goals>
|
| 111 | <goal>single</goal>
|
| 112 | </goals>
|
| 113 | </execution>
|
| 114 | </executions>
|
| 115 | </plugin>
|
| 116 | <plugin>
|
| 117 | <groupId>org.codehaus.groovy.maven</groupId>
|
| 118 | <artifactId>gmaven-plugin</artifactId>
|
| 119 | <version>1.0</version>
|
| 120 | <executions>
|
| 121 | <execution>
|
| 122 | <phase>validate</phase>
|
| 123 | <goals>
|
| 124 | <goal>execute</goal>
|
| 125 | </goals>
|
| 126 | <configuration>
|
| 127 | <source>
|
| 128 | println project.properties['ccsdk.project.version'];
|
| 129 | def versionArray;
|
| 130 | if (project.properties['ccsdk.project.version'] != null ) {
|
| 131 | versionArray = project.properties['ccsdk.project.version'].split('\\.');
|
| 132 | }
|
| 133 |
|
| 134 | if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
|
| 135 | {
|
| 136 | project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
|
| 137 | } else {
|
| 138 | project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
|
| 139 | }
|
| 140 |
|
| 141 | println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
|
| 142 | </source>
|
| 143 | </configuration>
|
| 144 | </execution>
|
| 145 | </executions>
|
| 146 | </plugin>
|
Timoney, Dan (dt5972) | 7489607 | 2018-09-12 15:31:10 -0400 | [diff] [blame^] | 147 |
|
Muthuramalingam, Brinda Santh(bs2796) | d3efe72 | 2018-08-23 15:54:30 +0000 | [diff] [blame] | 148 | </plugins>
|
| 149 | </build>
|
Timoney, Dan (dt5972) | 7489607 | 2018-09-12 15:31:10 -0400 | [diff] [blame^] | 150 |
|
| 151 | <profiles>
|
| 152 | <profile>
|
| 153 | <id>docker</id>
|
| 154 | <build>
|
| 155 | <plugins>
|
| 156 | <plugin>
|
| 157 | <groupId>io.fabric8</groupId>
|
| 158 | <artifactId>docker-maven-plugin</artifactId>
|
| 159 | <version>0.26.1</version>
|
| 160 | <inherited>false</inherited>
|
| 161 | <configuration>
|
| 162 | <images>
|
| 163 | <image>
|
| 164 | <name>${image.name}</name>
|
| 165 | <build>
|
| 166 | <cleanup>try</cleanup>
|
| 167 | <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
|
| 168 | <tags>
|
| 169 | <tag>${project.version}</tag>
|
| 170 | <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
|
| 171 | <tag>${project.docker.latesttag.version}</tag>
|
| 172 | </tags>
|
| 173 | </build>
|
| 174 | </image>
|
| 175 | </images>
|
| 176 | <verbose>true</verbose>
|
| 177 | </configuration>
|
| 178 | <executions>
|
| 179 | <execution>
|
| 180 | <id>push-images</id>
|
| 181 | <phase>${docker.build.phase}</phase>
|
| 182 | <goals>
|
| 183 | <goal>build</goal>
|
| 184 | <goal>push</goal>
|
| 185 | </goals>
|
| 186 | </execution>
|
| 187 | </executions>
|
| 188 | </plugin>
|
| 189 | </plugins>
|
| 190 | </build>
|
| 191 | </profile>
|
| 192 |
|
| 193 | </profiles>
|
Muthuramalingam, Brinda Santh(bs2796) | d3efe72 | 2018-08-23 15:54:30 +0000 | [diff] [blame] | 194 | </project>
|
| 195 |
|