Skip to content

Commit

Permalink
Merge branch 'master' into code_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 committed Oct 8, 2019
2 parents 7986822 + 0114391 commit 0d6d599
Show file tree
Hide file tree
Showing 207 changed files with 11,884 additions and 0 deletions.
70 changes: 70 additions & 0 deletions Jenkinsfile-Agent-Test
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* 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.
*
*/

pipeline {
agent {
label 'skywalking'
}

options {
timestamps()
timeout(time: 5, unit: 'HOURS')
}

tools {
jdk 'JDK 1.8 (latest)'
}

environment {
MAVEN_OPTS = '-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
}

stages {
stage('Checkout Source Code') {
steps {
deleteDir()
checkout scm
sh 'git submodule update --init'
}
}

stage('Compile agent Codes') {
steps {
sh './mvnw -Pagent clean package -DskipTests'
}
}

stage('Compile plugin-test tools Codes') {
steps {
sh './mvnw -f test/plugin/pom.xml -Pagent clean package -DskipTests -Dbuild_id=${BUILD_ID} docker:build'
}
}

stage('httpclient 4.3.x-4.5.x') {
steps {
sh 'bash test/plugin/run.sh --build_id=${BUILD_ID} httpclient-4.3.x-scenario'
}
}
}

post {
always {
deleteDir()
}
}
}
24 changes: 24 additions & 0 deletions test/plugin/containers/jvm-container/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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.

FROM openjdk:7
MAINTAINER zhangxin@apache.org

ADD docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]
RUN ["/bin/bash"]
28 changes: 28 additions & 0 deletions test/plugin/containers/jvm-container/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# 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.

/usr/local/skywalking-agent-scenario/skywalking-mock-collector/collector-startup.sh &
sleep 30
# start applications
exec "$@" &
sleep 60
curl ${SCENARIO_ENTRY_SERVICE}
sleep 40
curl http://localhost:12800/receiveData > ${SCENARIO_DATA}/${SCENARIO_NAME}_${SCENARIO_VERSION}/actualData.yaml
#
echo "Scenario[${SCENARIO_NAME}, ${SCENARIO_VERSION}] build successfully!"
38 changes: 38 additions & 0 deletions test/plugin/containers/jvm-container/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>
<packaging>jar</packaging>

<parent>
<groupId>org.apache.skywalking.plugin</groupId>
<artifactId>containers</artifactId>
<version>1.0.0</version>
</parent>

<artifactId>jvm-container</artifactId>
<name>agent-test-jvm</name>

<properties>
<skip.docker>false</skip.docker>
</properties>
</project>
65 changes: 65 additions & 0 deletions test/plugin/containers/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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>
<packaging>pom</packaging>

<parent>
<groupId>org.apache.skywalking.plugin</groupId>
<artifactId>apache-skywalking-test-plugin</artifactId>
<version>1.0.0</version>
</parent>

<artifactId>containers</artifactId>
<modules>
<module>tomcat-container</module>
<module>jvm-container</module>
</modules>

<properties>
<skip.docker>true</skip.docker>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<configuration>
<imageTags>${build_id}</imageTags>
<imageName>skywalking/${project.name}</imageName>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<skipDocker>${skip.docker}</skipDocker>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.basedir}/../../dist</directory>
<include>skywalking-mock-collector.tar.gz</include>
<include>skywalking-validator-tools.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
31 changes: 31 additions & 0 deletions test/plugin/containers/tomcat-container/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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.

FROM tomcat:8.5.42-jdk8-openjdk
MAINTAINER zhangxin@apache.org
WORKDIR /usr/local/skywalking/tools

COPY run.sh /
COPY catalina.sh /usr/local/tomcat/bin/

COPY skywalking-validator-tools.jar /usr/local/skywalking/tools
COPY skywalking-mock-collector.tar.gz /usr/local/skywalking/tools
RUN tar -xvf skywalking-mock-collector.tar.gz -C /usr/local/skywalking/tools

RUN chmod +x /usr/local/tomcat/bin/catalina.sh && chmod +x /run.sh

WORKDIR /usr/local/skywalking/scenario
CMD ["/run.sh"]
Loading

0 comments on commit 0d6d599

Please sign in to comment.