blob: 6df37691963eae75a4166fd8dd61d8bbeab152dc [file] [log] [blame]
Timoney, Daniel (dt5972)324ee362017-02-15 10:37:53 -05001<?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>
Timoney, Daniel (dt5972)2d38fc92017-02-24 09:47:29 -05008 <version>1.0.0-SNAPSHOT</version>
Timoney, Daniel (dt5972)324ee362017-02-15 10:37:53 -05009 </parent>
10
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <groupId>org.openecomp.sdnc.oam</groupId>
14 <artifactId>installation-dgbuilder</artifactId>
Timoney, Daniel (dt5972)2d38fc92017-02-24 09:47:29 -050015 <version>1.0.0-SNAPSHOT</version>
Timoney, Daniel (dt5972)324ee362017-02-15 10:37:53 -050016
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 <executions>
100 <execution>
101 <id>make-path</id>
102 <phase>generate-sources</phase>
103 <goals>
104 <goal>exec</goal>
105 </goals>
106 <configuration>
107 <executable>/bin/mkdir</executable>
108 <arguments>
109 <argument>-p</argument>
110 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
111 </arguments>
112 </configuration>
113 </execution>
114 <execution>
115 <id>Copy dgbuilder</id>
116 <phase>generate-sources</phase>
117 <goals>
118 <goal>exec</goal>
119 </goals>
120 <configuration>
121 <executable>/bin/cp</executable>
122 <arguments>
123 <argument>-r</argument>
124 <argument>../../dgbuilder</argument>
125 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
126 </arguments>
127 </configuration>
128 </execution>
129
130 <execution>
131 <id>dgbuilder createReleaseDir</id>
132 <phase>generate-sources</phase>
133 <goals>
134 <goal>exec</goal>
135 </goals>
136 <configuration>
137 <executable>/bin/bash</executable>
138 <arguments>
139 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/dgbuilder/createReleaseDir</argument>
140 <argument>1702</argument>
141 <argument>dguser</argument>
142 <argument>change_email_id@dgbuilder.com</argument>
143 </arguments>
144 </configuration>
145 </execution>
146
147 <execution>
148 <id>change shell permissions</id>
149 <phase>process-sources</phase>
150 <goals>
151 <goal>exec</goal>
152 </goals>
153 <configuration>
154 <executable>/usr/bin/find</executable>
155 <arguments>
156 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
157 <argument>-name</argument>
158 <argument>*.sh</argument>
159 <argument>-exec</argument>
160 <argument>chmod</argument>
161 <argument>+x</argument>
162 <argument>{}</argument>
163 <argument>;</argument>
164 </arguments>
165 </configuration>
166 </execution>
167 </executions>
168 </plugin>
169
170
171 </plugins>
172
173 </build>
174 <organization>
175 <name>openECOMP</name>
176 </organization>
177</project>