From a6b174a09da55c147b384340c456e7a86e25b6f0 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Fri, 27 Aug 2021 07:50:30 +0800 Subject: [PATCH] Set up CI and clean up (#3) --- .../ui/docker-entrypoint.sh => .dockerignore | 18 +- .github/ISSUE_TEMPLATE | 24 --- .github/actions/plugins-test/action.yml | 13 +- .github/actions/skip/action.yml | 87 ---------- .github/workflows/ci-it.yaml | 145 ---------------- .github/workflows/ci.yaml | 75 +++++++++ .github/workflows/codeql.yaml | 4 +- .github/workflows/docker-ci.yaml | 95 ----------- .github/workflows/plugins-jdk14-test.0.yaml | 4 +- .github/workflows/plugins-test.0.yaml | 4 +- .github/workflows/plugins-test.1.yaml | 4 +- .github/workflows/plugins-test.2.yaml | 4 +- .github/workflows/plugins-test.3.yaml | 12 +- .github/workflows/publish-docker.yaml | 24 ++- .gitignore | 2 - .licenserc.yaml | 20 --- .muse/config.toml | 2 - .muse/setup.sh | 2 - docker/agent/Dockerfile.agent => Dockerfile | 13 +- Makefile | 106 ++---------- apm-commons/apm-util/pom.xml | 1 - apm-sniffer/apm-agent-core/pom.xml | 2 +- apm-sniffer/apm-agent/pom.xml | 2 +- apm-sniffer/apm-sdk-plugin/pom.xml | 2 +- apm-sniffer/apm-test-tools/pom.xml | 2 +- apm-sniffer/apm-toolkit-activation/pom.xml | 2 +- apm-sniffer/bootstrap-plugins/pom.xml | 2 +- apm-sniffer/optional-plugins/pom.xml | 2 +- apm-sniffer/optional-reporter-plugins/pom.xml | 4 +- apm-sniffer/pom.xml | 2 +- docker/.env | 2 - docker/README.md | 60 ------- docker/docker-compose.yml | 64 ------- docker/oap/Dockerfile.oap | 66 -------- docker/oap/docker-entrypoint.sh | 42 ----- docker/oap/log4j2.xml | 39 ----- docker/ui/Dockerfile.ui | 40 ----- docker/ui/logback.xml | 21 --- pom.xml | 157 ++---------------- tools/coverage/report.sh | 53 ------ 40 files changed, 143 insertions(+), 1080 deletions(-) rename docker/ui/docker-entrypoint.sh => .dockerignore (67%) mode change 100755 => 100644 delete mode 100644 .github/ISSUE_TEMPLATE delete mode 100644 .github/actions/skip/action.yml delete mode 100644 .github/workflows/ci-it.yaml create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/docker-ci.yaml delete mode 100644 .muse/config.toml delete mode 100755 .muse/setup.sh rename docker/agent/Dockerfile.agent => Dockerfile (85%) delete mode 100644 docker/.env delete mode 100644 docker/README.md delete mode 100644 docker/docker-compose.yml delete mode 100644 docker/oap/Dockerfile.oap delete mode 100755 docker/oap/docker-entrypoint.sh delete mode 100644 docker/oap/log4j2.xml delete mode 100644 docker/ui/Dockerfile.ui delete mode 100644 docker/ui/logback.xml delete mode 100755 tools/coverage/report.sh diff --git a/docker/ui/docker-entrypoint.sh b/.dockerignore old mode 100755 new mode 100644 similarity index 67% rename from docker/ui/docker-entrypoint.sh rename to .dockerignore index 807bb71a6..7eafa283f --- a/docker/ui/docker-entrypoint.sh +++ b/.dockerignore @@ -14,18 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/bin/bash - -set -e - -export LOGGING_CONFIG="webapp/logback.xml" - -if [[ ! -z "$SW_OAP_ADDRESS" ]]; then - address_arr=(${SW_OAP_ADDRESS//,/ }) - for i in "${!address_arr[@]}" - do - JAVA_OPTS="${JAVA_OPTS} -Dspring.cloud.discovery.client.simple.instances.oap-service[$i].uri=${address_arr[$i]}" - done -fi - -exec java ${JAVA_OPTS} -jar webapp/skywalking-webapp.jar "$@" +* +!skywalking-agent +skywalking-agent/logs diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE deleted file mode 100644 index 8a7036825..000000000 --- a/.github/ISSUE_TEMPLATE +++ /dev/null @@ -1,24 +0,0 @@ -Please answer these questions before submitting your issue. - -- Why do you submit this issue? -- [ ] Question or discussion -- [ ] Bug -- [ ] Requirement -- [ ] Feature or performance improvement - -___ -### Question -- What do you want to know? - -___ -### Bug -- Which version of SkyWalking, OS, and JRE? - -- Which company or project? - -- What happened? -If possible, provide a way to reproduce the error. e.g. demo application, component version. - -___ -### Requirement or improvement -- Please describe your requirements or improvement suggestions. diff --git a/.github/actions/plugins-test/action.yml b/.github/actions/plugins-test/action.yml index 150e9b056..3b931b1f7 100644 --- a/.github/actions/plugins-test/action.yml +++ b/.github/actions/plugins-test/action.yml @@ -33,9 +33,8 @@ runs: uses: actions/cache@v2 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-agent- + key: ${{ runner.os }}-maven-agent-test + restore-keys: ${{ runner.os }}-maven-agent-test - name: Check License uses: apache/skywalking-eyes@a63f4afcc287dfb3727ecc45a4afc55a5e69c15f - name: Add checkstyle-plugin @@ -66,11 +65,3 @@ runs: echo "::group::Run Plugin Test ${{ inputs.test_case }}" bash test/plugin/run.sh --image_version=${{ inputs.java_version }}-1.0.0 ${{ inputs.test_case }} echo "::endgroup::" - - name: Report Coverage - shell: bash - env: - CODECOV_TOKEN: d2065307-8f01-4637-9715-2781ef096db7 - run: | - echo "::group::Uploading Code Coverage" - bash -x tools/coverage/report.sh - echo "::endgroup::" diff --git a/.github/actions/skip/action.yml b/.github/actions/skip/action.yml deleted file mode 100644 index 60c30ffd9..000000000 --- a/.github/actions/skip/action.yml +++ /dev/null @@ -1,87 +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. -# -name: "Set Skip Env Var" -description: "Action to set the SKIP_CI environment variable indicating that we should skip CI jobs" -inputs: - paths: - description: >- - Set the SKIP_CI environment variable when and only when all the changed files located in one of the path, - the paths is shell-style pattern. - required: false - default: >- - "*.md" - "*.txt" - "skywalking-ui" - ".asf.yaml" - ".dlc.yaml" - ".licenserc.yaml" - "docs/menu.yml" - ".github/actions/skip/action.yml" - ".github/workflows/codeql.yaml" - "dist-material/release-docs" - "test/plugin/*" - "*/component-libraries.yml" - -runs: - using: "composite" - steps: - - name: Check Changed Files And Set Env Var - shell: bash - run: | - if [[ "${{ github.event_name }}" != "pull_request" ]]; then - exit 0 - fi - - BASE_SHA=$(jq -r '.pull_request.base.sha' $GITHUB_EVENT_PATH) - echo "Base sha is $BASE_SHA, head sha is $GITHUB_SHA" - - git fetch --no-tags --progress --recurse-submodules --depth=1 origin ${BASE_SHA}:origin/${BASE_SHA} - BASE_SHA=origin/${BASE_SHA} - echo "Base sha is $BASE_SHA, head sha is $GITHUB_SHA" - - if ! files=$(git --no-pager diff --name-only ${GITHUB_SHA} ${BASE_SHA}); then - exit 1 - fi - - echo "Ignore pattern:" - for pattern in $(echo '${{ inputs.paths }}'); do - echo $pattern - done - - echo "Changed files:" - for file in ${files}; do - echo $file - done - - echo "SKIP_CI=true" >> $GITHUB_ENV - for file in ${files}; do - matched=0 - for pattern in $(echo '${{ inputs.paths }}'); do - pattern=$(echo "$pattern" | sed 's/"//g') - if eval "[[ '$file' == $pattern ]]"; then - matched=1 - break - fi - done - if [[ "$matched" == "0" ]]; then - echo "$file doesn't match pattern $(echo '${{ inputs.paths }}'), stop checking" - echo "SKIP_CI=false" >> $GITHUB_ENV - break - fi - done diff --git a/.github/workflows/ci-it.yaml b/.github/workflows/ci-it.yaml deleted file mode 100644 index 2e871a181..000000000 --- a/.github/workflows/ci-it.yaml +++ /dev/null @@ -1,145 +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. - -name: CI AND IT - -on: - pull_request: - schedule: - - cron: '0 18 * * *' # TimeZone: UTC 0 - -env: - MAVEN_OPTS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit - CODECOV_TOKEN: d2065307-8f01-4637-9715-2781ef096db7 - -concurrency: - group: ci-it-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - CI: - if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') - runs-on: ubuntu-latest - timeout-minutes: 90 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Set Skip Env Var - uses: ./.github/actions/skip - - name: Check License Header - if: env.SKIP_CI != 'true' - uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Cache local Maven repository - if: env.SKIP_CI != 'true' - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - uses: actions/setup-java@v1 - if: env.SKIP_CI != 'true' - with: - java-version: 8 - - name: 'Check Javaagent Plugin List' - if: env.SKIP_CI != 'true' - run: tools/plugin/check-javaagent-plugin-list.sh - - name: 'Install & Test' - if: env.SKIP_CI != 'true' - run: | - ./mvnw -q --batch-mode -P"agent,backend,ui,dist,CI-with-IT" clean cobertura:cobertura verify install javadoc:javadoc - bash <(curl -s https://codecov.io/bash) - - CI-on-JDK11: - if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') - runs-on: ubuntu-latest - timeout-minutes: 90 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Set Skip Env Var - uses: ./.github/actions/skip - - name: Check License Header - if: env.SKIP_CI != 'true' - uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587 - - name: Cache local Maven repository - if: env.SKIP_CI != 'true' - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - uses: actions/setup-java@v1 - if: env.SKIP_CI != 'true' - with: - java-version: 11 - - name: 'Install & Test' - if: env.SKIP_CI != 'true' - run: ./mvnw -q --batch-mode clean verify install - - CI-on-Windows: - if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') - runs-on: windows-latest - timeout-minutes: 90 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Set Skip Env Var - uses: ./.github/actions/skip - - uses: actions/setup-java@v1 - if: env.SKIP_CI != 'true' - with: - java-version: 8 - - name: 'Install & Test' - if: env.SKIP_CI != 'true' - run: | - ./mvnw -q --batch-mode clean verify install - - - CI-on-MacOS: - if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') - runs-on: macos-latest - timeout-minutes: 90 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Set Skip Env Var - uses: ./.github/actions/skip - - name: Cache local Maven repository - if: env.SKIP_CI != 'true' - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - uses: actions/setup-java@v1 - if: env.SKIP_CI != 'true' - with: - java-version: 8 - - name: 'Install & Test' - if: env.SKIP_CI != 'true' - run: | - # Given packaging on Mac has a high possibility to fail, we retry one more time here - ./mvnw -q --batch-mode clean verify install || \ - ./mvnw -q --batch-mode clean verify install diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..893a4fa2c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,75 @@ +# 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: CI + +on: + pull_request: + schedule: + - cron: '0 18 * * *' # TimeZone: UTC 0 + +concurrency: + group: ci-it-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + matrix: + name: ${{ matrix.os }} - ${{ matrix.java-version }} + if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking-java') || (github.event_name != 'schedule') + runs-on: ${{ matrix.os }}-latest + timeout-minutes: 60 + strategy: + fail-fast: true + matrix: + os: [ ubuntu, macos, windows ] + java-version: [ 8 ] + include: + - os: ubuntu + java-version: 11 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Check License Header + if: matrix.os == 'ubuntu' # Container GHA is only supported in Linux system + uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-ci-${{ matrix.os }} + restore-keys: ${{ runner.os }}-maven-${{ matrix.os }} + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: ${{ matrix.java-version }} + - name: Check Javaagent Plugin List + run: tools/plugin/check-javaagent-plugin-list.sh + - name: Install and Test + if: matrix.java-version == '8' + run: ./mvnw -q --batch-mode clean verify install javadoc:javadoc + - name: Install and Test + if: matrix.java-version == '11' + run: ./mvnw -q --batch-mode clean verify install + + ci: + name: CI + runs-on: ubuntu-latest + needs: [ matrix ] + steps: + - run: echo 'Success' diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index e08fd63e7..6b093f62f 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -18,9 +18,9 @@ name: "CodeQL" on: push: - branches: [ 'master' ] + branches: [ 'main' ] pull_request: - branches: [ 'master' ] + branches: [ 'main' ] schedule: - cron: '28 3 * * *' diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml deleted file mode 100644 index a408b03a8..000000000 --- a/.github/workflows/docker-ci.yaml +++ /dev/null @@ -1,95 +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. - -name: docker-ci - -on: - pull_request: - paths: - - '**' - - '!**.md' - schedule: - - cron: '0 18 * * *' - -concurrency: - group: docker-ci-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - SKIP_TEST: true - DOCKER_DIR: ./docker - LOG_DIR: /tmp/skywalking -jobs: - build: - if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') - runs-on: ubuntu-latest - timeout-minutes: 90 - strategy: - fail-fast: true - matrix: - es: [es6, es7] - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Build docker image - run: export ES_VERSION=${{ matrix.es }} && export TAG=${{ matrix.es }} && (make docker || make docker) - - name: Bootstrap cluster - run: | - case ${{ matrix.es }} in - es6) export ES_TAG=6.8.1 ;; - es7) export ES_TAG=7.5.0 ;; - esac - - export TAG=${{ matrix.es }} - cd ${DOCKER_DIR} && docker-compose up -d - - name: Check port available - run: | - source ./test/scripts/env.sh - echo "Waiting for OAP ready" - export PORT=11800 - check_sw_port - echo "OAP is ready" - echo "Waiting for UI ready" - PORT=8080 - check_sw_port - echo "UI is ready" - - name: Collect logs - run: | - mkdir -p ${LOG_DIR} - cd ${DOCKER_DIR} - docker-compose logs oap > ${LOG_DIR}/oap.txt - docker-compose logs ui > ${LOG_DIR}/ui.txt - docker-compose logs elasticsearch > ${LOG_DIR}/es.txt - continue-on-error: true - - uses: actions/upload-artifact@v1.0.0 - continue-on-error: true - with: - name: logs - path: /tmp/skywalking diff --git a/.github/workflows/plugins-jdk14-test.0.yaml b/.github/workflows/plugins-jdk14-test.0.yaml index fba4eabef..8e2bcfabf 100644 --- a/.github/workflows/plugins-jdk14-test.0.yaml +++ b/.github/workflows/plugins-jdk14-test.0.yaml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: PluginsJDK14Test +name: Test on: pull_request: @@ -40,7 +40,7 @@ concurrency: jobs: PluginsJDK14Test: - name: jdk14 + name: ${{ matrix.case }} runs-on: ubuntu-latest timeout-minutes: 90 strategy: diff --git a/.github/workflows/plugins-test.0.yaml b/.github/workflows/plugins-test.0.yaml index 1d6f36724..4cd2335fd 100644 --- a/.github/workflows/plugins-test.0.yaml +++ b/.github/workflows/plugins-test.0.yaml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: PluginsTest +name: Test on: pull_request: @@ -40,7 +40,7 @@ concurrency: jobs: PluginsTest: - name: Plugin + name: ${{ matrix.case }} runs-on: ubuntu-latest timeout-minutes: 90 strategy: diff --git a/.github/workflows/plugins-test.1.yaml b/.github/workflows/plugins-test.1.yaml index 7fa9f515b..b63deba5b 100644 --- a/.github/workflows/plugins-test.1.yaml +++ b/.github/workflows/plugins-test.1.yaml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: PluginsTest +name: Test on: pull_request: @@ -40,7 +40,7 @@ concurrency: jobs: PluginsTest: - name: Plugin + name: ${{ matrix.case }} runs-on: ubuntu-latest timeout-minutes: 90 strategy: diff --git a/.github/workflows/plugins-test.2.yaml b/.github/workflows/plugins-test.2.yaml index 39982aa4f..96f052ff3 100644 --- a/.github/workflows/plugins-test.2.yaml +++ b/.github/workflows/plugins-test.2.yaml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: PluginsTest +name: Test on: pull_request: @@ -40,7 +40,7 @@ concurrency: jobs: PluginsTest: - name: Plugin + name: ${{ matrix.case }} runs-on: ubuntu-latest timeout-minutes: 90 strategy: diff --git a/.github/workflows/plugins-test.3.yaml b/.github/workflows/plugins-test.3.yaml index f25a85efa..8dd1cc41a 100644 --- a/.github/workflows/plugins-test.3.yaml +++ b/.github/workflows/plugins-test.3.yaml @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: PluginsTest +name: Test on: pull_request: @@ -40,7 +40,7 @@ concurrency: jobs: PluginsTest: - name: Plugin + name: ${{ matrix.case }} runs-on: ubuntu-latest timeout-minutes: 90 strategy: @@ -104,14 +104,12 @@ jobs: - name: Add checkstyle-plugin run: sed -i '/<\/sourceDirectories>/i scenarios\/oracle-scenario<\/sourceDirectory>' test/plugin/pom.xml - name: Build SkyWalking Agent - run: ./mvnw -q --batch-mode clean package -DskipTests -Pagent + run: ./mvnw -q --batch-mode clean package -Dmaven.test.skip - name: Build Docker image - run: ./mvnw -q --batch-mode -f test/plugin/pom.xml clean package -DskipTests - - name: Oracle 10.2.0.4.0 (1) + run: ./mvnw -q --batch-mode -f test/plugin/pom.xml clean package -Dmaven.test.skip + - name: Oracle 10.2.0.4.0 run: | curl -O https://skyapm.github.io/ci-assist/jars/ojdbc14-10.2.0.4.0.jar curl -L -o ./skywalking-agent/plugins/apm-oracle-10.x-plugin-2.0.0.jar https://github.com/SkyAPM/java-plugin-extensions/releases/download/2.0.0/apm-oracle-10.x-plugin-2.0.0.jar ./mvnw -q --batch-mode install:install-file -Dfile=ojdbc14-10.2.0.4.0.jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackaging=jar bash test/plugin/run.sh oracle-scenario - - name: Report Coverage - run: bash -x tools/coverage/report.sh diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index 28fd290e5..0327e24da 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -19,27 +19,23 @@ name: publish-docker on: push: branches: - - master + - main env: SKIP_TEST: true - HUB: ghcr.io/apache/skywalking + NAME: skywalking-java + HUB: ghcr.io/apache/skywalking-java jobs: build: - if: github.repository == 'apache/skywalking' + if: github.repository == 'apache/skywalking-java' runs-on: ubuntu-latest permissions: contents: read packages: write - timeout-minutes: 90 - strategy: - fail-fast: true - matrix: - es: [es6, es7] + timeout-minutes: 60 env: - ES_VERSION: ${{ matrix.es }} - TAG: ${{ github.sha }}-${{ matrix.es }} + TAG: ${{ github.sha }} steps: - uses: actions/checkout@v2 with: @@ -48,9 +44,8 @@ jobs: uses: actions/cache@v2 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + key: ${{ runner.os }}-maven-publish-docker + restore-keys: ${{ runner.os }}-maven- - name: Log in to the Container registry uses: docker/login-action@v1.10.0 with: @@ -59,5 +54,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build docker image run: | - make docker || make docker make docker.push || make docker.push + docker tag $HUB/$NAME:$TAG $HUB/$NAME:latest + docker push $HUB/$NAME:latest diff --git a/.gitignore b/.gitignore index c442cb72f..e127805e5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ packages/ **/dist/ /docker/snapshot/*.gz .mvn/wrapper/*.jar -OALLexer.tokens .factorypath .vscode .checkstyle @@ -22,5 +21,4 @@ OALLexer.tokens /test/plugin/workspace /test/jacoco/classes /test/jacoco/*.exec -oap-server/oal-grammar/**/gen/ test/jacoco diff --git a/.licenserc.yaml b/.licenserc.yaml index dff67f4f2..5c9130433 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -22,11 +22,9 @@ header: copyright-owner: Apache Software Foundation paths-ignore: - - '.github/ISSUE_TEMPLATE' - '.github/PULL_REQUEST_TEMPLATE' - '**/.gitignore' - '.gitmodules' - - '.muse' - '.mvn' - 'apm-checkstyle/CHECKSTYLE_HEAD' - 'apm-protocol/apm-network/src/main/proto/.gitignore' @@ -45,23 +43,5 @@ header: - '**/*.pem' - 'LICENSE' - 'NOTICE' - - 'skywalking-ui/dist' - - 'skywalking-ui/node_modules' - - 'skywalking-ui/node' - - 'skywalking-ui/.browserslistrc' - - 'skywalking-ui/.prettierrc' - - '**/src/main/fbs/istio/**' - - '**/src/main/proto/envoy/**' - - '**/src/main/proto/udpa/**' - - '**/src/main/proto/gogoproto/gogo.proto' - - '**/src/main/proto/google/**' - - '**/src/main/proto/istio/**' - - '**/src/main/proto/jaeger/**' - - '**/src/main/proto/mixer/**' - - '**/src/main/proto/policy/**' - - '**/src/main/proto/prometheus/client_model/metrics.proto' - - '**/src/main/proto/protoc-gen-swagger/**' - - '**/src/main/proto/validate/validate.proto' - - '**/src/main/proto/opencensus/**' comment: on-failure diff --git a/.muse/config.toml b/.muse/config.toml deleted file mode 100644 index fd609b297..000000000 --- a/.muse/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -jdk11 = true -setup = ".muse/setup.sh" diff --git a/.muse/setup.sh b/.muse/setup.sh deleted file mode 100755 index 6bc9e756a..000000000 --- a/.muse/setup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -git submodule update --init --recursive diff --git a/docker/agent/Dockerfile.agent b/Dockerfile similarity index 85% rename from docker/agent/Dockerfile.agent rename to Dockerfile index a3049c32c..08f41bf9e 100644 --- a/docker/agent/Dockerfile.agent +++ b/Dockerfile @@ -16,14 +16,6 @@ ARG BASE_IMAGE='adoptopenjdk/openjdk8:alpine' -FROM alpine as build - -ENV DIST_NAME=apache-skywalking-apm-bin - -ADD "$DIST_NAME.tar.gz" / - -RUN mv /$DIST_NAME /skywalking - FROM alpine AS cli WORKDIR /skywalking/bin @@ -42,5 +34,6 @@ ENV JAVA_TOOL_OPTIONS=-javaagent:/skywalking/agent/skywalking-agent.jar WORKDIR /skywalking -COPY --from=build /skywalking/agent /skywalking/agent -COPY --from=cli /skywalking/bin/swctl /skywalking/bin +ADD skywalking-agent /skywalking/agent + +COPY --from=cli /skywalking/bin/swctl /usr/bin/swctl diff --git a/Makefile b/Makefile index acbab49c0..7389ab568 100644 --- a/Makefile +++ b/Makefile @@ -16,99 +16,21 @@ SHELL := /bin/bash -o pipefail -export SW_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +HUB ?= skywalking +NAME ?= skywalking-java +TAG ?= latest -export SW_OUT:=${SW_ROOT}/dist +BASE_IMAGE ?= adoptopenjdk/openjdk8:alpine +SKIP_TEST ?= false -SKIP_TEST?=false - -init: - cd $(SW_ROOT) && git submodule update --init --recursive - -.PHONY: build.all build.agent build.backend build.ui build.docker - -build.all: - cd $(SW_ROOT) && ./mvnw --batch-mode clean package -Dmaven.test.skip=$(SKIP_TEST) - -build.agent: - cd $(SW_ROOT) && ./mvnw --batch-mode clean package -Dmaven.test.skip=$(SKIP_TEST) -Pagent,dist - -build.backend: - cd $(SW_ROOT) && ./mvnw --batch-mode clean package -Dmaven.test.skip=$(SKIP_TEST) -Pbackend,dist - -build.ui: - cd $(SW_ROOT) && ./mvnw --batch-mode clean package -Dmaven.test.skip=$(SKIP_TEST) -Pui,dist - -DOCKER_BUILD_TOP:=${SW_OUT}/docker_build - -HUB?=skywalking - -TAG?=latest - -ES_VERSION?=es6 - -.SECONDEXPANSION: #allow $@ to be used in dependency list - -.PHONY: docker docker.all docker.oap - -docker: init build.all docker.all - -DOCKER_TARGETS:=docker.oap docker.ui docker.agent - -docker.all: $(DOCKER_TARGETS) - -ifeq ($(ES_VERSION),es7) - DIST_NAME := apache-skywalking-apm-bin-es7 -else - DIST_NAME := apache-skywalking-apm-bin -endif - -ifneq ($(SW_OAP_BASE_IMAGE),) - BUILD_ARGS := $(BUILD_ARGS) --build-arg BASE_IMAGE=$(SW_OAP_BASE_IMAGE) -endif - -BUILD_ARGS := $(BUILD_ARGS) --build-arg DIST_NAME=$(DIST_NAME) - -docker.oap: $(SW_OUT)/$(DIST_NAME).tar.gz -docker.oap: $(SW_ROOT)/docker/oap/Dockerfile.oap -docker.oap: $(SW_ROOT)/docker/oap/docker-entrypoint.sh -docker.oap: $(SW_ROOT)/docker/oap/log4j2.xml - $(DOCKER_RULE) - -docker.ui: $(SW_OUT)/apache-skywalking-apm-bin.tar.gz -docker.ui: $(SW_ROOT)/docker/ui/Dockerfile.ui -docker.ui: $(SW_ROOT)/docker/ui/docker-entrypoint.sh -docker.ui: $(SW_ROOT)/docker/ui/logback.xml - $(DOCKER_RULE) - -docker.agent: $(SW_OUT)/apache-skywalking-apm-bin.tar.gz -docker.agent: $(SW_ROOT)/docker/agent/Dockerfile.agent - $(DOCKER_RULE) - - -# $@ is the name of the target -# $^ the name of the dependencies for the target -# Rule Steps # -############## -# 1. Make a directory $(DOCKER_BUILD_TOP)/%@ -# 2. This rule uses cp to copy all dependency filenames into into $(DOCKER_BUILD_TOP/$@ -# 3. This rule then changes directories to $(DOCKER_BUID_TOP)/$@ -# 4. This rule runs $(BUILD_PRE) prior to any docker build and only if specified as a dependency variable -# 5. This rule finally runs docker build passing $(BUILD_ARGS) to docker if they are specified as a dependency variable - -DOCKER_RULE=time (mkdir -p $(DOCKER_BUILD_TOP)/$@ && cp -r $^ $(DOCKER_BUILD_TOP)/$@ && cd $(DOCKER_BUILD_TOP)/$@ && $(BUILD_PRE) docker build --no-cache $(BUILD_ARGS) -t $(HUB)/$(subst docker.,,$@):$(TAG) -f Dockerfile$(suffix $@) .) - -# for each docker.XXX target create a push.docker.XXX target that pushes -# the local docker image to another hub -# a possible optimization is to use tag.$(TGT) as a dependency to do the tag for us -$(foreach TGT,$(DOCKER_TARGETS),$(eval push.$(TGT): | $(TGT) ; \ - time (docker push $(HUB)/$(subst docker.,,$(TGT)):$(TAG)))) - -# create a DOCKER_PUSH_TARGETS that's each of DOCKER_TARGETS with a push. prefix -DOCKER_PUSH_TARGETS:= -$(foreach TGT,$(DOCKER_TARGETS),$(eval DOCKER_PUSH_TARGETS+=push.$(TGT))) - -# Will build and push docker images. -docker.push: $(DOCKER_PUSH_TARGETS) +.PHONY: build +build: + ./mvnw --batch-mode clean package -Dmaven.test.skip=$(SKIP_TEST) +.PHONY: docker +docker: build + docker build --no-cache --build-arg BASE_IMAGE=$(BASE_IMAGE) . -t $(HUB)/$(NAME):$(TAG) +.PHONY: docker.push +docker.push: docker + docker push $(HUB)/$(NAME):$(TAG) diff --git a/apm-commons/apm-util/pom.xml b/apm-commons/apm-util/pom.xml index d4201d75c..0e29313f0 100644 --- a/apm-commons/apm-util/pom.xml +++ b/apm-commons/apm-util/pom.xml @@ -28,7 +28,6 @@ jar apm-util - http://maven.apache.org UTF-8 diff --git a/apm-sniffer/apm-agent-core/pom.xml b/apm-sniffer/apm-agent-core/pom.xml index 1fd296ae1..ed8e59434 100644 --- a/apm-sniffer/apm-agent-core/pom.xml +++ b/apm-sniffer/apm-agent-core/pom.xml @@ -21,7 +21,7 @@ org.apache.skywalking - apm-sniffer + java-agent-sniffer 8.8.0-SNAPSHOT diff --git a/apm-sniffer/apm-agent/pom.xml b/apm-sniffer/apm-agent/pom.xml index beae80611..5afa2b111 100644 --- a/apm-sniffer/apm-agent/pom.xml +++ b/apm-sniffer/apm-agent/pom.xml @@ -21,7 +21,7 @@ org.apache.skywalking - apm-sniffer + java-agent-sniffer 8.8.0-SNAPSHOT diff --git a/apm-sniffer/apm-sdk-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/pom.xml index 053520aec..0faf6df36 100644 --- a/apm-sniffer/apm-sdk-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/pom.xml @@ -22,7 +22,7 @@ org.apache.skywalking - apm-sniffer + java-agent-sniffer 8.8.0-SNAPSHOT diff --git a/apm-sniffer/apm-test-tools/pom.xml b/apm-sniffer/apm-test-tools/pom.xml index b322cd936..a680d1350 100644 --- a/apm-sniffer/apm-test-tools/pom.xml +++ b/apm-sniffer/apm-test-tools/pom.xml @@ -21,7 +21,7 @@ org.apache.skywalking - apm-sniffer + java-agent-sniffer 8.8.0-SNAPSHOT diff --git a/apm-sniffer/apm-toolkit-activation/pom.xml b/apm-sniffer/apm-toolkit-activation/pom.xml index 91686fae0..9cfa9908b 100644 --- a/apm-sniffer/apm-toolkit-activation/pom.xml +++ b/apm-sniffer/apm-toolkit-activation/pom.xml @@ -19,7 +19,7 @@ - apm-sniffer + java-agent-sniffer org.apache.skywalking 8.8.0-SNAPSHOT diff --git a/apm-sniffer/bootstrap-plugins/pom.xml b/apm-sniffer/bootstrap-plugins/pom.xml index accdddc57..492559abe 100644 --- a/apm-sniffer/bootstrap-plugins/pom.xml +++ b/apm-sniffer/bootstrap-plugins/pom.xml @@ -19,7 +19,7 @@ - apm-sniffer + java-agent-sniffer org.apache.skywalking 8.8.0-SNAPSHOT diff --git a/apm-sniffer/optional-plugins/pom.xml b/apm-sniffer/optional-plugins/pom.xml index b9c23e3b9..aaa2fe83b 100644 --- a/apm-sniffer/optional-plugins/pom.xml +++ b/apm-sniffer/optional-plugins/pom.xml @@ -19,7 +19,7 @@ - apm-sniffer + java-agent-sniffer org.apache.skywalking 8.8.0-SNAPSHOT diff --git a/apm-sniffer/optional-reporter-plugins/pom.xml b/apm-sniffer/optional-reporter-plugins/pom.xml index ebd6fcc3d..00fed4d22 100644 --- a/apm-sniffer/optional-reporter-plugins/pom.xml +++ b/apm-sniffer/optional-reporter-plugins/pom.xml @@ -19,7 +19,7 @@ - apm-sniffer + java-agent-sniffer org.apache.skywalking 8.8.0-SNAPSHOT @@ -66,4 +66,4 @@ - \ No newline at end of file + diff --git a/apm-sniffer/pom.xml b/apm-sniffer/pom.xml index 819979772..1c59ec4c2 100644 --- a/apm-sniffer/pom.xml +++ b/apm-sniffer/pom.xml @@ -25,7 +25,7 @@ 4.0.0 - apm-sniffer + java-agent-sniffer pom diff --git a/docker/.env b/docker/.env deleted file mode 100644 index 4c19017ff..000000000 --- a/docker/.env +++ /dev/null @@ -1,2 +0,0 @@ -TAG=es6 -ES_TAG=6.8.1 \ No newline at end of file diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 00699ba5d..000000000 --- a/docker/README.md +++ /dev/null @@ -1,60 +0,0 @@ -This folder contains Docker files for SkyWalking developers/committers to build images manually. If you want to start a SkyWalking backend server with docker-compose for your integration, please visit https://github.com/apache/skywalking-docker repository. - - -## Quickstart -You can use `Makefile` located at the root folder to build a docker image with the current codebase. - -``` -make docker -``` - -It doesn't contain the process of building a docker image but also includes all the required steps, for instance, init workspace, build artifact from scratch. It builds two images, OAP, and UI. - -``` -docker image ls | grep skywalking -skywalking/ui latest a14db4e1d70d 6 minutes ago 800MB -skywalking/oap latest 2a6084450b44 6 minutes ago 862MB -``` - - -## Building variables - -There're some environment variables to control image building. - -### HUB - -The hub of docker image. The default value is `skywalking`. - -### TAG - -The tag of docker image. The default value is `latest`. - -### ES_VERSION - -The elasticsearch version this image supports. The default value is `es6`, available values are `es6` and `es7`. - - -For example, if we want to build images with a hub `foo.io` and a tag `bar`, and it supports elasticsearch 7 at the same time. -We can issue the following commands. - -``` -export HUB=foo.io && export TAG=bar && export ES_VERSION=es7 && make docker -``` - -Let's check out the result: -``` -docker image ls | grep foo.io -foo.io/ui bar a14db4e1d70d 9 minutes ago 800MB -foo.io/oap bar 2a6084450b44 9 minutes ago 862MB -``` - -From the output, we can find out the building tool adopts the files stored in `oap-es7`. - -## Running containers with docker-compose - -We can start up backend cluster by docker-compose -``` -cd docker -docker compose up -``` -`docker/.env` file contains the default `TAG` and elasticsearch tag(`ES_TAG`). diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml deleted file mode 100644 index a41cab834..000000000 --- a/docker/docker-compose.yml +++ /dev/null @@ -1,64 +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. - -version: '3.5' -services: - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:${ES_TAG} - container_name: elasticsearch - restart: always - ports: - - 9200:9200 - environment: - discovery.type: single-node - ulimits: - memlock: - soft: -1 - hard: -1 - oap: - image: skywalking/oap:${TAG} - container_name: oap - depends_on: - - elasticsearch - links: - - elasticsearch - restart: always - ports: - - 11800:11800 - - 12800:12800 - environment: - SW_STORAGE: elasticsearch - SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200 - SW_HEALTH_CHECKER: default - SW_TELEMETRY: prometheus - healthcheck: - test: ["CMD", "./bin/swctl", "ch"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 40s - ui: - image: skywalking/ui:${TAG} - container_name: ui - depends_on: - - oap - links: - - oap - restart: always - ports: - - 8080:8080 - environment: - SW_OAP_ADDRESS: http://oap:12800 diff --git a/docker/oap/Dockerfile.oap b/docker/oap/Dockerfile.oap deleted file mode 100644 index dd44a6617..000000000 --- a/docker/oap/Dockerfile.oap +++ /dev/null @@ -1,66 +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. - -ARG BASE_IMAGE='adoptopenjdk/openjdk11:alpine' - -FROM golang:1.14 AS cli - -ARG COMMIT_HASH=9f267876493943716434fdaa30047a14c0b5b2d9 -ARG CLI_CODE=${COMMIT_HASH}.tar.gz -ARG CLI_CODE_URL=https://github.com/apache/skywalking-cli/archive/${CLI_CODE} - -ENV CGO_ENABLED=0 -ENV GO111MODULE=on - -WORKDIR /cli - -ADD ${CLI_CODE_URL} . -RUN tar -xf ${CLI_CODE} --strip 1 -RUN rm ${CLI_CODE} - -RUN mkdir -p /skywalking/bin/ -RUN make linux && mv bin/swctl-latest-linux-amd64 /skywalking/bin/swctl - -FROM $BASE_IMAGE - -ENV JAVA_OPTS=" -Xms256M " \ - SW_CLUSTER="standalone" \ - SW_STORAGE="h2" - -ARG DIST_NAME - -COPY "$DIST_NAME.tar.gz" / - -RUN set -ex; \ - tar -xzf "$DIST_NAME.tar.gz"; \ - rm -rf "$DIST_NAME.tar.gz"; \ - rm -rf "$DIST_NAME/config/log4j2.xml"; \ - rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/webapp"; rm -rf "$DIST_NAME/agent"; \ - mkdir "$DIST_NAME/bin"; \ - mv "$DIST_NAME" skywalking; - -WORKDIR skywalking - -COPY --from=cli /skywalking/bin/swctl ./bin - -COPY log4j2.xml config/ -COPY docker-entrypoint.sh . -RUN mkdir ext-config; \ - mkdir ext-libs; - -EXPOSE 12800 11800 1234 - -ENTRYPOINT ["sh", "docker-entrypoint.sh"] diff --git a/docker/oap/docker-entrypoint.sh b/docker/oap/docker-entrypoint.sh deleted file mode 100755 index de60e3d08..000000000 --- a/docker/oap/docker-entrypoint.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/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. - -set -e - -echo "[Entrypoint] Apache SkyWalking Docker Image" - -EXT_LIB_DIR=/skywalking/ext-libs -EXT_CONFIG_DIR=/skywalking/ext-config - -# Override configuration files -if [ "$(ls -A $EXT_CONFIG_DIR)" ]; then - cp -vfRL ${EXT_CONFIG_DIR}/* config/ -fi - -CLASSPATH="config:$CLASSPATH" -for i in oap-libs/*.jar -do - CLASSPATH="$i:$CLASSPATH" -done -for i in "${EXT_LIB_DIR}"/*.jar -do - CLASSPATH="$i:$CLASSPATH" -done - -set -ex - -exec java ${JAVA_OPTS} -classpath ${CLASSPATH} org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" diff --git a/docker/oap/log4j2.xml b/docker/oap/log4j2.xml deleted file mode 100644 index 06242e595..000000000 --- a/docker/oap/log4j2.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker/ui/Dockerfile.ui b/docker/ui/Dockerfile.ui deleted file mode 100644 index d2f9f54de..000000000 --- a/docker/ui/Dockerfile.ui +++ /dev/null @@ -1,40 +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. - -FROM adoptopenjdk/openjdk11:alpine - -ENV DIST_NAME=apache-skywalking-apm-bin \ - JAVA_OPTS=" -Xms256M " \ - SW_OAP_ADDRESS="http://127.0.0.1:12800" - -COPY "$DIST_NAME.tar.gz" / - -RUN set -ex; \ - apk add bash; \ - tar -xzf "$DIST_NAME.tar.gz"; \ - rm -rf "$DIST_NAME.tar.gz"; \ - rm -rf "$DIST_NAME/config"; \ - rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/oap-libs"; rm -rf "$DIST_NAME/agent"; \ - mv "$DIST_NAME" skywalking; - -WORKDIR skywalking - -COPY docker-entrypoint.sh . -COPY logback.xml webapp/ - -EXPOSE 8080 - -ENTRYPOINT ["bash", "docker-entrypoint.sh"] \ No newline at end of file diff --git a/docker/ui/logback.xml b/docker/ui/logback.xml deleted file mode 100644 index c9490a87b..000000000 --- a/docker/ui/logback.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4742aa28e..811246f33 100755 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,8 @@ ~ --> - + 4.0.0 org.apache.skywalking @@ -28,22 +29,24 @@ org.apache apache 21 - + apm-commons apm-protocol + apm-sniffer + apm-application-toolkit pom - apm - https://github.com/apache/skywalking + java-agent + https://github.com/apache/skywalking-java - https://github.com/apache/skywalking - scm:git:https://github.com/apache/skywalking.git - scm:git:https://github.com/apache/skywalking.git + https://github.com/apache/skywalking-java + scm:git:https://github.com/apache/skywalking-java.git + scm:git:https://github.com/apache/skywalking-java.git HEAD @@ -55,7 +58,7 @@ The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt + https://www.apache.org/licenses/LICENSE-2.0.txt @@ -74,79 +77,6 @@ - - - agent - - true - - - apm-sniffer - apm-application-toolkit - - - - all - - false - - - apm-sniffer - apm-application-toolkit - - - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - - git submodule update - initialize - false - - git - - submodule - update - --init - --recursive - - - - exec - - - - - - - - - CI-with-IT - - false - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - - integration-test - verify - - - - - - - - - UTF-8 1.8 @@ -180,7 +110,6 @@ 3.1.0 2.22.0 3.2.0 - 2.22.0 3.1.0 3.1.1 3.0.0-M2 @@ -192,7 +121,6 @@ 3.1.0 1.21 1.5 - 2.7 true @@ -328,23 +256,6 @@ maven-shade-plugin ${maven-shade-plugin.version} - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - IT*.class - - - io.fabric8 docker-maven-plugin @@ -430,17 +341,6 @@ - - org.eluder.coveralls - coveralls-maven-plugin - ${coveralls-maven-plugin.version} - - ${COVERALLS_REPO_TOKEN} - - ${project.build.sourceDirectory} - - - maven-checkstyle-plugin ${maven-checkstyle-plugin.version} @@ -494,41 +394,6 @@ - - org.codehaus.mojo - cobertura-maven-plugin - ${cobertura-maven-plugin.version} - - - true - ${project.build.sourceEncoding} - true - - html - xml - - - true - - lombok.Generated - - - org/apache/skywalking/**/*.class - - - org/apache/skywalking/**/*Test.class - org/apache/skywalking/**/Test*.class - org/apache/skywalking/apm/network/register/v2/**/*.class - org/apache/skywalking/apm/network/common/**/*.class - org/apache/skywalking/apm/network/servicemesh/**/*.class - org/apache/skywalking/apm/network/language/**/*.class - org/apache/skywalking/apm/toolkit/**/*Activation.class - org/apache/skywalking/apm/plugin/**/*Instrumentation.class - org/apache/skywalking/apm/plugin/**/*Instrumentation$*.class - - - - diff --git a/tools/coverage/report.sh b/tools/coverage/report.sh deleted file mode 100755 index 5140fbdfc..000000000 --- a/tools/coverage/report.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -# ---------------------------------------------------------------------------- -# 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. -# ---------------------------------------------------------------------------- - -set -ex - -JACOCO_HOME=${JACOCO_HOME:-test/jacoco} - -ls -alh "${JACOCO_HOME}" - -for exec_data in "${JACOCO_HOME}"/*.exec; do - exec_data=${exec_data/*\//} - exec_data=${exec_data/.exec/} - - sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/oap/server/core/query/entity || true - sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/testcase || true - sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/e2e || true - sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/test/apache/skywalking/e2e || true - - java -jar "${JACOCO_HOME}"/jacococli.jar report \ - --classfiles "${JACOCO_HOME}"/classes/"$exec_data" \ - --xml=/tmp/report-"$exec_data".xml \ - --html=/tmp/report-html-"$exec_data" \ - "${JACOCO_HOME}"/"$exec_data".exec -done - -# Download codecov bash uploader and verify the sha sums before using it. -curl -s https://codecov.io/bash > codecov -VERSION=$(grep -o 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2) -for i in 1 256 512 -do - shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") || - shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") || exit 0 -done - -bash codecov -X fix -f /tmp/report-*.xml || true