blob: 7a45574c079806ba2adbaf47803fcdad53f6f2d0 [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-admportal</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 - admportal</name>
18 <description>Creates admportal Docker container</description>
19
20 <properties>
21 <image.name>ecomp/admportal-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>generate-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
71 <plugin>
72 <artifactId>maven-resources-plugin</artifactId>
73 <version>2.6</version>
74 <executions>
75 <execution>
76 <id>copy-dockerfile</id>
77 <goals>
78 <goal>copy-resources</goal>
79 </goals><!-- here the phase you need -->
80 <phase>validate</phase>
81 <configuration>
82 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
83 <resources>
84 <resource>
85 <directory>src/main/docker</directory>
86 <includes>
87 <include>Dockerfile</include>
88 </includes>
89 <filtering>true</filtering>
90 </resource>
91 </resources>
92 </configuration>
93 </execution>
94 <execution>
95 <id>copy-properties</id>
96 <goals>
97 <goal>copy-resources</goal>
98 </goals><!-- here the phase you need -->
99 <phase>validate</phase>
100 <configuration>
101 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
102 <resources>
103 <resource>
104 <directory>../src/main/properties</directory>
105 <includes>
106 <include>*.properties</include>
107 <include>*.properties.sdnctldb01</include>
108 </includes>
109 <filtering>false</filtering>
110 </resource>
111 </resources>
112 </configuration>
113 </execution>
114 </executions>
115 </plugin>
116 <plugin>
117 <artifactId>exec-maven-plugin</artifactId>
118 <groupId>org.codehaus.mojo</groupId>
Timoney, Daniel (dt5972)12dc3ee2017-03-07 10:01:56 -0500119 <version>1.5.0</version>
Timoney, Daniel (dt5972)324ee362017-02-15 10:37:53 -0500120 <executions>
121 <execution>
122 <id>Unzip admportal</id>
123 <phase>generate-sources</phase>
124 <goals>
125 <goal>exec</goal>
126 </goals>
127 <configuration>
128 <executable>/usr/bin/unzip</executable>
129 <arguments>
130 <argument>-d</argument>
131 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
132 <argument>../../admportal/target/*.zip</argument>
133 </arguments>
134 </configuration>
135 </execution>
136
137 <execution>
138 <id>Copy admportal config</id>
139 <phase>generate-sources</phase>
140 <goals>
141 <goal>exec</goal>
142 </goals>
143 <configuration>
144 <executable>/bin/cp</executable>
145 <arguments>
146 <argument>../../admportal/config/admportal.json</argument>
147 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
148 </arguments>
149 </configuration>
150 </execution>
151
152 <execution>
153 <id>Copy admportal config1</id>
154 <phase>generate-sources</phase>
155 <goals>
156 <goal>exec</goal>
157 </goals>
158 <configuration>
159 <executable>/bin/cp</executable>
160 <arguments>
161 <argument>../../admportal/config/admportal.log4js.json</argument>
162 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
163 </arguments>
164 </configuration>
165 </execution>
166
167
168 <execution>
169 <id>change shell permissions</id>
170 <phase>process-sources</phase>
171 <goals>
172 <goal>exec</goal>
173 </goals>
174 <configuration>
175 <executable>/usr/bin/find</executable>
176 <arguments>
177 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
178 <argument>-name</argument>
179 <argument>*.sh</argument>
180 <argument>-exec</argument>
181 <argument>chmod</argument>
182 <argument>+x</argument>
183 <argument>{}</argument>
184 <argument>;</argument>
185 </arguments>
186 </configuration>
187 </execution>
188 </executions>
189 </plugin>
190
191
192 </plugins>
193
194 </build>
195 <organization>
196 <name>openECOMP</name>
197 </organization>
198</project>