1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!--
3+
4+ Copyright 2015-2017 Hewlett Packard Enterprise Development LP.
5+
6+ Licensed under the Apache License, Version 2.0 (the "License");
7+ you may not use this file except in compliance with the License.
8+ You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+
18+ -->
19+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
20+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
21+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
22+ <modelVersion >4.0.0</modelVersion >
23+
24+ <parent >
25+ <groupId >com.github.cafapi</groupId >
26+ <artifactId >caf-common</artifactId >
27+ <version >1.11.0-SNAPSHOT</version >
28+ </parent >
29+
30+ <groupId >com.hpe.caf</groupId >
31+ <artifactId >java-postgres-container</artifactId >
32+ <packaging >pom</packaging >
33+ <version >1.0.0-SNAPSHOT</version >
34+
35+ <build >
36+ <plugins >
37+ <plugin >
38+ <groupId >io.fabric8</groupId >
39+ <artifactId >docker-maven-plugin</artifactId >
40+ <version >${fabric8.docker.maven.version} </version >
41+ <executions >
42+ <execution >
43+ <id >build-container</id >
44+ <phase >package</phase >
45+ <goals >
46+ <goal >build</goal >
47+ </goals >
48+ <configuration >
49+ <skip >false</skip >
50+ </configuration >
51+ </execution >
52+ <!-- Start the containers in pre-integration-test phase. -->
53+ <execution >
54+ <id >start</id >
55+ <phase >pre-integration-test</phase >
56+ <goals >
57+ <goal >start</goal >
58+ </goals >
59+ </execution >
60+ <!-- Stop the containers in post-integration-test phase. -->
61+ <execution >
62+ <id >stop</id >
63+ <phase >post-integration-test</phase >
64+ <goals >
65+ <goal >stop</goal >
66+ </goals >
67+ </execution >
68+ <execution >
69+ <phase >deploy</phase >
70+ <goals >
71+ <goal >push</goal >
72+ </goals >
73+ <configuration >
74+ <filter >java-postgres</filter >
75+ </configuration >
76+ </execution >
77+ </executions >
78+ <configuration >
79+ <verbose >true</verbose >
80+ <autoPull >always</autoPull >
81+ <images >
82+ <image >
83+ <alias >java-postgres</alias >
84+ <name >cafinternal/prereleases:java-postgres-${project.version} </name >
85+ <build >
86+ <from >postgres:9.4.10-alpine</from >
87+ <labels >
88+ <Build .Number>${project.version} </Build .Number>
89+ <Build .Date>${maven.build.timestamp} </Build .Date>
90+ <Git .Branch>${git.branch} </Git .Branch>
91+ <Git .Commit>${git.revision} </Git .Commit>
92+ </labels >
93+ <optimise >false</optimise >
94+ <runCmds >
95+ <runCmd >apk --update add openjdk8-jre</runCmd >
96+ </runCmds >
97+ </build >
98+ <run >
99+ <ports >
100+ <port >${postgres.db.port} :5432</port >
101+ </ports >
102+ <env >
103+ <POSTGRES_PASSWORD >root</POSTGRES_PASSWORD >
104+ <POSTGRES_USER >postgres</POSTGRES_USER >
105+ </env >
106+ <wait >
107+ <log >PostgreSQL init process complete</log >
108+ <time >120000</time >
109+ <shutdown >500</shutdown >
110+ </wait >
111+ <log >
112+ <enabled >true</enabled >
113+ </log >
114+ </run >
115+ </image >
116+ </images >
117+ </configuration >
118+ </plugin >
119+ </plugins >
120+ </build >
121+
122+ <profiles >
123+ <profile >
124+ <id >use-default-fixed-ports</id >
125+ <properties >
126+ <postgres .db.port>5432</postgres .db.port>
127+ </properties >
128+ </profile >
129+ </profiles >
130+ </project >
0 commit comments