Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 4 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 5 | <parent> |
Timoney, Dan (dt5972) | 6329874 | 2018-03-01 10:59:28 -0500 | [diff] [blame] | 6 | <groupId>org.onap.ccsdk.parent</groupId> |
| 7 | <artifactId>odlparent-lite</artifactId> |
Timoney, Dan (dt5972) | 0441aeb | 2018-04-29 20:04:20 -0400 | [diff] [blame] | 8 | <version>1.0.2-SNAPSHOT</version> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 9 | </parent> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 10 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 11 | <modelVersion>4.0.0</modelVersion> |
| 12 | <packaging>pom</packaging> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 13 | <groupId>org.onap.sdnc.oam</groupId> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 14 | <artifactId>installation-admportal</artifactId> |
Timoney, Dan (dt5972) | 0441aeb | 2018-04-29 20:04:20 -0400 | [diff] [blame] | 15 | <version>1.3.2-SNAPSHOT</version> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 16 | |
Timoney, Dan (dt5972) | 6329874 | 2018-03-01 10:59:28 -0500 | [diff] [blame] | 17 | <name>sdnc-oam :: installation :: ${project.artifactId}</name> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 18 | <description>Creates admportal Docker container</description> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 19 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 20 | <properties> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 21 | <image.name>onap/admportal-sdnc-image</image.name> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 22 | <sdnc.project.version>${project.version}</sdnc.project.version> |
Timoney, Dan (dt5972) | 7b53940 | 2018-04-06 18:00:00 -0400 | [diff] [blame] | 23 | <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 24 | </properties> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 25 | |
| 26 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 27 | <build> |
| 28 | <plugins> |
| 29 | |
| 30 | <plugin> |
| 31 | <groupId>org.codehaus.groovy.maven</groupId> |
| 32 | <artifactId>gmaven-plugin</artifactId> |
| 33 | <executions> |
| 34 | <execution> |
| 35 | <phase>validate</phase> |
| 36 | <goals> |
| 37 | <goal>execute</goal> |
| 38 | </goals> |
| 39 | <configuration> |
| 40 | <source> |
| 41 | println project.properties['sdnc.project.version']; |
| 42 | def versionArray; |
| 43 | if ( project.properties['sdnc.project.version'] != null ) { |
Dan Timoney | 687146e | 2017-04-25 08:43:30 -0400 | [diff] [blame] | 44 | versionArray = |
| 45 | project.properties['sdnc.project.version'].split('\\.'); |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 46 | } |
| 47 | |
Dan Timoney | 687146e | 2017-04-25 08:43:30 -0400 | [diff] [blame] | 48 | if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) { |
Dan Timoney | 4702069 | 2017-05-15 10:28:02 -0400 | [diff] [blame] | 49 | project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 50 | } else { |
Dan Timoney | 687146e | 2017-04-25 08:43:30 -0400 | [diff] [blame] | 51 | project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | println 'New Tag for docker:' + |
| 55 | project.properties['project.docker.latesttag.version']; |
| 56 | </source> |
| 57 | </configuration> |
| 58 | </execution> |
| 59 | </executions> |
| 60 | </plugin> |
| 61 | <plugin> |
| 62 | <groupId>io.fabric8</groupId> |
| 63 | <artifactId>docker-maven-plugin</artifactId> |
| 64 | <version>0.16.5</version> |
| 65 | <inherited>false</inherited> |
| 66 | <configuration> |
| 67 | |
| 68 | <images> |
| 69 | <image> |
| 70 | <name>${image.name}</name> |
| 71 | <build> |
| 72 | <cleanup>try</cleanup> |
| 73 | <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> |
| 74 | <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> |
| 75 | <tags> |
Dan Timoney | 687146e | 2017-04-25 08:43:30 -0400 | [diff] [blame] | 76 | <tag>${project.version}</tag> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 77 | <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> |
| 78 | <tag>${project.docker.latesttag.version}</tag> |
| 79 | </tags> |
| 80 | </build> |
| 81 | </image> |
| 82 | </images> |
| 83 | </configuration> |
| 84 | <executions> |
| 85 | <execution> |
| 86 | <id>generate-images</id> |
| 87 | <phase>generate-sources</phase> |
| 88 | <goals> |
| 89 | <goal>build</goal> |
| 90 | </goals> |
| 91 | </execution> |
| 92 | |
| 93 | <execution> |
| 94 | <id>push-images</id> |
| 95 | <phase>deploy</phase> |
| 96 | <goals> |
| 97 | <goal>build</goal> |
| 98 | <goal>push</goal> |
| 99 | </goals> |
| 100 | </execution> |
| 101 | </executions> |
| 102 | </plugin> |
| 103 | |
| 104 | <plugin> |
| 105 | <artifactId>maven-resources-plugin</artifactId> |
| 106 | <version>2.6</version> |
| 107 | <executions> |
| 108 | <execution> |
| 109 | <id>copy-dockerfile</id> |
| 110 | <goals> |
| 111 | <goal>copy-resources</goal> |
| 112 | </goals><!-- here the phase you need --> |
| 113 | <phase>validate</phase> |
| 114 | <configuration> |
| 115 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
| 116 | <resources> |
| 117 | <resource> |
| 118 | <directory>src/main/docker</directory> |
| 119 | <includes> |
| 120 | <include>Dockerfile</include> |
| 121 | </includes> |
| 122 | <filtering>true</filtering> |
| 123 | </resource> |
| 124 | </resources> |
| 125 | </configuration> |
| 126 | </execution> |
| 127 | <execution> |
| 128 | <id>copy-properties</id> |
| 129 | <goals> |
| 130 | <goal>copy-resources</goal> |
| 131 | </goals><!-- here the phase you need --> |
| 132 | <phase>validate</phase> |
| 133 | <configuration> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 134 | <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 135 | <resources> |
| 136 | <resource> |
| 137 | <directory>../src/main/properties</directory> |
| 138 | <includes> |
| 139 | <include>*.properties</include> |
| 140 | <include>*.properties.sdnctldb01</include> |
| 141 | </includes> |
| 142 | <filtering>false</filtering> |
| 143 | </resource> |
| 144 | </resources> |
| 145 | </configuration> |
| 146 | </execution> |
| 147 | </executions> |
| 148 | </plugin> |
| 149 | <plugin> |
| 150 | <artifactId>exec-maven-plugin</artifactId> |
| 151 | <groupId>org.codehaus.mojo</groupId> |
| 152 | <version>1.5.0</version> |
| 153 | <executions> |
| 154 | <execution> |
| 155 | <id>Unzip admportal</id> |
| 156 | <phase>generate-sources</phase> |
| 157 | <goals> |
| 158 | <goal>exec</goal> |
| 159 | </goals> |
| 160 | <configuration> |
| 161 | <executable>/usr/bin/unzip</executable> |
| 162 | <arguments> |
| 163 | <argument>-d</argument> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 164 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 165 | <argument>../../admportal/target/*.zip</argument> |
| 166 | </arguments> |
| 167 | </configuration> |
| 168 | </execution> |
| 169 | |
| 170 | <execution> |
| 171 | <id>Copy admportal config</id> |
| 172 | <phase>generate-sources</phase> |
| 173 | <goals> |
| 174 | <goal>exec</goal> |
| 175 | </goals> |
| 176 | <configuration> |
| 177 | <executable>/bin/cp</executable> |
| 178 | <arguments> |
| 179 | <argument>../../admportal/config/admportal.json</argument> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 180 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 181 | </arguments> |
| 182 | </configuration> |
| 183 | </execution> |
| 184 | |
| 185 | <execution> |
| 186 | <id>Copy admportal config1</id> |
| 187 | <phase>generate-sources</phase> |
| 188 | <goals> |
| 189 | <goal>exec</goal> |
| 190 | </goals> |
| 191 | <configuration> |
| 192 | <executable>/bin/cp</executable> |
| 193 | <arguments> |
| 194 | <argument>../../admportal/config/admportal.log4js.json</argument> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 195 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 196 | </arguments> |
| 197 | </configuration> |
| 198 | </execution> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 199 | |
| 200 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 201 | <execution> |
| 202 | <id>change shell permissions</id> |
| 203 | <phase>process-sources</phase> |
| 204 | <goals> |
| 205 | <goal>exec</goal> |
| 206 | </goals> |
| 207 | <configuration> |
| 208 | <executable>/usr/bin/find</executable> |
| 209 | <arguments> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 210 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 211 | <argument>-name</argument> |
| 212 | <argument>*.sh</argument> |
| 213 | <argument>-exec</argument> |
| 214 | <argument>chmod</argument> |
| 215 | <argument>+x</argument> |
| 216 | <argument>{}</argument> |
| 217 | <argument>;</argument> |
| 218 | </arguments> |
| 219 | </configuration> |
| 220 | </execution> |
| 221 | </executions> |
| 222 | </plugin> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 223 | |
| 224 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 225 | </plugins> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 226 | |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 227 | </build> |
| 228 | <organization> |
| 229 | <name>openECOMP</name> |
| 230 | </organization> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 231 | </project> |