172 lines
7.5 KiB
XML
Executable File
172 lines
7.5 KiB
XML
Executable File
<?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">
|
|
<parent>
|
|
<artifactId>apache-skywalking-e2e</artifactId>
|
|
<groupId>org.apache.skywalking</groupId>
|
|
<version>1.0.0</version>
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>e2e-mysql</artifactId>
|
|
|
|
<properties>
|
|
<e2e.container.name.prefix>skywalking-e2e-container-${build.id}-single-node-mysql</e2e.container.name.prefix>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
<version>${spring.boot.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<version>${h2.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.skywalking</groupId>
|
|
<artifactId>e2e-base</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<version>${spring.boot.version}</version>
|
|
<configuration>
|
|
<executable>true</executable>
|
|
<addResources>true</addResources>
|
|
<excludeDevtools>true</excludeDevtools>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>repackage</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>io.fabric8</groupId>
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
<configuration>
|
|
<containerNamePattern>%a-%t-%i</containerNamePattern>
|
|
<images>
|
|
<image>
|
|
<name>mysql/mysql-server:${mysql.version}</name>
|
|
<alias>${e2e.container.name.prefix}-mysql</alias>
|
|
<run>
|
|
<wait>
|
|
<log>Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 3306</log>
|
|
<time>120000</time>
|
|
</wait>
|
|
<env>
|
|
<MYSQL_ROOT_PASSWORD>root@1234</MYSQL_ROOT_PASSWORD>
|
|
<MYSQL_DATABASE>swtest</MYSQL_DATABASE>
|
|
<MYSQL_ROOT_HOST>%</MYSQL_ROOT_HOST>
|
|
</env>
|
|
<ports>
|
|
<port>mysql.port:3306</port>
|
|
</ports>
|
|
</run>
|
|
</image>
|
|
<image>
|
|
<name>skyapm/e2e-container:${e2e.container.version}</name>
|
|
<alias>${e2e.container.name.prefix}</alias>
|
|
<run>
|
|
<env>
|
|
<INSTRUMENTED_SERVICE>${project.build.finalName}.jar</INSTRUMENTED_SERVICE>
|
|
<SW_JDBC_URL>jdbc:mysql://${e2e.container.name.prefix}-mysql:3306/swtest</SW_JDBC_URL>
|
|
</env>
|
|
<dependsOn>
|
|
<container>${e2e.container.name.prefix}-mysql</container>
|
|
</dependsOn>
|
|
<links>
|
|
<link>${e2e.container.name.prefix}-mysql</link>
|
|
</links>
|
|
<ports>
|
|
<port>+webapp.host:webapp.port:8081</port>
|
|
<port>+client.host:client.port:9090</port>
|
|
</ports>
|
|
<volumes>
|
|
<bind>
|
|
<volume>${sw.home}:/sw</volume>
|
|
<volume>${project.build.directory}:/home</volume>
|
|
<volume>${project.basedir}/src/docker/rc.d:/rc.d:ro</volume>
|
|
<volume>${project.basedir}/src/docker/application.yml:/application.yml</volume>
|
|
</bind>
|
|
</volumes>
|
|
<wait>
|
|
<http>
|
|
<url>
|
|
http://${docker.host.address}:${client.port}/e2e/health-check
|
|
</url>
|
|
<method>GET</method>
|
|
<status>200</status>
|
|
</http>
|
|
<time>300000</time>
|
|
</wait>
|
|
</run>
|
|
</image>
|
|
</images>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- set the system properties that can be used in test codes -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<configuration>
|
|
<systemPropertyVariables>
|
|
<sw.webapp.host>
|
|
${webapp.host}
|
|
</sw.webapp.host>
|
|
<sw.webapp.port>
|
|
${webapp.port}
|
|
</sw.webapp.port>
|
|
<client.host>
|
|
${client.host}
|
|
</client.host>
|
|
<client.port>
|
|
${client.port}
|
|
</client.port>
|
|
</systemPropertyVariables>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>verify</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|