blob: 2c160fc564ad4ee7a62ec4aeaba0eac55b5ac4b8 [file] [log] [blame]
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -09001<?xml version="1.0" encoding="UTF-8"?>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -05002<project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 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 -05005 <modelVersion>4.0.0</modelVersion>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -09006
7 <parent>
8 <groupId>org.onap.ccsdk.distribution</groupId>
Dan Timoney912f98b2018-02-27 14:10:22 -05009 <artifactId>distribution-root</artifactId>
Timoney, Dan (dt5972)e7cfae52019-01-03 15:14:58 -050010 <version>0.4.1-SNAPSHOT</version>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090011 </parent>
12
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090013 <groupId>org.onap.ccsdk.distribution</groupId>
14 <artifactId>distribution-dgbuilder-docker</artifactId>
Timoney, Dan (dt5972)e7cfae52019-01-03 15:14:58 -050015 <version>0.4.1-SNAPSHOT</version>
Dan Timoney912f98b2018-02-27 14:10:22 -050016 <packaging>pom</packaging>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090017
Dan Timoney912f98b2018-02-27 14:10:22 -050018 <name>ccsdk-distribution :: dgbuilder-docker</name>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090019 <description>Creates docker container for dgbuilder</description>
Dan Timoney912f98b2018-02-27 14:10:22 -050020 <organization>
21 <name>ONAP</name>
22 </organization>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090023
24 <properties>
25 <image.name>onap/ccsdk-dgbuilder-image</image.name>
26 <ccsdk.project.version>${project.version}</ccsdk.project.version>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050027 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090028 </properties>
29
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090030 <build>
31 <plugins>
32
33
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050034 <plugin>
35 <groupId>org.codehaus.groovy.maven</groupId>
36 <artifactId>gmaven-plugin</artifactId>
37 <executions>
38 <execution>
39 <phase>validate</phase>
40 <goals>
41 <goal>execute</goal>
42 </goals>
43 <configuration>
44 <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
45 </configuration>
46 </execution>
47 </executions>
48 </plugin>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090049 <plugin>
50 <artifactId>maven-resources-plugin</artifactId>
51 <version>2.6</version>
52 <executions>
53 <execution>
54 <id>copy-dockerfile</id>
55 <goals>
56 <goal>copy-resources</goal>
57 </goals><!-- here the phase you need -->
58 <phase>validate</phase>
59 <configuration>
60 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
61 <resources>
62 <resource>
63 <directory>src/main/docker</directory>
64 <includes>
65 <include>Dockerfile</include>
66 </includes>
67 <filtering>true</filtering>
68 </resource>
69 </resources>
70 </configuration>
71 </execution>
72 </executions>
73 </plugin>
74
75 <plugin>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090076 <groupId>org.codehaus.mojo</groupId>
Dan Timoney912f98b2018-02-27 14:10:22 -050077 <artifactId>exec-maven-plugin</artifactId>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -090078 <version>1.5.0</version>
79 <executions>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -050080 <execution>
81 <id>Make-stage-dir</id>
82 <phase>generate-sources</phase>
83 <goals>
84 <goal>exec</goal>
85 </goals>
86 <configuration>
87 <executable>/bin/mkdir</executable>
88 <arguments>
89 <argument>-p</argument>
90 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
91 </arguments>
92 </configuration>
93 </execution>
94 <execution>
95 <id>Unzip dgbuilder</id>
96 <phase>generate-sources</phase>
97 <goals>
98 <goal>exec</goal>
99 </goals>
100 <configuration>
101 <executable>/usr/bin/unzip</executable>
102 <arguments>
103 <argument>-d</argument>
104 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
105 <argument>../dgbuilder/target/*.zip</argument>
106 </arguments>
107 </configuration>
108 </execution>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900109 <execution>
110 <id>Copy dgbuilder</id>
111 <phase>generate-sources</phase>
112 <goals>
113 <goal>exec</goal>
114 </goals>
115 <configuration>
116 <executable>/bin/cp</executable>
117 <arguments>
118 <argument>-r</argument>
119 <argument>../dgbuilder</argument>
Chinthakayala,Sheshashailavas(sc2914)6d1e46d2018-03-14 21:18:28 +0000120 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900121 </arguments>
122 </configuration>
123 </execution>
124
125 <execution>
126 <id>dgbuilder createReleaseDir</id>
127 <phase>generate-sources</phase>
128 <goals>
129 <goal>exec</goal>
130 </goals>
131 <configuration>
132 <executable>/bin/bash</executable>
133 <arguments>
Chinthakayala,Sheshashailavas(sc2914)6d1e46d2018-03-14 21:18:28 +0000134 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk/dgbuilder/createReleaseDir.sh</argument>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900135 <argument>1702</argument>
136 <argument>dguser</argument>
137 <argument>change_email_id@dgbuilder.com</argument>
138 </arguments>
139 </configuration>
140 </execution>
141
142 <execution>
143 <id>change shell permissions</id>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500144 <phase>process-sources</phase>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900145 <goals>
146 <goal>exec</goal>
147 </goals>
148 <configuration>
149 <executable>/usr/bin/find</executable>
150 <arguments>
Chinthakayala,Sheshashailavas(sc2914)6d1e46d2018-03-14 21:18:28 +0000151 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900152 <argument>-name</argument>
153 <argument>*.sh</argument>
154 <argument>-exec</argument>
155 <argument>chmod</argument>
156 <argument>+x</argument>
157 <argument>{}</argument>
158 <argument>;</argument>
159 </arguments>
160 </configuration>
161 </execution>
162 </executions>
163 </plugin>
164 </plugins>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500165 </build>
Dan Timoney912f98b2018-02-27 14:10:22 -0500166
167 <profiles>
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500168 <profile>
169 <id>docker</id>
170 <build>
171 <plugins>
172 <plugin>
173 <groupId>io.fabric8</groupId>
174 <artifactId>docker-maven-plugin</artifactId>
175 <version>0.16.5</version>
176 <inherited>false</inherited>
177 <configuration>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900178
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500179 <images>
180 <image>
181 <name>${image.name}</name>
182 <build>
183 <cleanup>try</cleanup>
184 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
185 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
186 <tags>
187 <tag>${project.docker.latestminortag.version}</tag>
188 <tag>${project.docker.latestfulltag.version}</tag>
189 <tag>${project.docker.latesttagtimestamp.version}</tag>
190 </tags>
191 </build>
192 </image>
193 </images>
194 </configuration>
195 <executions>
196 <execution>
197 <id>generate-images</id>
198 <phase>package</phase>
199 <goals>
200 <goal>build</goal>
201 </goals>
202 </execution>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900203
Timoney, Dan (dt5972)268c4ba2019-02-12 14:35:10 -0500204 <execution>
205 <id>push-images</id>
206 <phase>deploy</phase>
207 <goals>
208 <goal>build</goal>
209 <goal>push</goal>
210 </goals>
211 </execution>
212 </executions>
213 </plugin>
214 </plugins>
215 </build>
216 </profile>
217 </profiles>
Chinthakayala, Sheshashailavas (sc2914)b7d0c7d2017-08-28 09:00:36 -0900218</project>