skywalking-java/test/e2e/e2e-profile/e2e-profile-test-runner/pom.xml

457 lines
26 KiB
XML

<?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>e2e-profile</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>e2e-profile-test-runner</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>e2e-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>e2e-profile-service</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<properties>
<provider.name>e2e-profile-service</provider.name>
<e2e.container.version>1.4</e2e.container.version>
<e2e.container.name.prefix>skywalking-e2e-container-${build.id}-profile</e2e.container.name.prefix>
</properties>
<profiles>
<!--mysql storage -->
<profile>
<id>mysql</id>
<build>
<plugins>
<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}-datasource</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}-runner</alias>
<run>
<env>
<STORAGE>mysql</STORAGE>
<SW_JDBC_URL>
jdbc:mysql://${e2e.container.name.prefix}-datasource:3306/swtest
</SW_JDBC_URL>
<INSTRUMENTED_SERVICE_1>
${provider.name}-${project.version}.jar
</INSTRUMENTED_SERVICE_1>
<INSTRUMENTED_SERVICE_1_OPTS>
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=127.0.0.1:11800
-DSW_AGENT_PROFILE_ACTIVE=true
-DSW_AGENT_NAME=${provider.name}
-Dserver.port=9090
</INSTRUMENTED_SERVICE_1_OPTS>
</env>
<dependsOn>
<container>${e2e.container.name.prefix}-datasource</container>
</dependsOn>
<links>
<link>${e2e.container.name.prefix}-datasource</link>
</links>
<ports>
<port>+webapp.host:webapp.port:8081</port>
<port>+service.host:service.port:9090</port>
</ports>
<volumes>
<bind>
<volume>${sw.home}:/sw</volume>
<volume>${project.build.directory}:/home</volume>
<volume>
../${provider.name}/target/${provider.name}-${project.version}.jar:/home/${provider.name}-${project.version}.jar
</volume>
<volume>${project.basedir}/src/docker/rc.d:/rc.d:ro</volume>
<volume>
${project.basedir}/src/docker/adapt_storage.awk:/adapt_storage.awk
</volume>
<volume>
${project.basedir}/src/docker/profile_official_analysis.oal:/profile_official_analysis.oal
</volume>
</bind>
</volumes>
<wait>
<log>SkyWalking e2e container is ready for tests</log>
<time>3000000</time>
</wait>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--h2 storage -->
<profile>
<id>h2</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<containerNamePattern>%a-%t-%i</containerNamePattern>
<imagePullPolicy>Always</imagePullPolicy>
<images>
<image>
<name>openjdk:8-jre-buster</name>
<alias>${e2e.container.name.prefix}-datasource</alias>
<run>
<ports>
<port>h2.port:1521</port>
</ports>
<entrypoint>
<shell>bash /h2/h2-install.sh</shell>
</entrypoint>
<wait>
<log>TCP server running at tcp</log>
<time>300000</time>
</wait>
<volumes>
<bind>
<volume>${project.basedir}/src/docker/h2:/h2</volume>
</bind>
</volumes>
</run>
</image>
<image>
<name>skyapm/e2e-container:${e2e.container.version}</name>
<alias>${e2e.container.name.prefix}-runner</alias>
<run>
<env>
<STORAGE>h2</STORAGE>
<SW_STORAGE_H2_URL>
jdbc:h2:tcp://${e2e.container.name.prefix}-datasource:1521/skywalking-oap-db
</SW_STORAGE_H2_URL>
<INSTRUMENTED_SERVICE_1>
${provider.name}-${project.version}.jar
</INSTRUMENTED_SERVICE_1>
<INSTRUMENTED_SERVICE_1_OPTS>
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=127.0.0.1:11800
-DSW_AGENT_PROFILE_ACTIVE=true
-DSW_AGENT_NAME=${provider.name}
-Dserver.port=9090
</INSTRUMENTED_SERVICE_1_OPTS>
</env>
<ports>
<port>+webapp.host:webapp.port:8081</port>
<port>+service.host:service.port:9090</port>
</ports>
<dependsOn>
<container>${e2e.container.name.prefix}-datasource</container>
</dependsOn>
<links>
<link>${e2e.container.name.prefix}-datasource</link>
</links>
<volumes>
<bind>
<volume>${sw.home}:/sw</volume>
<volume>
../${provider.name}/target/${provider.name}-${project.version}.jar:/home/${provider.name}-${project.version}.jar
</volume>
<volume>${project.basedir}/src/docker/rc.d:/rc.d:ro</volume>
<volume>
${project.basedir}/src/docker/adapt_storage.awk:/adapt_storage.awk
</volume>
<volume>
${project.basedir}/src/docker/profile_official_analysis.oal:/profile_official_analysis.oal
</volume>
</bind>
</volumes>
<wait>
<log>SkyWalking e2e container is ready for tests</log>
<time>3000000</time>
</wait>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--elasticsearch storage -->
<profile>
<id>elasticsearch</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<containerNamePattern>%a-%t-%i</containerNamePattern>
<imagePullPolicy>Always</imagePullPolicy>
<images>
<image>
<name>elastic/elasticsearch:${elasticsearch.version}</name>
<alias>${e2e.container.name.prefix}-elasticsearch</alias>
<run>
<ports>
<port>es.port:9200</port>
</ports>
<wait>
<http>
<url>http://localhost:${es.port}</url>
<method>GET</method>
<status>200</status>
</http>
<time>120000</time>
</wait>
<env>
<discovery.type>single-node</discovery.type>
</env>
</run>
</image>
<image>
<name>skyapm/e2e-container:${e2e.container.version}</name>
<alias>${e2e.container.name.prefix}</alias>
<run>
<env>
<STORAGE>elasticsearch</STORAGE>
<ES_VERSION>${elasticsearch.version}</ES_VERSION>
<SW_STORAGE_ES_CLUSTER_NODES>
${e2e.container.name.prefix}-elasticsearch:9200
</SW_STORAGE_ES_CLUSTER_NODES>
<INSTRUMENTED_SERVICE_1>
${provider.name}-${project.version}.jar
</INSTRUMENTED_SERVICE_1>
<INSTRUMENTED_SERVICE_1_OPTS>
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=127.0.0.1:11800
-DSW_AGENT_PROFILE_ACTIVE=true
-DSW_AGENT_NAME=${provider.name}
-Dserver.port=9090
</INSTRUMENTED_SERVICE_1_OPTS>
</env>
<dependsOn>
<container>${e2e.container.name.prefix}-elasticsearch</container>
</dependsOn>
<ports>
<port>+webapp.host:webapp.port:8081</port>
<port>+service.host:service.port:9090</port>
</ports>
<links>
<link>${e2e.container.name.prefix}-elasticsearch</link>
</links>
<volumes>
<bind>
<volume>${sw.home}:/sw</volume>
<volume>
../${provider.name}/target/${provider.name}-${project.version}.jar:/home/${provider.name}-${project.version}.jar
</volume>
<volume>${project.basedir}/src/docker/rc.d:/rc.d:ro</volume>
<volume>
${project.basedir}/src/docker/adapt_storage.awk:/adapt_storage.awk
</volume>
<volume>
${project.basedir}/src/docker/profile_official_analysis.oal:/profile_official_analysis.oal
</volume>
</bind>
</volumes>
<wait>
<log>SkyWalking e2e container is ready for tests</log>
<time>3000000</time>
</wait>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- InfluxDB storage -->
<profile>
<id>influxdb</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<containerNamePattern>%a-%t-%i</containerNamePattern>
<images>
<image>
<name>openjdk:8-jre-buster</name>
<alias>${e2e.container.name.prefix}-h2</alias>
<run>
<ports>
<port>h2.port:1521</port>
</ports>
<entrypoint>
<shell>bash /h2/h2-install.sh</shell>
</entrypoint>
<wait>
<log>TCP server running at tcp</log>
<time>300000</time>
</wait>
<volumes>
<bind>
<volume>${project.basedir}/src/docker/h2:/h2</volume>
</bind>
</volumes>
</run>
</image>
<image>
<name>influxdb:${influxdb.version}</name>
<alias>${e2e.container.name.prefix}-influxdb</alias>
<run>
<ports>
<port>influxdb.port:8086</port>
</ports>
<wait>
<http>
<url>http://${docker.host.address}:${influxdb.port}/ping</url>
<method>GET</method>
</http>
<time>50000</time>
</wait>
</run>
</image>
<image>
<name>skyapm/e2e-container:${e2e.container.version}</name>
<alias>${e2e.container.name.prefix}</alias>
<run>
<env>
<STORAGE>influxdb</STORAGE>
<SW_STORAGE_METABASE_URL>jdbc:h2:tcp://${e2e.container.name.prefix}-h2:1521/skywalking-oap-db</SW_STORAGE_METABASE_URL>
<SW_STORAGE_INFLUXDB_URL>http://${e2e.container.name.prefix}-influxdb:8086</SW_STORAGE_INFLUXDB_URL>
<INSTRUMENTED_SERVICE_1>
${provider.name}-${project.version}.jar
</INSTRUMENTED_SERVICE_1>
<INSTRUMENTED_SERVICE_1_OPTS>
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=127.0.0.1:11800
-DSW_AGENT_PROFILE_ACTIVE=true
-DSW_AGENT_NAME=${provider.name}
-Dserver.port=9090
</INSTRUMENTED_SERVICE_1_OPTS>
</env>
<dependsOn>
<container>${e2e.container.name.prefix}-h2</container>
<container>${e2e.container.name.prefix}-influxdb</container>
</dependsOn>
<ports>
<port>+webapp.host:webapp.port:8081</port>
<port>+service.host:service.port:9090</port>
</ports>
<links>
<link>${e2e.container.name.prefix}-h2</link>
<link>${e2e.container.name.prefix}-influxdb</link>
</links>
<volumes>
<bind>
<volume>${sw.home}:/sw</volume>
<volume>../${provider.name}/target/${provider.name}-${project.version}.jar:/home/${provider.name}-${project.version}.jar</volume>
<volume>${project.basedir}/src/docker/rc.d:/rc.d:ro</volume>
<volume>${project.basedir}/src/docker/adapt_storage.awk:/adapt_storage.awk</volume>
<volume>${project.basedir}/src/docker/profile_official_analysis.oal:/profile_official_analysis.oal</volume>
<volume>${project.basedir}/src/docker/h2:/h2</volume>
</bind>
</volumes>
<wait>
<log>SkyWalking e2e container is ready for tests</log>
<time>3000000</time>
</wait>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<!-- 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>
<service.host>${service.host}</service.host>
<service.port>${service.port}</service.port>
<provider.name>${provider.name}</provider.name>
<SW_STORAGE_ES_CLUSTER_NODES>localhost:${es.port}</SW_STORAGE_ES_CLUSTER_NODES>
<SW_STORAGE_INFLUXDB_URL>http://localhost:${influxdb.port}</SW_STORAGE_INFLUXDB_URL>
<SW_JDBC_URL>jdbc:mysql://localhost:${mysql.port}/swtest</SW_JDBC_URL>
<SW_STORAGE_H2_URL>jdbc:h2:tcp://localhost:${h2.port}/skywalking-oap-db</SW_STORAGE_H2_URL>
<SW_STORAGE_METABASE_URL>jdbc:h2:tcp://localhost:${h2.port}/skywalking-oap-db</SW_STORAGE_METABASE_URL>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>