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" |
| 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 4 | |
| 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> |
Stilwell, David (stilwelld) | a5e125e | 2018-05-23 17:42:47 -0400 | [diff] [blame^] | 8 | <version>1.0.3</version> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 9 | </parent> |
| 10 | |
| 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> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 14 | <artifactId>installation-dgbuilder</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> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 18 | <description>Creates docker container for dgbuilder</description> |
| 19 | |
| 20 | <properties> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 21 | <image.name>onap/dgbuilder-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, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 23 | </properties> |
| 24 | |
| 25 | |
| 26 | <build> |
| 27 | <plugins> |
| 28 | |
| 29 | |
| 30 | <plugin> |
Dan Timoney | 8f77351 | 2017-04-24 16:30:26 -0400 | [diff] [blame] | 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> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 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> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 79 | </tags> |
| 80 | </build> |
| 81 | </image> |
| 82 | </images> |
| 83 | </configuration> |
| 84 | <executions> |
| 85 | <execution> |
| 86 | <id>generate-images</id> |
Timoney, Daniel (dt5972) | 15323be | 2017-04-25 12:40:01 +0000 | [diff] [blame] | 87 | <phase>package</phase> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 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 | <plugin> |
| 104 | <artifactId>maven-resources-plugin</artifactId> |
| 105 | <version>2.6</version> |
| 106 | <executions> |
| 107 | <execution> |
| 108 | <id>copy-dockerfile</id> |
| 109 | <goals> |
| 110 | <goal>copy-resources</goal> |
| 111 | </goals><!-- here the phase you need --> |
| 112 | <phase>validate</phase> |
| 113 | <configuration> |
| 114 | <outputDirectory>${basedir}/target/docker-stage</outputDirectory> |
| 115 | <resources> |
| 116 | <resource> |
| 117 | <directory>src/main/docker</directory> |
| 118 | <includes> |
| 119 | <include>Dockerfile</include> |
| 120 | </includes> |
| 121 | <filtering>true</filtering> |
| 122 | </resource> |
| 123 | </resources> |
| 124 | </configuration> |
| 125 | </execution> |
| 126 | </executions> |
| 127 | </plugin> |
| 128 | |
| 129 | <plugin> |
| 130 | <artifactId>exec-maven-plugin</artifactId> |
| 131 | <groupId>org.codehaus.mojo</groupId> |
Timoney, Daniel (dt5972) | 12dc3ee | 2017-03-07 10:01:56 -0500 | [diff] [blame] | 132 | <version>1.5.0</version> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 133 | <executions> |
Dan Timoney | b217558 | 2017-03-31 17:47:19 -0400 | [diff] [blame] | 134 | <execution> |
Timoney, Daniel (dt5972) | 15323be | 2017-04-25 12:40:01 +0000 | [diff] [blame] | 135 | <id>Make-stage-dir</id> |
| 136 | <phase>generate-sources</phase> |
| 137 | <goals> |
| 138 | <goal>exec</goal> |
| 139 | </goals> |
| 140 | <configuration> |
| 141 | <executable>/bin/mkdir</executable> |
| 142 | <arguments> |
| 143 | <argument>-p</argument> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 144 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> |
Timoney, Daniel (dt5972) | 15323be | 2017-04-25 12:40:01 +0000 | [diff] [blame] | 145 | </arguments> |
| 146 | </configuration> |
| 147 | </execution> |
| 148 | <execution> |
Dan Timoney | b217558 | 2017-03-31 17:47:19 -0400 | [diff] [blame] | 149 | <id>Unzip dgbuilder</id> |
| 150 | <phase>generate-sources</phase> |
| 151 | <goals> |
| 152 | <goal>exec</goal> |
| 153 | </goals> |
| 154 | <configuration> |
| 155 | <executable>/usr/bin/unzip</executable> |
| 156 | <arguments> |
| 157 | <argument>-d</argument> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 158 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> |
Dan Timoney | b217558 | 2017-03-31 17:47:19 -0400 | [diff] [blame] | 159 | <argument>../../dgbuilder/target/*.zip</argument> |
| 160 | </arguments> |
| 161 | </configuration> |
| 162 | </execution> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 163 | <execution> |
| 164 | <id>Copy dgbuilder</id> |
| 165 | <phase>generate-sources</phase> |
| 166 | <goals> |
| 167 | <goal>exec</goal> |
| 168 | </goals> |
| 169 | <configuration> |
| 170 | <executable>/bin/cp</executable> |
| 171 | <arguments> |
| 172 | <argument>-r</argument> |
| 173 | <argument>../../dgbuilder</argument> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 174 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 175 | </arguments> |
| 176 | </configuration> |
| 177 | </execution> |
| 178 | |
| 179 | <execution> |
| 180 | <id>dgbuilder createReleaseDir</id> |
| 181 | <phase>generate-sources</phase> |
| 182 | <goals> |
| 183 | <goal>exec</goal> |
| 184 | </goals> |
| 185 | <configuration> |
| 186 | <executable>/bin/bash</executable> |
| 187 | <arguments> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 188 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc/dgbuilder/createReleaseDir.sh</argument> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 189 | <argument>1702</argument> |
| 190 | <argument>dguser</argument> |
| 191 | <argument>change_email_id@dgbuilder.com</argument> |
| 192 | </arguments> |
| 193 | </configuration> |
| 194 | </execution> |
| 195 | |
| 196 | <execution> |
| 197 | <id>change shell permissions</id> |
Dan Timoney | b217558 | 2017-03-31 17:47:19 -0400 | [diff] [blame] | 198 | <phase>process-sources</phase> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 199 | <goals> |
| 200 | <goal>exec</goal> |
| 201 | </goals> |
| 202 | <configuration> |
| 203 | <executable>/usr/bin/find</executable> |
| 204 | <arguments> |
Dan Timoney | 98ddb13 | 2017-09-01 17:40:45 -0400 | [diff] [blame] | 205 | <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> |
Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 206 | <argument>-name</argument> |
| 207 | <argument>*.sh</argument> |
| 208 | <argument>-exec</argument> |
| 209 | <argument>chmod</argument> |
| 210 | <argument>+x</argument> |
| 211 | <argument>{}</argument> |
| 212 | <argument>;</argument> |
| 213 | </arguments> |
| 214 | </configuration> |
| 215 | </execution> |
| 216 | </executions> |
| 217 | </plugin> |
| 218 | |
| 219 | |
| 220 | </plugins> |
| 221 | |
| 222 | </build> |
| 223 | <organization> |
| 224 | <name>openECOMP</name> |
| 225 | </organization> |
| 226 | </project> |