[DOCKER] Dgbuilder docker build fails
[sdnc/oam.git] / installation / dgbuilder / pom.xml
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>
6                 <groupId>org.openecomp.sdnc.oam</groupId>
7                 <artifactId>installation</artifactId>
8                 <version>1.0.0-SNAPSHOT</version>
9         </parent>
10
11         <modelVersion>4.0.0</modelVersion>
12         <packaging>pom</packaging>
13         <groupId>org.openecomp.sdnc.oam</groupId>
14         <artifactId>installation-dgbuilder</artifactId>
15         <version>1.0.0-SNAPSHOT</version>
16
17         <name>Installation - dgbuilder</name>
18         <description>Creates docker container for dgbuilder</description>
19
20         <properties>
21                 <image.name>ecomp/dgbuilder-sdnc-image</image.name>
22         </properties>
23
24
25         <build>
26                 <plugins>
27
28
29                         <plugin>
30                                 <groupId>io.fabric8</groupId>
31                                 <artifactId>docker-maven-plugin</artifactId>
32                                 <version>0.16.5</version>
33                                 <inherited>false</inherited>
34                                 <configuration>
35
36                                         <images>
37                                                 <image>
38                                                         <name>${image.name}</name>
39                                                         <build>
40                                                                 <cleanup>try</cleanup>
41                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
42                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
43                                                                 <tags>
44                                                                         <tag>${project.version}</tag>
45                                                                         <tag>latest</tag>
46                                                                 </tags>
47                                                         </build>
48                                                 </image>
49                                         </images>
50                                 </configuration>
51                                 <executions>
52                                         <execution>
53                                                 <id>generate-images</id>
54                                                 <phase>process-sources</phase>
55                                                 <goals>
56                                                         <goal>build</goal>
57                                                 </goals>
58                                         </execution>
59
60                                         <execution>
61                                                 <id>push-images</id>
62                                                 <phase>deploy</phase>
63                                                 <goals>
64                                                         <goal>build</goal>
65                                                         <goal>push</goal>
66                                                 </goals>
67                                         </execution>
68                                 </executions>
69                         </plugin>
70                         <plugin>
71                                 <artifactId>maven-resources-plugin</artifactId>
72                                 <version>2.6</version>
73                                 <executions>
74                                         <execution>
75                                                 <id>copy-dockerfile</id>
76                                                 <goals>
77                                                         <goal>copy-resources</goal>
78                                                 </goals><!-- here the phase you need -->
79                                                 <phase>validate</phase>
80                                                 <configuration>
81                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
82                                                         <resources>
83                                                                 <resource>
84                                                                         <directory>src/main/docker</directory>
85                                                                         <includes>
86                                                                                 <include>Dockerfile</include>
87                                                                         </includes>
88                                                                         <filtering>true</filtering>
89                                                                 </resource>
90                                                         </resources>
91                                                 </configuration>
92                                         </execution>
93                                 </executions>
94                         </plugin>
95
96                         <plugin>
97                                 <artifactId>exec-maven-plugin</artifactId>
98                                 <groupId>org.codehaus.mojo</groupId>
99                                 <version>1.5.0</version>
100                                 <executions>
101                                         <execution>
102                                                 <id>make-path</id>
103                                                 <phase>generate-sources</phase>
104                                                 <goals>
105                                                         <goal>exec</goal>
106                                                 </goals>
107                                                 <configuration>
108                                                         <executable>/bin/mkdir</executable>
109                                                         <arguments>
110                                                                 <argument>-p</argument>
111                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
112                                                         </arguments>
113                                                 </configuration>
114                                         </execution>
115                                         <execution>
116                                                 <id>Copy dgbuilder</id>
117                                                 <phase>generate-sources</phase>
118                                                 <goals>
119                                                         <goal>exec</goal>
120                                                 </goals>
121                                                 <configuration>
122                                                         <executable>/bin/cp</executable>
123                                                         <arguments>
124                                                                 <argument>-r</argument>
125                                                                 <argument>../../dgbuilder</argument>
126                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
127                                                         </arguments>
128                                                 </configuration>
129                                         </execution>
130
131                                         <execution>
132                                                 <id>dgbuilder createReleaseDir</id>
133                                                 <phase>generate-sources</phase>
134                                                 <goals>
135                                                         <goal>exec</goal>
136                                                 </goals>
137                                                 <configuration>
138                                                         <executable>/bin/bash</executable>
139                                                         <arguments>
140                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/dgbuilder/createReleaseDir</argument>
141                                                                 <argument>1702</argument>
142                                                                 <argument>dguser</argument>
143                                                                 <argument>change_email_id@dgbuilder.com</argument>
144                                                         </arguments>
145                                                 </configuration>
146                                         </execution>
147
148                                         <execution>
149                                                 <id>change shell permissions</id>
150                                                 <phase>process-sources</phase>
151                                                 <goals>
152                                                         <goal>exec</goal>
153                                                 </goals>
154                                                 <configuration>
155                                                         <executable>/usr/bin/find</executable>
156                                                         <arguments>
157                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
158                                                                 <argument>-name</argument>
159                                                                 <argument>*.sh</argument>
160                                                                 <argument>-exec</argument>
161                                                                 <argument>chmod</argument>
162                                                                 <argument>+x</argument>
163                                                                 <argument>{}</argument>
164                                                                 <argument>;</argument>
165                                                         </arguments>
166                                                 </configuration>
167                                         </execution>
168                                 </executions>
169                         </plugin>
170
171
172                 </plugins>
173
174         </build>
175         <organization>
176                 <name>openECOMP</name>
177         </organization>
178 </project>