| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~ contributor license agreements. See the NOTICE file distributed with |
| ~ this work for additional information regarding copyright ownership. |
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~ (the "License"); you may not use this file except in compliance with |
| ~ the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| ~ |
| --> |
| <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/xsd/maven-4.0.0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.skywalking.plugin.nginx-lua</groupId> |
| <artifactId>e2e-test</artifactId> |
| <version>1.0.0</version> |
| </parent> |
| |
| <artifactId>nginx</artifactId> |
| <packaging>jar</packaging> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>io.fabric8</groupId> |
| <artifactId>docker-maven-plugin</artifactId> |
| <configuration> |
| <containerNamePattern>%a-%t-%i</containerNamePattern> |
| <images> |
| <image> |
| <name>openresty-with-skywalking</name> |
| <build> |
| <from>openresty/openresty</from> |
| <workdir>/skywalking-nginx-lua</workdir> |
| <cmd> |
| <shell>apt update</shell> |
| <shell>apt install -y luarocks</shell> |
| </cmd> |
| </build> |
| <run> |
| <dependsOn> |
| <container>skywalking-collector</container> |
| </dependsOn> |
| <ports> |
| <port>+nginx.host:nginx.port:8080</port> |
| </ports> |
| <volumes> |
| <bind> |
| <volume>${project.basedir}/docker/conf.d:/var/nginx/conf.d</volume> |
| <volume>${project.basedir}/docker/bin:/opt/bin</volume> |
| <volume> |
| ${project.basedir}/../../../..:/skywalking-nginx-lua/ |
| </volume> |
| </bind> |
| </volumes> |
| <links> |
| <link>skywalking-collector</link> |
| </links> |
| <wait> |
| <http> |
| <url> |
| http://${docker.host.address}:${nginx.port} |
| </url> |
| </http> |
| <time>30000</time> |
| </wait> |
| <cmd>bash /opt/bin/startup.sh</cmd> |
| </run> |
| </image> |
| <image> |
| <name>skywalking-collector:${project.version}</name> |
| <alias>skywalking-collector</alias> |
| <run> |
| <ports> |
| <port>+collector.host:collector.port:12800</port> |
| </ports> |
| <wait> |
| <http> |
| <url>http://${docker.host.address}:${collector.port}/receiveData</url> |
| </http> |
| <time>30000</time> |
| </wait> |
| </run> |
| </image> |
| </images> |
| </configuration> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <version>${maven-failsafe-plugin.version}</version> |
| <configuration> |
| <systemPropertyVariables> |
| <service.entry>http://${nginx.host}:${nginx.port}/ingress</service.entry> |
| <validation.entry>http://${collector.host}:${collector.port}/dataValidate</validation.entry> |
| <healthcheck.entry>http://${collector.host}:${collector.port}/status</healthcheck.entry> |
| </systemPropertyVariables> |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>verify</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |