diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 5b3f6dbea..8339496ac 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -16,7 +16,7 @@ name: docker-ci -on: [push, pull_request] +on: [pull_request] env: SKIP_TEST: true DOCKER_DIR: ./docker diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 000000000..70daca447 --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,80 @@ +# 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. + +name: E2E + +on: [pull_request] + +jobs: + Single: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set environment + run: export MAVEN_OPTS='-Dmaven.repo.local=~/.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g' + - name: Compile & Install Test Codes + run: | + ./mvnw checkstyle:check apache-rat:check + ./mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -DskipTests clean install + ./mvnw -f test/e2e/pom.xml -pl e2e-base clean install + - name: Single Node Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Single Node Tests(MySQL/JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-mysql + - name: Single Node Tests(JDK9) + run: export E2E_VERSION=jdk9-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Single Node Tests(JDK11) + run: export E2E_VERSION=jdk11-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Single Node Tests(JDK12) + run: export E2E_VERSION=jdk12-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Agent Reboot Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-agent-reboot + + Cluster: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set environment + run: export MAVEN_OPTS='-Dmaven.repo.local=~/.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g' + - name: Compile & Install Test Codes + run: | + ./mvnw checkstyle:check apache-rat:check + ./mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -DskipTests clean install + ./mvnw -f test/e2e/pom.xml -pl e2e-base clean install + - name: Cluster Tests (ES6/ZK/JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-cluster/test-runner + - name: TTL ES Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-ttl/e2e-ttl-es + - name: TTL ES7 Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 DIST_PACKAGE=apache-skywalking-apm-bin-es7.tar.gz ES_VERSION=7.0.0 && bash -x test/e2e/run.sh e2e-ttl/e2e-ttl-es + - name: Cluster Tests (ES7/ZK/JDK8) + run: export E2E_VERSION=jdk8-1.3 DIST_PACKAGE=apache-skywalking-apm-bin-es7.tar.gz ES_VERSION=7.0.0 && bash -x test/e2e/run.sh e2e-cluster/test-runner diff --git a/.github/workflows/istio-mixer-ci.yaml b/.github/workflows/istio-mixer-ci.yaml index fe4394609..d5b0b75c5 100644 --- a/.github/workflows/istio-mixer-ci.yaml +++ b/.github/workflows/istio-mixer-ci.yaml @@ -16,7 +16,7 @@ name: istio-mixer-ci -on: [push] +on: [pull_request] env: SCRIPTS_DIR: ./test/scripts LOG_DIR: /tmp/skywalking diff --git a/.github/workflows/plugins-test.yaml b/.github/workflows/plugins-test.yaml new file mode 100644 index 000000000..238fab61b --- /dev/null +++ b/.github/workflows/plugins-test.yaml @@ -0,0 +1,274 @@ +# 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. + +name: Agent Plugins Tests + +on: [pull_request] + +jobs: + Group1: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run spring-tx 4.x+ (10) + run: bash test/plugin/run.sh spring-tx-scenario + - name: Run spring 4.3.x-5.2.x (54) + run: bash test/plugin/run.sh spring-4.3.x-scenario + - name: Run dubbo 2.5.x-2.6.x (10) + run: bash test/plugin/run.sh dubbo-2.5.x-scenario + - name: Run dubbo 2.7.x (4) + run: bash test/plugin/run.sh dubbo-2.7.x-scenario + - name: Run okhttp 3.0.x-3.14.x (34) + run: bash test/plugin/run.sh okhttp-scenario + + Group2: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run redisson 3.x (37) + run: bash test/plugin/run.sh redisson-scenario + - name: Run spring 3.1.x-4.0.x (25) + run: bash test/plugin/run.sh spring-3.1.x-scenario + - name: Run spring-cloud-gateway 2.1.x (3) + run: bash test/plugin/run.sh gateway-scenario + - name: Run elasticsearch 5.x (3) + run: bash test/plugin/run.sh elasticsearch-5.x-scenario + + Group3: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run apm-toolkit-trace (1) + run: bash test/plugin/run.sh apm-toolkit-trace-scenario + - name: Run jetty 9.x (63) + run: bash test/plugin/run.sh jetty-scenario + - name: Run netty-socketio 1.x (4) + run: bash test/plugin/run.sh netty-socketio-scenario + - name: Run rabbitmq-scenario (12) + run: bash test/plugin/run.sh rabbitmq-scenario + + Group4: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run feign 9.0.0-9.5.1 (8) + run: bash test/plugin/run.sh feign-scenario + - name: Run customize (1) + run: bash test/plugin/run.sh customize-scenario + - name: Run postgresql 9.4.1207+ (62) + run: bash test/plugin/run.sh postgresql-above9.4.1207-scenario + - name: Run canal 1.0.24-1.1.2 (5) + run: bash test/plugin/run.sh canal-scenario + + Group5: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run hystrix 1.4.20-1.5.12 (20) + run: bash test/plugin/run.sh hystrix-scenario + - name: Run postgresql 9.2.x-9.4.x (36) + run: bash test/plugin/run.sh postgresql-scenario + - name: Run sofarpc 5.4.0-5.6.2 (23) + run: bash test/plugin/run.sh sofarpc-scenario + - name: Run spring 3.0.x (8) + run: bash test/plugin/run.sh spring-3.0.x-scenario + + Group6: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run spring async 4.3.x-5.1.x (35) + run: bash test/plugin/run.sh spring-async-scenario + - name: Run mongodb 3.4.0-3.11.1 (17) + run: bash test/plugin/run.sh mongodb-3.x-scenario + - name: Run grpc 1.6.0-1.25.0 (22) + run: bash test/plugin/run.sh grpc-scenario + + Group7: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run elasticsearch-6.x-scenario 6.7.1-6.8.4 (7) + run: bash test/plugin/run.sh elasticsearch-6.x-scenario + - name: Run kafka 0.11.0.0-2.3.0 (16) + run: bash test/plugin/run.sh kafka-scenario + - name: Run ehcache 2.8.x-2.10.x (19) + run: bash test/plugin/run.sh ehcache-2.x-scenario + - name: Run undertow 1.3.0-2.0.27 (23) + run: bash test/plugin/run.sh undertow-scenario + - name: Run jedis 2.4.0-2.9.0 (18) + run: bash test/plugin/run.sh jedis-scenario + + Group8: + runs-on: ubuntu-18.04 + timeout-minutes: 90 + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build SkyWalking Agent + run: ./mvnw clean package -DskipTests -Pagent >/dev/null + - name: Build the Docker image + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + - name: Run elasticsearch-7.x-scenario 7.0.0-7.4.2 (11) + run: bash test/plugin/run.sh elasticsearch-7.x-scenario + - name: Run spring-webflux 2.x (18) + run: bash test/plugin/run.sh webflux-scenario + - name: Run spring 4.1.x-4.2.x (20) + run: bash test/plugin/run.sh spring-4.1.x-scenario + - name: Run solrj 7.x (12) + run: bash test/plugin/run.sh solrj-7.x-scenario + - name: Run httpclient 4.3.x-4.5.x (14) + run: bash test/plugin/run.sh httpclient-4.3.x-scenario + - name: Run httpasyncclient 4.0-4.1.3 (7) + run: bash test/plugin/run.sh httpasyncclient-scenario \ No newline at end of file diff --git a/Jenkinsfile-Agent-Test b/Jenkinsfile-Agent-Test deleted file mode 100755 index 2a34b3f0f..000000000 --- a/Jenkinsfile-Agent-Test +++ /dev/null @@ -1,148 +0,0 @@ -/* - * 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') - parallelsAlwaysFailFast() - } - - tools { - jdk 'JDK 1.8 (latest)' - } - - environment { - BUILD_NO="wl1_${BUILD_ID}" - 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 { - sh 'bash ./test/plugin/script/systeminfo.sh' - deleteDir() - checkout scm - sh 'git submodule update --init' - } - } - - stage('Compile agent Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -Pagent clean package -DskipTests' - } - } - - stage('Compile plugin-test tools Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build' - } - } - stage('Test Cases Report (156)') { - steps { - echo "Test Cases Report" - } - } - - stage('Run Agent Plugin Tests') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - parallel { - stage('Group1') { - stages { - stage('apm-toolkit-trace (1)') { - steps { - sh 'bash test/plugin/run.sh apm-toolkit-trace-scenario' - } - } - - stage('jetty 9.x (63)') { - steps { - sh 'bash test/plugin/run.sh jetty-scenario' - } - } - - stage('netty-socketio 1.x (4)') { - steps { - sh 'bash test/plugin/run.sh netty-socketio-scenario' - } - } - - stage('rabbitmq-scenario (12)') { - steps { - sh 'bash test/plugin/run.sh rabbitmq-scenario' - } - } - } - } - - stage('Group2') { - stages { - stage('feign 9.0.0-9.5.1 (8)') { - steps { - sh 'bash test/plugin/run.sh feign-scenario' - } - } - - stage('customize (1)') { - steps { - sh 'bash test/plugin/run.sh customize-scenario' - } - } - - stage('postgresql 9.4.1207+ (62)') { - steps { - sh 'bash test/plugin/run.sh postgresql-above9.4.1207-scenario' - } - } - - stage('canal 1.0.24-1.1.2 (5)') { - steps { - sh 'bash test/plugin/run.sh canal-scenario' - } - } - } - } - } - } - } - - post { - cleanup { - sh 'bash test/plugin/run.sh --cleanup' - deleteDir() - } - } -} diff --git a/Jenkinsfile-Agent-Test-2 b/Jenkinsfile-Agent-Test-2 deleted file mode 100755 index 0e15485bf..000000000 --- a/Jenkinsfile-Agent-Test-2 +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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') - parallelsAlwaysFailFast() - } - - tools { - jdk 'JDK 1.8 (latest)' - } - - environment { - BUILD_NO="wl2_${BUILD_ID}" - 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 { - sh 'bash ./test/plugin/script/systeminfo.sh' - deleteDir() - checkout scm - sh 'git submodule update --init' - } - } - - stage('Compile agent Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -Pagent clean package -DskipTests' - } - } - - stage('Compile plugin-test tools Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build' - } - } - stage('Test Cases Report (170)') { - steps { - echo "Test Cases Report" - } - } - - stage('Run Agent Plugin Tests') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - parallel { - stage('Group1') { - stages { - stage('spring-tx 4.x+ (10)') { - steps { - sh 'bash test/plugin/run.sh spring-tx-scenario' - } - } - - stage('spring 4.3.x-5.2.x (54)') { - steps { - sh 'bash test/plugin/run.sh spring-4.3.x-scenario' - } - } - - stage('dubbo 2.5.x-2.6.x (10)') { - steps { - sh 'bash test/plugin/run.sh dubbo-2.5.x-scenario' - } - } - - stage('dubbo 2.7.x (4)') { - steps { - sh 'bash test/plugin/run.sh dubbo-2.7.x-scenario' - } - } - - stage('okhttp 3.0.x-3.14.x (34)') { - steps { - sh 'bash test/plugin/run.sh okhttp-scenario' - } - } - } - } - - stage('Group2') { - stages { - stage('redisson 3.x (37)') { - steps { - sh 'bash test/plugin/run.sh redisson-scenario' - } - } - - stage('spring 3.1.x-4.0.x (25)') { - steps { - sh 'bash test/plugin/run.sh spring-3.1.x-scenario' - } - } - - stage('spring-cloud-gateway 2.1.x (3)') { - steps { - sh 'bash test/plugin/run.sh gateway-scenario' - } - } - - stage('elasticsearch 5.x (3)') { - steps { - sh 'bash test/plugin/run.sh elasticsearch-5.x-scenario' - } - } - } - } - } - } - } - - post { - cleanup { - sh 'bash test/plugin/run.sh --cleanup' - deleteDir() - } - } -} diff --git a/Jenkinsfile-Agent-Test-3 b/Jenkinsfile-Agent-Test-3 deleted file mode 100755 index 9d5006162..000000000 --- a/Jenkinsfile-Agent-Test-3 +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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') - parallelsAlwaysFailFast() - } - - tools { - jdk 'JDK 1.8 (latest)' - } - - environment { - BUILD_NO="wl3_${BUILD_ID}" - 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 { - sh 'bash ./test/plugin/script/systeminfo.sh' - deleteDir() - checkout scm - sh 'git submodule update --init' - } - } - - stage('Compile agent Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -Pagent clean package -DskipTests' - } - } - - stage('Compile plugin-test tools Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build' - } - } - stage('Test Cases Report (161)') { - steps { - echo "Test Cases Report" - } - } - - stage('Run Agent Plugin Tests') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - parallel { - stage('Group1') { - stages { - stage('hystrix 1.4.20-1.5.12 (20)') { - steps { - sh 'bash test/plugin/run.sh hystrix-scenario' - } - } - - stage('postgresql 9.2.x-9.4.x (36)') { - steps { - sh 'bash test/plugin/run.sh postgresql-scenario' - } - } - - stage('sofarpc 5.4.0-5.6.2 (23)') { - steps { - sh 'bash test/plugin/run.sh sofarpc-scenario' - } - } - - stage('spring 3.0.x (8)') { - steps { - sh 'bash test/plugin/run.sh spring-3.0.x-scenario' - } - } - } - } - - stage('Group2') { - stages { - stage('spring async 4.3.x-5.1.x (35)') { - steps { - sh 'bash test/plugin/run.sh spring-async-scenario' - } - } - - stage('mongodb 3.4.0-3.11.1 (17)') { - steps { - sh 'bash test/plugin/run.sh mongodb-3.x-scenario' - } - } - - stage('grpc 1.6.0-1.25.0 (22)') { - steps { - sh 'bash test/plugin/run.sh grpc-scenario' - } - } - } - } - } - } - } - - post { - cleanup { - sh 'bash test/plugin/run.sh --cleanup' - deleteDir() - } - } -} diff --git a/Jenkinsfile-Agent-Test-4 b/Jenkinsfile-Agent-Test-4 deleted file mode 100755 index 26fa0d264..000000000 --- a/Jenkinsfile-Agent-Test-4 +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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') - parallelsAlwaysFailFast() - } - - tools { - jdk 'JDK 1.8 (latest)' - } - - environment { - BUILD_NO="wl4_${BUILD_ID}" - 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 { - sh 'bash ./test/plugin/script/systeminfo.sh' - deleteDir() - checkout scm - sh 'git submodule update --init' - } - } - - stage('Compile agent Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -Pagent clean package -DskipTests' - } - } - - stage('Compile plugin-test tools Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - steps { - sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build' - } - } - - stage('Test Cases Report (165)') { - steps { - echo "Test Cases Report" - } - } - - stage('Run Agent Plugin Tests') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/agent-build-condition.sh') - } - } - - parallel { - stage('Group1') { - stages { - stage('elasticsearch-6.x-scenario 6.7.1-6.8.4 (7)') { - steps { - sh 'bash test/plugin/run.sh elasticsearch-6.x-scenario' - } - } - - stage('kafka 0.11.0.0-2.3.0 (16)') { - steps { - sh 'bash test/plugin/run.sh kafka-scenario' - } - } - - stage('ehcache 2.8.x-2.10.x (19)') { - steps { - sh 'bash test/plugin/run.sh ehcache-2.x-scenario' - } - } - - stage('undertow 1.3.0-2.0.27 (23)') { - steps { - sh 'bash test/plugin/run.sh undertow-scenario' - } - } - - stage('jedis 2.4.0-2.9.0 (18)') { - steps { - sh 'bash test/plugin/run.sh jedis-scenario' - } - } - } - } - - stage('Group2') { - stages { - stage('elasticsearch-7.x-scenario 7.0.0-7.4.2 (11)') { - steps { - sh 'bash test/plugin/run.sh elasticsearch-7.x-scenario' - } - } - - stage('spring-webflux 2.x (18)') { - steps { - sh 'bash test/plugin/run.sh webflux-scenario' - } - } - - stage('spring 4.1.x-4.2.x (20)') { - steps { - sh 'bash test/plugin/run.sh spring-4.1.x-scenario' - } - } - - stage('solrj 7.x (12)') { - steps { - sh 'bash test/plugin/run.sh solrj-7.x-scenario' - } - } - - stage('httpclient 4.3.x-4.5.x (14)') { - steps { - sh 'bash test/plugin/run.sh httpclient-4.3.x-scenario' - } - } - - stage('httpasyncclient 4.0-4.1.3 (7)') { - steps { - sh 'bash test/plugin/run.sh httpasyncclient-scenario' - } - } - } - } - } - } - } - - post { - cleanup { - sh 'bash test/plugin/run.sh --cleanup' - deleteDir() - } - } -} \ No newline at end of file diff --git a/Jenkinsfile-E2E b/Jenkinsfile-E2E deleted file mode 100755 index 1715de29e..000000000 --- a/Jenkinsfile-E2E +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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('Prepare Distribution Package') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/e2e-build-condition.sh') - } - } - steps { - // although these checks are done in ci-it, since they are lightweight/cheap - // we're using them as a barrier here to filter out some invalid PRs (fast-fail) - // thus save unnecessary E2E builds(which is expensive) - sh './mvnw checkstyle:check apache-rat:check' - sh './mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -DskipTests clean install' - } - } - - stage('Compile Test Codes') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/e2e-build-condition.sh') - } - } - steps { - sh './mvnw -f test/e2e/pom.xml -pl e2e-base clean install' - } - } - - stage('Run End-to-End Tests') { - when { - expression { - return sh(returnStatus: true, script: 'bash tools/ci/e2e-build-condition.sh') - } - } - parallel { - stage('Group 1') { - stages { - stage('Single Node Tests(JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 bash -x test/e2e/run.sh e2e-single-service' - } - } - - stage('Single Node Tests(MySQL/JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 bash -x test/e2e/run.sh e2e-mysql' - } - } - - stage('Single Node Tests(JDK9)') { - steps { - sh 'E2E_VERSION=jdk9-1.3 bash -x test/e2e/run.sh e2e-single-service' - } - } - - stage('Single Node Tests(JDK11)') { - steps { - sh 'E2E_VERSION=jdk11-1.3 bash -x test/e2e/run.sh e2e-single-service' - } - } - - stage('Single Node Tests(JDK12)') { - steps { - sh 'E2E_VERSION=jdk12-1.3 bash -x test/e2e/run.sh e2e-single-service' - } - } - - stage('Agent Reboot Tests(JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 bash -x test/e2e/run.sh e2e-agent-reboot' - } - } - - stage('Cluster Tests (ES7/ZK/JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 DIST_PACKAGE=apache-skywalking-apm-bin-es7.tar.gz ES_VERSION=7.0.0 bash -x test/e2e/run.sh e2e-cluster/test-runner' - } - } - } - } - - stage('Group 2') { - stages { - stage('Cluster Tests (ES6/ZK/JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 bash -x test/e2e/run.sh e2e-cluster/test-runner' - } - } - - stage('TTL ES Tests(JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 bash -x test/e2e/run.sh e2e-ttl/e2e-ttl-es' - } - } - - stage('TTL ES7 Tests(JDK8)') { - steps { - sh 'E2E_VERSION=jdk8-1.3 DIST_PACKAGE=apache-skywalking-apm-bin-es7.tar.gz ES_VERSION=7.0.0 bash -x test/e2e/run.sh e2e-ttl/e2e-ttl-es' - } - } - } - } - } - } - } - - post { - cleanup { - // "Abort old build on update" will interrupt the job completely, - // we need to clean up when there are containers started by the e2e tests - sh 'docker ps' - sh 'docker ps | grep -e "skywalking-e2e-container-${BUILD_ID}" | awk \'{print $1}\' | xargs --no-run-if-empty docker stop' - sh 'docker ps | grep -e "skywalking-e2e-container-${BUILD_ID}" | awk \'{print $1}\' | xargs --no-run-if-empty docker rm' - - // Files created by docker container in the directories that are mounted from the host to - // the container can not be deleted by `deleteDir()`, we need to mount it again and delete them - // inside the container - // - // Delete all distribution folder - sh 'docker run -v $(pwd):/sw alpine sh -c "sleep 10 && rm -rf /sw/dist-for-cluster/* /sw/dist-for-single-node-service/* /sw/dist-for-agent-reboot/* /sw/dist-for-ttl-es/*"' - deleteDir() - } - } -}