blob: 79f940988c2c447097a84b31410d028901480d25 [file] [log] [blame]
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -09001<?xml version="1.0" encoding="UTF-8"?>
Timoney, Dan (dt5972)4d1e9652019-03-15 08:12:19 -04002<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Dan Timoney912f98b2018-02-27 14:10:22 -05003 <modelVersion>4.0.0</modelVersion>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -09004
5 <parent>
6 <groupId>org.onap.ccsdk.distribution</groupId>
Dan Timoney912f98b2018-02-27 14:10:22 -05007 <artifactId>distribution-root</artifactId>
Timoney, Dan (dt5972)3948e2a2019-09-12 10:04:46 -04008 <version>0.7.0-SNAPSHOT</version>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -09009 </parent>
10
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090011 <groupId>org.onap.ccsdk.distribution</groupId>
12 <artifactId>distribution-dgbuilder-docker</artifactId>
Timoney, Dan (dt5972)3948e2a2019-09-12 10:04:46 -040013 <version>0.7.0-SNAPSHOT</version>
Dan Timoney912f98b2018-02-27 14:10:22 -050014 <packaging>pom</packaging>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090015
Dan Timoney912f98b2018-02-27 14:10:22 -050016 <name>ccsdk-distribution :: dgbuilder-docker</name>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090017 <description>Creates docker container for dgbuilder</description>
Dan Timoney912f98b2018-02-27 14:10:22 -050018 <organization>
19 <name>ONAP</name>
20 </organization>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090021
22 <properties>
23 <image.name>onap/ccsdk-dgbuilder-image</image.name>
24 <ccsdk.project.version>${project.version}</ccsdk.project.version>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050025 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090026 </properties>
27
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090028 <build>
29 <plugins>
30
31
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050032 <plugin>
33 <groupId>org.codehaus.groovy.maven</groupId>
34 <artifactId>gmaven-plugin</artifactId>
35 <executions>
36 <execution>
37 <phase>validate</phase>
38 <goals>
39 <goal>execute</goal>
40 </goals>
41 <configuration>
42 <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
43 </configuration>
44 </execution>
45 </executions>
46 </plugin>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090047 <plugin>
48 <artifactId>maven-resources-plugin</artifactId>
49 <version>2.6</version>
50 <executions>
51 <execution>
52 <id>copy-dockerfile</id>
53 <goals>
54 <goal>copy-resources</goal>
55 </goals><!-- here the phase you need -->
56 <phase>validate</phase>
57 <configuration>
58 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
59 <resources>
60 <resource>
61 <directory>src/main/docker</directory>
62 <includes>
63 <include>Dockerfile</include>
64 </includes>
65 <filtering>true</filtering>
66 </resource>
67 </resources>
68 </configuration>
69 </execution>
70 </executions>
71 </plugin>
72
73 <plugin>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090074 <groupId>org.codehaus.mojo</groupId>
Dan Timoney912f98b2018-02-27 14:10:22 -050075 <artifactId>exec-maven-plugin</artifactId>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090076 <version>1.5.0</version>
77 <executions>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050078 <execution>
79 <id>Make-stage-dir</id>
80 <phase>generate-sources</phase>
81 <goals>
82 <goal>exec</goal>
83 </goals>
84 <configuration>
85 <executable>/bin/mkdir</executable>
86 <arguments>
87 <argument>-p</argument>
88 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
89 </arguments>
90 </configuration>
91 </execution>
92 <execution>
93 <id>Unzip dgbuilder</id>
94 <phase>generate-sources</phase>
95 <goals>
96 <goal>exec</goal>
97 </goals>
98 <configuration>
99 <executable>/usr/bin/unzip</executable>
100 <arguments>
101 <argument>-d</argument>
102 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
103 <argument>../dgbuilder/target/*.zip</argument>
104 </arguments>
105 </configuration>
106 </execution>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900107 <execution>
108 <id>Copy dgbuilder</id>
109 <phase>generate-sources</phase>
110 <goals>
111 <goal>exec</goal>
112 </goals>
113 <configuration>
114 <executable>/bin/cp</executable>
115 <arguments>
116 <argument>-r</argument>
117 <argument>../dgbuilder</argument>
Chinthakayala,Sheshashailavas(sc2914)6d1e46d2018-03-14 21:18:28 +0000118 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900119 </arguments>
120 </configuration>
121 </execution>
122
123 <execution>
124 <id>dgbuilder createReleaseDir</id>
125 <phase>generate-sources</phase>
126 <goals>
127 <goal>exec</goal>
128 </goals>
129 <configuration>
130 <executable>/bin/bash</executable>
131 <arguments>
Chinthakayala,Sheshashailavas(sc2914)6d1e46d2018-03-14 21:18:28 +0000132 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk/dgbuilder/createReleaseDir.sh</argument>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900133 <argument>1702</argument>
134 <argument>dguser</argument>
135 <argument>change_email_id@dgbuilder.com</argument>
136 </arguments>
137 </configuration>
138 </execution>
139
140 <execution>
141 <id>change shell permissions</id>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500142 <phase>process-sources</phase>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900143 <goals>
144 <goal>exec</goal>
145 </goals>
146 <configuration>
147 <executable>/usr/bin/find</executable>
148 <arguments>
Chinthakayala,Sheshashailavas(sc2914)6d1e46d2018-03-14 21:18:28 +0000149 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900150 <argument>-name</argument>
151 <argument>*.sh</argument>
152 <argument>-exec</argument>
153 <argument>chmod</argument>
154 <argument>+x</argument>
155 <argument>{}</argument>
156 <argument>;</argument>
157 </arguments>
158 </configuration>
159 </execution>
160 </executions>
161 </plugin>
162 </plugins>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500163 </build>
Dan Timoney912f98b2018-02-27 14:10:22 -0500164
165 <profiles>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500166 <profile>
167 <id>docker</id>
168 <build>
169 <plugins>
170 <plugin>
171 <groupId>io.fabric8</groupId>
172 <artifactId>docker-maven-plugin</artifactId>
Simon Hrabos46805102019-03-28 03:22:04 -0700173 <version>0.28.0</version>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500174 <inherited>false</inherited>
175 <configuration>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900176
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500177 <images>
178 <image>
179 <name>${image.name}</name>
180 <build>
181 <cleanup>try</cleanup>
182 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
Simon Hrabos46805102019-03-28 03:22:04 -0700183 <dockerFile>Dockerfile</dockerFile>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500184 <tags>
185 <tag>${project.docker.latestminortag.version}</tag>
186 <tag>${project.docker.latestfulltag.version}</tag>
187 <tag>${project.docker.latesttagtimestamp.version}</tag>
188 </tags>
189 </build>
190 </image>
191 </images>
192 </configuration>
193 <executions>
194 <execution>
195 <id>generate-images</id>
196 <phase>package</phase>
197 <goals>
198 <goal>build</goal>
199 </goals>
200 </execution>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900201
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500202 <execution>
203 <id>push-images</id>
204 <phase>deploy</phase>
205 <goals>
206 <goal>build</goal>
207 <goal>push</goal>
208 </goals>
209 </execution>
210 </executions>
211 </plugin>
212 </plugins>
213 </build>
214 </profile>
215 </profiles>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900216</project>