-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
137 lines (133 loc) · 4.92 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>testing-docker-image</artifactId>
<groupId>camilocot</groupId>
<version>0.0.1-SNAPSHOT</version>
<packaging>docker</packaging>
<description>A simple IT verifying a basic use case</description>
<properties>
<docker.image.from>nginx</docker.image.from>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<docker-maven-plugin.version>0.27.2</docker-maven-plugin.version>
<docker.verbose>true</docker.verbose>
<docker.startParallel>true</docker.startParallel>
<docker.files.nginx.dir>${project.basedir}/src/main/docker-nginx</docker.files.nginx.dir>
<docker.files.bats.dir>${project.basedir}/src/main/docker-bats</docker.files.bats.dir>
<docker.nginx.image.alias>nginx</docker.nginx.image.alias>
<docker.logStdout>false</docker.logStdout>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<images>
<image>
<name>camilocot/nginx</name>
<alias>${docker.nginx.image.alias}</alias>
<build>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
<dockerFileDir>${docker.files.nginx.dir}</dockerFileDir>
<compression>gzip</compression>
</build>
<run>
<wait>
<http>
<url>http://localhost:${host.port}</url>
</http>
<time>10000</time>
</wait>
<ports>
<port>+container.ip.property:host.port:80</port>
</ports>
<links>
<link>mock-server:internal-gat</link>
</links>
<volumes>
<bind>
<volume>${docker.files.nginx.dir}/sample-files:/var/www/htdocs</volume>
</bind>
</volumes>
</run>
</image>
<image>
<alias>mock-server</alias>
<name>jordimartin/mmock:latest</name>
<run>
<cmd>-server-port 4200</cmd>
<volumes>
<bind>
<volume>${docker.files.nginx.dir}/execution_path:/config</volume>
</bind>
</volumes>
</run>
</image>
<image>
<alias>bats</alias>
<name>camilocot/bats:latest</name>
<build>
<tags>
<tag>latest</tag>
</tags>
<dockerFileDir>${docker.files.bats.dir}</dockerFileDir>
<compression>gzip</compression>
</build>
<run>
<wait>
<exit>0</exit>
</wait>
<links>
<link>${docker.nginx.image.alias}</link>
</links>
<cmd>
<shell>/test</shell>
</cmd>
<volumes>
<bind>
<volume>${docker.files.bats.dir}/test:/test</volume>
</bind>
</volumes>
<env>
<NGINX_HOST>${docker.nginx.image.alias}</NGINX_HOST>
</env>
<log>
<date>default</date>
<file>${project.build.directory}/test-results/bats/results.txt</file>
</log>
</run>
</image>
<image>
<alias>container-structure-test</alias>
<name>gcr.io/gcp-runtimes/container-structure-test</name>
<run>
<wait>
<exit>0</exit>
</wait>
<privileged>true</privileged>
<cmd>
<shell>test --image camilocot/nginx:${project.version} --config /test/test_config.yaml</shell></cmd>
<log>
<date>default</date>
<file>${project.build.directory}/test-results/container-structure-test/results.txt</file>
</log>
<volumes>
<bind>
<volume>${docker.files.nginx.dir}/container-structure-test:/test</volume>
<volume>/var/run/docker.sock:/var/run/docker.sock</volume>
</bind>
</volumes>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</project>