Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/plugin autotest #3528

Merged
merged 35 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2da1ced
test/plugin autotest
dmsolr Sep 26, 2019
3c54141
move run.sh back to root
dmsolr Sep 26, 2019
9ecc44b
exit code and fail-fast
dmsolr Sep 26, 2019
e375210
fix missing field and other
dmsolr Sep 26, 2019
59cf079
bug fix
dmsolr Sep 26, 2019
dc1b1b0
fix losing status
dmsolr Sep 26, 2019
3368c4c
add license header
dmsolr Sep 27, 2019
100506d
fix missing license headers
dmsolr Sep 28, 2019
8d27386
specify interpreter's command must be at the top of file
dmsolr Sep 28, 2019
af5a198
Merge branch 'master' into test/plugin
wu-sheng Sep 28, 2019
1b3dcb5
Merge branch 'master' into test/plugin
wu-sheng Sep 30, 2019
f90e479
Merge branch 'test/plugin' of https://github.com/dmsolr/skywalking in…
dmsolr Sep 30, 2019
0f549b5
aync
dmsolr Sep 30, 2019
ee3a8b2
Merge branch 'master' into test/plugin
wu-sheng Oct 3, 2019
412475e
Merge branch 'master' into test/plugin
wu-sheng Oct 5, 2019
b0ee334
support docker-compose & optimize pom's dependencies
dmsolr Oct 6, 2019
dbb5fb9
sync
dmsolr Oct 6, 2019
6e1aafb
Merge branch 'test/plugin' of https://github.com/dmsolr/skywalking in…
dmsolr Oct 6, 2019
78f3769
sync
dmsolr Oct 7, 2019
72f4813
Merge branch 'master' into test/plugin
wu-sheng Oct 7, 2019
def2e48
checkstyle
dmsolr Oct 7, 2019
0a1668e
fixes things
dmsolr Oct 7, 2019
0cbccba
Merge branch 'master' into test/plugin
wu-sheng Oct 7, 2019
05f15cc
curl -s
dmsolr Oct 7, 2019
5afd69f
sync
dmsolr Oct 7, 2019
3a11bb1
Update test/plugin/containers/pom.xml
dmsolr Oct 7, 2019
036d890
Update Jenkinsfile-Agent-Test
dmsolr Oct 7, 2019
e6b5383
adds and renames for docker_image & supports args in run.sh
dmsolr Oct 7, 2019
cf9c9a4
fix
dmsolr Oct 7, 2019
7698caa
sync
dmsolr Oct 7, 2019
2337998
Merge branch 'master' into test/plugin
dmsolr Oct 7, 2019
d63de4e
rename a stage
dmsolr Oct 8, 2019
a37f21c
Merge branch 'master' into test/plugin
wu-sheng Oct 8, 2019
0b8e739
limit a container's runtime memory
dmsolr Oct 8, 2019
a6de397
modifies Jenkins's label and removes 2>&2
dmsolr Oct 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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