Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | ============LICENSE_START========================================== |
| 4 | ONAP : APPC |
| 5 | =================================================================== |
| 6 | Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. |
| 7 | =================================================================== |
| 8 | |
| 9 | Unless otherwise specified, all software contained herein is licensed |
| 10 | under the Apache License, Version 2.0 (the License); |
| 11 | you may not use this software except in compliance with the License. |
| 12 | You may obtain a copy of the License at |
| 13 | |
| 14 | http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | |
| 16 | Unless required by applicable law or agreed to in writing, software |
| 17 | distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | See the License for the specific language governing permissions and |
| 20 | limitations under the License. |
| 21 | |
| 22 | ============LICENSE_END============================================ |
| 23 | --> |
| 24 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 25 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 26 | |
| 27 | <parent> |
| 28 | <groupId>org.onap.appc.deployment</groupId> |
| 29 | <artifactId>appc-docker-project</artifactId> |
Patrick Brady | ab98e98 | 2020-01-15 12:44:54 -0800 | [diff] [blame] | 30 | <version>1.7.1-SNAPSHOT</version> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 31 | </parent> |
| 32 | |
| 33 | <modelVersion>4.0.0</modelVersion> |
| 34 | <packaging>pom</packaging> |
| 35 | <groupId>org.onap.appc.deployment</groupId> |
| 36 | <artifactId>installation-cdt</artifactId> |
Patrick Brady | ab98e98 | 2020-01-15 12:44:54 -0800 | [diff] [blame] | 37 | <version>1.7.1-SNAPSHOT</version> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 38 | |
| 39 | <name>Installation - CDT Docker</name> |
| 40 | <description>Creates APPC CDT Docker container</description> |
| 41 | |
| 42 | <properties> |
| 43 | <image.name>onap/appc-cdt-image</image.name> |
Patrick Brady | 92eeb02 | 2020-04-01 09:41:21 -0700 | [diff] [blame] | 44 | <appc.release.version>1.7.1</appc.release.version> |
Patrick Brady | ab98e98 | 2020-01-15 12:44:54 -0800 | [diff] [blame] | 45 | <appc.snapshot.version>1.7.1-SNAPSHOT</appc.snapshot.version> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 46 | <!--This version will be over-ridden by jenkins |
| 47 | injecting the version.properties variable file during docker build--> |
| 48 | <appc.docker.staging.version>1.0.0</appc.docker.staging.version> |
Jessica Wagantall | b4b8bc4 | 2018-04-04 18:28:53 -0700 | [diff] [blame] | 49 | <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 50 | </properties> |
| 51 | |
| 52 | |
| 53 | <build> |
| 54 | <plugins> |
| 55 | |
| 56 | <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image --> |
| 57 | <plugin> |
| 58 | <artifactId>maven-resources-plugin</artifactId> |
| 59 | <version>2.6</version> |
| 60 | <executions> |
| 61 | <execution> |
| 62 | <id>copy-dockerfile</id> |
| 63 | <goals> |
| 64 | <goal>copy-resources</goal> |
| 65 | </goals><!-- here the phase you need --> |
| 66 | <phase>validate</phase> |
| 67 | <configuration> |
| 68 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
| 69 | <resources> |
| 70 | <resource> |
| 71 | <directory>src/main/docker</directory> |
| 72 | <includes> |
| 73 | <include>Dockerfile</include> |
| 74 | </includes> |
| 75 | <filtering>true</filtering> |
| 76 | </resource> |
| 77 | </resources> |
| 78 | </configuration> |
| 79 | </execution> |
Patrick Brady | 27525d8 | 2018-05-29 14:08:46 -0700 | [diff] [blame] | 80 | <execution> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 81 | <id>copy-scripts</id> |
| 82 | <goals> |
| 83 | <goal>copy-resources</goal> |
| 84 | </goals> |
| 85 | <phase>validate</phase> |
| 86 | <configuration> |
Patrick Brady | 27525d8 | 2018-05-29 14:08:46 -0700 | [diff] [blame] | 87 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 88 | <resources> |
| 89 | <resource> |
| 90 | <directory>src/main/scripts</directory> |
| 91 | <includes> |
| 92 | <include>*.sh</include> |
| 93 | </includes> |
| 94 | <filtering>false</filtering> |
| 95 | </resource> |
| 96 | </resources> |
| 97 | </configuration> |
Patrick Brady | 27525d8 | 2018-05-29 14:08:46 -0700 | [diff] [blame] | 98 | </execution> |
Patrick Brady | 365efba | 2019-03-20 15:36:50 -0700 | [diff] [blame] | 99 | <execution> |
| 100 | <id>copy-resources</id> |
| 101 | <goals> |
| 102 | <goal>copy-resources</goal> |
| 103 | </goals> |
| 104 | <phase>validate</phase> |
| 105 | <configuration> |
| 106 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
| 107 | <resources> |
| 108 | <resource> |
| 109 | <directory>src/main/resources</directory> |
| 110 | <includes> |
| 111 | <include>nginx.conf</include> |
| 112 | </includes> |
| 113 | <filtering>false</filtering> |
| 114 | </resource> |
| 115 | </resources> |
| 116 | </configuration> |
| 117 | </execution> |
| 118 | <execution> |
| 119 | <id>copy-certs</id> |
| 120 | <goals> |
| 121 | <goal>copy-resources</goal> |
| 122 | </goals> |
| 123 | <phase>validate</phase> |
| 124 | <configuration> |
| 125 | <outputDirectory>${basedir}/target/docker-stage/cert</outputDirectory> |
| 126 | <resources> |
| 127 | <resource> |
| 128 | <directory>src/main/resources/cert</directory> |
| 129 | <includes> |
| 130 | <include>*.pem</include> |
| 131 | </includes> |
| 132 | <filtering>false</filtering> |
| 133 | </resource> |
| 134 | </resources> |
| 135 | </configuration> |
| 136 | </execution> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 137 | </executions> |
| 138 | </plugin> |
| 139 | <plugin> |
| 140 | <artifactId>exec-maven-plugin</artifactId> |
| 141 | <groupId>org.codehaus.mojo</groupId> |
| 142 | <version>1.5.0</version> |
| 143 | <executions> |
| 144 | <execution> |
| 145 | <id>Get features</id> |
| 146 | <phase>generate-sources</phase> |
| 147 | <goals> |
| 148 | <goal>exec</goal> |
| 149 | </goals> |
| 150 | <configuration> |
| 151 | <executable>bash</executable> |
| 152 | <environmentVariables> |
| 153 | <APPC_VERSION>${appc.version}</APPC_VERSION> |
| 154 | <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION> |
| 155 | <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION> |
| 156 | </environmentVariables> |
| 157 | <arguments> |
| 158 | <argument>${basedir}/src/main/scripts/installZips.sh</argument> |
| 159 | <argument>${basedir}/target/docker-stage</argument> |
| 160 | </arguments> |
| 161 | </configuration> |
| 162 | </execution> |
| 163 | |
| 164 | </executions> |
| 165 | </plugin> |
| 166 | </plugins> |
| 167 | </build> |
| 168 | |
| 169 | <profiles> |
| 170 | <profile> |
| 171 | <id>docker</id> |
| 172 | <build> |
| 173 | <plugins> |
| 174 | <plugin> |
| 175 | <groupId>org.codehaus.groovy.maven</groupId> |
| 176 | <artifactId>gmaven-plugin</artifactId> |
| 177 | <executions> |
| 178 | <execution> |
| 179 | <phase>validate</phase> |
| 180 | <goals> |
| 181 | <goal>execute</goal> |
| 182 | </goals> |
| 183 | <configuration> |
| 184 | <properties> |
| 185 | <ver>${project.version}</ver> |
| 186 | <timestamp>${maven.build.timestamp}</timestamp> |
| 187 | </properties> |
| 188 | <source> |
| 189 | println project.properties['ver']; |
| 190 | def versionArray; |
| 191 | if ( project.properties['ver'] != null ) { |
| 192 | versionArray = project.properties['ver'].split('\\.'); |
| 193 | } |
| 194 | if ( project.properties['ver'].endsWith("-SNAPSHOT") ) { |
| 195 | project.properties['dockertag1']=project.properties['ver'] + "-latest"; |
Patrick Brady | d64f840 | 2018-04-06 15:28:17 -0700 | [diff] [blame] | 196 | project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp']; |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 197 | project.properties['appc.version']=project.properties['appc.snapshot.version']; |
| 198 | } else { |
| 199 | project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; |
| 200 | project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp']; |
| 201 | project.properties['appc.version']=project.properties['appc.release.version']; |
| 202 | } |
| 203 | println 'docker tag 1: ' + project.properties['dockertag1']; |
| 204 | println 'docker tag 2: ' + project.properties['dockertag2']; |
| 205 | </source> |
| 206 | </configuration> |
| 207 | </execution> |
| 208 | </executions> |
| 209 | </plugin> |
| 210 | <plugin> |
| 211 | <groupId>io.fabric8</groupId> |
| 212 | <artifactId>docker-maven-plugin</artifactId> |
Simon Hrabos | cd9e460 | 2019-03-28 05:17:18 -0400 | [diff] [blame] | 213 | <version>0.28.0</version> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 214 | <inherited>false</inherited> |
| 215 | <configuration> |
| 216 | <images> |
| 217 | <image> |
| 218 | <name>${image.name}</name> |
| 219 | <build> |
| 220 | <cleanup>try</cleanup> |
| 221 | <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> |
Simon Hrabos | cd9e460 | 2019-03-28 05:17:18 -0400 | [diff] [blame] | 222 | <dockerFile>Dockerfile</dockerFile> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 223 | <tags> |
| 224 | <tag>${dockertag1}</tag> |
| 225 | <tag>${dockertag2}</tag> |
| 226 | </tags> |
| 227 | </build> |
| 228 | </image> |
| 229 | </images> |
| 230 | </configuration> |
| 231 | <executions> |
| 232 | <execution> |
| 233 | <id>generate-images</id> |
| 234 | <phase>package</phase> |
| 235 | <goals> |
| 236 | <goal>build</goal> |
| 237 | </goals> |
| 238 | </execution> |
| 239 | |
| 240 | <execution> |
| 241 | <id>push-images</id> |
| 242 | <phase>deploy</phase> |
| 243 | <goals> |
| 244 | <goal>build</goal> |
| 245 | <goal>push</goal> |
| 246 | </goals> |
| 247 | </execution> |
| 248 | </executions> |
| 249 | </plugin> |
| 250 | |
| 251 | <!-- This is to add any extra scripts, sql dump files, properties files |
| 252 | APPC may need even after inheriting from the sdnc base image --> |
| 253 | <plugin> |
| 254 | <artifactId>maven-resources-plugin</artifactId> |
| 255 | <version>2.6</version> |
| 256 | <executions> |
| 257 | <execution> |
| 258 | <id>copy-dockerfile</id> |
| 259 | <goals> |
| 260 | <goal>copy-resources</goal> |
| 261 | </goals><!-- here the phase you need --> |
| 262 | <phase>validate</phase> |
| 263 | <configuration> |
| 264 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
| 265 | <resources> |
| 266 | <resource> |
| 267 | <directory>src/main/docker</directory> |
| 268 | <includes> |
| 269 | <include>Dockerfile</include> |
| 270 | </includes> |
| 271 | <filtering>true</filtering> |
| 272 | </resource> |
| 273 | </resources> |
| 274 | </configuration> |
| 275 | </execution> |
Patrick Brady | 27525d8 | 2018-05-29 14:08:46 -0700 | [diff] [blame] | 276 | <execution> |
| 277 | <id>copy-scripts</id> |
| 278 | <goals> |
| 279 | <goal>copy-resources</goal> |
| 280 | </goals> |
| 281 | <phase>validate</phase> |
| 282 | <configuration> |
| 283 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
| 284 | <resources> |
| 285 | <resource> |
| 286 | <directory>src/main/scripts</directory> |
| 287 | <includes> |
| 288 | <include>*.sh</include> |
| 289 | </includes> |
| 290 | <filtering>false</filtering> |
| 291 | </resource> |
| 292 | </resources> |
| 293 | </configuration> |
| 294 | </execution> |
Patrick Brady | f92128c | 2018-03-15 17:52:35 -0400 | [diff] [blame] | 295 | </executions> |
| 296 | </plugin> |
| 297 | <plugin> |
| 298 | <artifactId>exec-maven-plugin</artifactId> |
| 299 | <groupId>org.codehaus.mojo</groupId> |
| 300 | <version>1.5.0</version> |
| 301 | <executions> |
| 302 | <execution> |
| 303 | <id>Get features</id> |
| 304 | <phase>generate-sources</phase> |
| 305 | <goals> |
| 306 | <goal>exec</goal> |
| 307 | </goals> |
| 308 | <configuration> |
| 309 | <executable>bash</executable> |
| 310 | <environmentVariables> |
| 311 | <APPC_VERSION>${appc.version}</APPC_VERSION> |
| 312 | <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION> |
| 313 | <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION> |
| 314 | </environmentVariables> |
| 315 | <arguments> |
| 316 | <argument>${basedir}/src/main/scripts/installZips.sh</argument> |
| 317 | <argument>${basedir}/target/docker-stage</argument> |
| 318 | <argument>${basedir}/target/docker-stage</argument> |
| 319 | </arguments> |
| 320 | </configuration> |
| 321 | </execution> |
| 322 | |
| 323 | |
| 324 | </executions> |
| 325 | </plugin> |
| 326 | </plugins> |
| 327 | </build> |
| 328 | |
| 329 | </profile> |
| 330 | </profiles> |
| 331 | |
| 332 | <organization> |
| 333 | <name>ONAP</name> |
| 334 | </organization> |
| 335 | |
| 336 | </project> |