Set up CI and clean up (#3)
This commit is contained in:
parent
6950bb137f
commit
a6b174a09d
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
@ -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::"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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'
|
||||
|
|
@ -18,9 +18,9 @@ name: "CodeQL"
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master' ]
|
||||
branches: [ 'main' ]
|
||||
pull_request:
|
||||
branches: [ 'master' ]
|
||||
branches: [ 'main' ]
|
||||
schedule:
|
||||
- cron: '28 3 * * *'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 <sourceDirectory>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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
jdk11 = true
|
||||
setup = ".muse/setup.sh"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
git submodule update --init --recursive
|
||||
|
|
@ -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
|
||||
102
Makefile
102
Makefile
|
|
@ -16,99 +16,21 @@
|
|||
|
||||
SHELL := /bin/bash -o pipefail
|
||||
|
||||
export SW_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
export SW_OUT:=${SW_ROOT}/dist
|
||||
|
||||
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
|
||||
|
||||
NAME ?= skywalking-java
|
||||
TAG ?= latest
|
||||
|
||||
ES_VERSION?=es6
|
||||
BASE_IMAGE ?= adoptopenjdk/openjdk8:alpine
|
||||
SKIP_TEST ?= false
|
||||
|
||||
.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)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>apm-util</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<parent>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<parent>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<parent>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<parent>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>8.8.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>apm-sniffer</artifactId>
|
||||
<artifactId>java-agent-sniffer</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
TAG=es6
|
||||
ES_TAG=6.8.1
|
||||
|
|
@ -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`).
|
||||
|
|
@ -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
|
||||
|
|
@ -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"]
|
||||
|
|
@ -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 "$@"
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?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.
|
||||
~
|
||||
-->
|
||||
|
||||
<Configuration status="INFO">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout charset="UTF-8" pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<logger name="org.eclipse.jetty" level="INFO"/>
|
||||
<logger name="org.apache.zookeeper" level="INFO"/>
|
||||
<logger name="org.elasticsearch.common.network.IfConfig" level="INFO"/>
|
||||
<logger name="io.grpc.netty" level="INFO"/>
|
||||
<logger name="org.apache.skywalking.oap.meter.analyzer" level="DEBUG"/>
|
||||
<logger name="org.apache.skywalking.oap.server.receiver.istio.telemetry" level="DEBUG"/>
|
||||
<logger name="org.apache.skywalking.oap.server.fetcher.prometheus" level="DEBUG"/>
|
||||
<logger name="org.apache.skywalking.oap.server.receiver.envoy.als" level="DEBUG"/>
|
||||
<Root level="INFO">
|
||||
<AppenderRef ref="Console"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -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"]
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?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.
|
||||
~
|
||||
-->
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
</configuration>
|
||||
155
pom.xml
155
pom.xml
|
|
@ -17,7 +17,8 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<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">
|
||||
<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>
|
||||
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
|
|
@ -34,16 +35,18 @@
|
|||
<modules>
|
||||
<module>apm-commons</module>
|
||||
<module>apm-protocol</module>
|
||||
<module>apm-sniffer</module>
|
||||
<module>apm-application-toolkit</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>apm</name>
|
||||
<url>https://github.com/apache/skywalking</url>
|
||||
<name>java-agent</name>
|
||||
<url>https://github.com/apache/skywalking-java</url>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/apache/skywalking</url>
|
||||
<connection>scm:git:https://github.com/apache/skywalking.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/apache/skywalking.git</developerConnection>
|
||||
<url>https://github.com/apache/skywalking-java</url>
|
||||
<connection>scm:git:https://github.com/apache/skywalking-java.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/apache/skywalking-java.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
|
|
@ -55,7 +58,7 @@
|
|||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
|
|
@ -74,79 +77,6 @@
|
|||
</mailingList>
|
||||
</mailingLists>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>agent</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>apm-sniffer</module>
|
||||
<module>apm-application-toolkit</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>all</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>apm-sniffer</module>
|
||||
<module>apm-application-toolkit</module>
|
||||
</modules>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>${exec-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>git submodule update</id>
|
||||
<phase>initialize</phase>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<executable>git</executable>
|
||||
<arguments>
|
||||
<argument>submodule</argument>
|
||||
<argument>update</argument>
|
||||
<argument>--init</argument>
|
||||
<argument>--recursive</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>CI-with-IT</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
|
|
@ -180,7 +110,6 @@
|
|||
<maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
|
||||
<maven-failsafe-plugin.version>2.22.0</maven-failsafe-plugin.version>
|
||||
<build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
|
||||
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
|
||||
<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
|
||||
<maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
|
||||
<maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
|
||||
|
|
@ -192,7 +121,6 @@
|
|||
<maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
|
||||
<jmh.version>1.21</jmh.version>
|
||||
<gmaven-plugin.version>1.5</gmaven-plugin.version>
|
||||
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
|
||||
<checkstyle.fails.on.error>true</checkstyle.fails.on.error>
|
||||
|
||||
</properties>
|
||||
|
|
@ -328,23 +256,6 @@
|
|||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>${maven-shade-plugin.version}</version>
|
||||
</plugin>
|
||||
<!--
|
||||
maven-surefire-plugin will exclude integration tests (ITs)
|
||||
and leave them for maven-failsafe-plugin to run, which is bound to the `verify` goal.
|
||||
If you want to run the ITs please activate the CI-with-IT profile
|
||||
as well as the the profiles of the modules whose ITs you want to run.
|
||||
e.g. you want to run the ITs in oap-server, run `./mvnw -Pbackend,CI-with-IT clean verify`
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>IT*.class</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
|
|
@ -430,17 +341,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>${coveralls-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<repoToken>${COVERALLS_REPO_TOKEN}</repoToken>
|
||||
<sourceDirectories>
|
||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
||||
</sourceDirectories>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
|
|
@ -494,41 +394,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>${cobertura-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<check />
|
||||
<aggregate>true</aggregate>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
<formats>
|
||||
<format>html</format>
|
||||
<format>xml</format>
|
||||
</formats>
|
||||
<instrumentation>
|
||||
<ignoreTrivial>true</ignoreTrivial>
|
||||
<ignoreMethodAnnotations>
|
||||
<ignoreMethodAnnotation>lombok.Generated</ignoreMethodAnnotation>
|
||||
</ignoreMethodAnnotations>
|
||||
<includes>
|
||||
<include>org/apache/skywalking/**/*.class</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>org/apache/skywalking/**/*Test.class</exclude>
|
||||
<exclude>org/apache/skywalking/**/Test*.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/network/register/v2/**/*.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/network/common/**/*.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/network/servicemesh/**/*.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/network/language/**/*.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/toolkit/**/*Activation.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/plugin/**/*Instrumentation.class</exclude>
|
||||
<exclude>org/apache/skywalking/apm/plugin/**/*Instrumentation$*.class</exclude>
|
||||
</excludes>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue