You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/08/27 02:55:35 UTC
[skywalking-java] branch test/ci/settings updated (2587c4f ->
3896c57)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch test/ci/settings
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git.
discard 2587c4f Fix wrong cache key and clean up CI settings
new 3896c57 Fix wrong cache key and clean up CI settings
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (2587c4f)
\
N -- N -- N refs/heads/test/ci/settings (3896c57)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/plugins-jdk14-test.0.yaml | 3 +++
.github/workflows/plugins-test.0.yaml | 3 +++
.github/workflows/plugins-test.1.yaml | 6 +++---
.github/workflows/plugins-test.2.yaml | 3 +++
.github/workflows/plugins-test.3.yaml | 3 +++
5 files changed, 15 insertions(+), 3 deletions(-)
[skywalking-java] 01/01: Fix wrong cache key and clean up CI
settings
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch test/ci/settings
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
commit 3896c57a2580515fee95b451f0ce05029537cf25
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Aug 27 10:11:09 2021 +0800
Fix wrong cache key and clean up CI settings
---
.github/actions/{plugins-test => build}/action.yml | 47 +++++++++++++---------
.github/actions/{plugins-test => run}/action.yml | 41 +++++++------------
.github/workflows/ci.yaml | 32 ++++++++++-----
.github/workflows/codeql.yaml | 4 ++
.github/workflows/plugins-jdk14-test.0.yaml | 26 +++++++-----
.github/workflows/plugins-test.0.yaml | 24 +++++++----
.github/workflows/plugins-test.1.yaml | 27 ++++++++-----
.github/workflows/plugins-test.2.yaml | 24 +++++++----
.github/workflows/plugins-test.3.yaml | 31 +++++++-------
9 files changed, 149 insertions(+), 107 deletions(-)
diff --git a/.github/actions/plugins-test/action.yml b/.github/actions/build/action.yml
similarity index 68%
copy from .github/actions/plugins-test/action.yml
copy to .github/actions/build/action.yml
index 3b931b1..d824838 100644
--- a/.github/actions/plugins-test/action.yml
+++ b/.github/actions/build/action.yml
@@ -16,12 +16,9 @@
# specific language governing permissions and limitations
# under the License.
#
-name: "Run Plugin Test"
-description: "Common steps when running a plugin test"
+name: "Build Plugin Agent"
+description: "Build Plugin Agent before running a plugin test"
inputs:
- test_case:
- description: "The plugin test name"
- required: true
java_version:
description: "The Java version under which this test case will run"
required: false
@@ -29,12 +26,6 @@ inputs:
runs:
using: "composite"
steps:
- - name: Cache local Maven repository
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- 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
@@ -43,25 +34,41 @@ runs:
echo "::group::Add checkstyle plugin to the pom.xml"
sed -i "/<\/sourceDirectories>/i <sourceDirectory>scenarios\/""${{ inputs.test_case }}""<\/sourceDirectory>" test/plugin/pom.xml
echo "::endgroup::"
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-agent-test
+ restore-keys: ${{ runner.os }}-maven-agent-test
- name: Build SkyWalking Agent
shell: bash
run: |
echo "::group::Build SkyWalking Agent"
# Retry one more time due to frequent "maven connection reset"
- ./mvnw --batch-mode clean package -DskipTests || \
- ./mvnw --batch-mode clean package -DskipTests
+ ./mvnw --batch-mode clean package -Dmaven.test.skip || \
+ ./mvnw --batch-mode clean package -Dmaven.test.skip
echo "::endgroup::"
+ - uses: actions/upload-artifact@v2
+ name: Upload Agent
+ with:
+ name: skywalking-agent
+ path: skywalking-agent
- name: Build Docker Image
shell: bash
run: |
echo "::group::Build Docker Image"
# Retry one more time due to frequent "maven connection reset"
- ./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests -P${{ inputs.java_version }} || \
- ./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests -P${{ inputs.java_version }}
+ ./mvnw --batch-mode -f test/plugin/pom.xml clean package -Dmaven.test.skip -P${{ inputs.java_version }} || \
+ ./mvnw --batch-mode -f test/plugin/pom.xml clean package -Dmaven.test.skip -P${{ inputs.java_version }}
echo "::endgroup::"
- - name: Run Plugin Test ${{ inputs.test_case }}
- shell: bash
- run: |
- 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 "::group::Save Docker Image"
+ mkdir -p test-containers
+ docker save -o test-containers/skywalking-agent-test-jvm-${{ inputs.java_version }}-1.0.0.tgz skywalking/agent-test-jvm:${{ inputs.java_version }}-1.0.0
+ docker save -o test-containers/skywalking-agent-test-tomcat-${{ inputs.java_version }}-1.0.0.tgz skywalking/agent-test-tomcat:${{ inputs.java_version }}-1.0.0
echo "::endgroup::"
+ - uses: actions/upload-artifact@v2
+ name: Upload Test Containers
+ with:
+ name: test-containers
+ path: test-containers
diff --git a/.github/actions/plugins-test/action.yml b/.github/actions/run/action.yml
similarity index 52%
rename from .github/actions/plugins-test/action.yml
rename to .github/actions/run/action.yml
index 3b931b1..166f10a 100644
--- a/.github/actions/plugins-test/action.yml
+++ b/.github/actions/run/action.yml
@@ -29,36 +29,23 @@ inputs:
runs:
using: "composite"
steps:
- - name: Cache local Maven repository
- uses: actions/cache@v2
+ - uses: actions/download-artifact@v2
with:
- path: ~/.m2/repository
- 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
- shell: bash
- run: |
- echo "::group::Add checkstyle plugin to the pom.xml"
- sed -i "/<\/sourceDirectories>/i <sourceDirectory>scenarios\/""${{ inputs.test_case }}""<\/sourceDirectory>" test/plugin/pom.xml
- echo "::endgroup::"
- - name: Build SkyWalking Agent
- shell: bash
- run: |
- echo "::group::Build SkyWalking Agent"
- # Retry one more time due to frequent "maven connection reset"
- ./mvnw --batch-mode clean package -DskipTests || \
- ./mvnw --batch-mode clean package -DskipTests
- echo "::endgroup::"
- - name: Build Docker Image
+ name: skywalking-agent
+ path: skywalking-agent
+ - uses: actions/download-artifact@v2
+ with:
+ name: test-containers
+ path: test-containers
+ - name: Load Test Containers
shell: bash
run: |
- echo "::group::Build Docker Image"
- # Retry one more time due to frequent "maven connection reset"
- ./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests -P${{ inputs.java_version }} || \
- ./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests -P${{ inputs.java_version }}
- echo "::endgroup::"
+ if ls test-containers/skywalking-agent-test-jvm-${{ inputs.java_version }}-1.0.0.tgz; then
+ docker load -i test-containers/skywalking-agent-test-jvm-${{ inputs.java_version }}-1.0.0.tgz
+ fi
+ if ls test-containers/skywalking-agent-test-tomcat-${{ inputs.java_version }}-1.0.0.tgz; then
+ docker load -i test-containers/skywalking-agent-test-tomcat-${{ inputs.java_version }}-1.0.0.tgz
+ fi
- name: Run Plugin Test ${{ inputs.test_case }}
shell: bash
run: |
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 893a4fa..53f8ce1 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -20,17 +20,34 @@ on:
pull_request:
schedule:
- cron: '0 18 * * *' # TimeZone: UTC 0
+ push:
+ branches:
+ - ci
concurrency:
group: ci-it-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- matrix:
- name: ${{ matrix.os }} - ${{ matrix.java-version }}
+ license:
+ name: Check License
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Check License Header
+ uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ build:
+ name: Java ${{ matrix.java-version }} / ${{ matrix.os }}
if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking-java') || (github.event_name != 'schedule')
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 60
+ needs: [ license ]
strategy:
fail-fast: true
matrix:
@@ -43,17 +60,12 @@ jobs:
- 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 }}
+ key: ${{ runner.os }}-maven-ci-
+ restore-keys: ${{ runner.os }}-maven-ci-
- uses: actions/setup-java@v2
with:
distribution: adopt
@@ -70,6 +82,6 @@ jobs:
ci:
name: CI
runs-on: ubuntu-latest
- needs: [ matrix ]
+ needs: [ build ]
steps:
- run: echo 'Success'
diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml
index 6b093f6..10e029e 100644
--- a/.github/workflows/codeql.yaml
+++ b/.github/workflows/codeql.yaml
@@ -19,8 +19,12 @@ name: "CodeQL"
on:
push:
branches: [ 'main' ]
+ paths:
+ - '**/*.java'
pull_request:
branches: [ 'main' ]
+ paths:
+ - '**/*.java'
schedule:
- cron: '28 3 * * *'
diff --git a/.github/workflows/plugins-jdk14-test.0.yaml b/.github/workflows/plugins-jdk14-test.0.yaml
index 8e2bcfa..f1ffab7 100644
--- a/.github/workflows/plugins-jdk14-test.0.yaml
+++ b/.github/workflows/plugins-jdk14-test.0.yaml
@@ -26,20 +26,28 @@ on:
- 'apm-sniffer/**'
- 'test/plugin/**'
- '**/pom.xml'
- - '!test/e2e/**'
- - '!apm-webapp/**'
- - '!apm-dist/**'
- - '!apm-dist-es7/**'
- - '!apm-docker/**'
- - '!oap-server/**'
- '!**.md'
+ push:
+ branches:
+ - test/ci/*
concurrency:
group: plugins-jdk14-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- PluginsJDK14Test:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - run: ./.github/actions/build
+
+ test:
+ needs: [ build ]
name: ${{ matrix.case }}
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -54,8 +62,8 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 14
- - name: Run Plugin Test
- uses: ./.github/actions/plugins-test
+ - name: Run Test
+ uses: ./.github/actions/run
with:
test_case: ${{ matrix.case }}
java_version: jdk14
diff --git a/.github/workflows/plugins-test.0.yaml b/.github/workflows/plugins-test.0.yaml
index 4cd2335..fbc7651 100644
--- a/.github/workflows/plugins-test.0.yaml
+++ b/.github/workflows/plugins-test.0.yaml
@@ -26,20 +26,28 @@ on:
- 'apm-sniffer/**'
- 'test/plugin/**'
- '**/pom.xml'
- - '!test/e2e/**'
- - '!apm-webapp/**'
- - '!apm-dist/**'
- - '!apm-dist-es7/**'
- - '!apm-docker/**'
- - '!oap-server/**'
- '!**.md'
+ push:
+ branches:
+ - test/ci/*
concurrency:
group: plugins-0-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- PluginsTest:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - uses: ./.github/actions/build
+
+ test:
+ needs: [ build ]
name: ${{ matrix.case }}
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -83,6 +91,6 @@ jobs:
with:
java-version: 8
- name: Run Plugin Test
- uses: ./.github/actions/plugins-test
+ uses: ./.github/actions/run
with:
test_case: ${{ matrix.case }}
diff --git a/.github/workflows/plugins-test.1.yaml b/.github/workflows/plugins-test.1.yaml
index b63deba..a4841a6 100644
--- a/.github/workflows/plugins-test.1.yaml
+++ b/.github/workflows/plugins-test.1.yaml
@@ -26,20 +26,28 @@ on:
- 'apm-sniffer/**'
- 'test/plugin/**'
- '**/pom.xml'
- - '!test/e2e/**'
- - '!apm-webapp/**'
- - '!apm-dist/**'
- - '!apm-dist-es7/**'
- - '!apm-docker/**'
- - '!oap-server/**'
- '!**.md'
+ push:
+ branches:
+ - test/ci/*
concurrency:
group: plugins-1-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- PluginsTest:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - run: ./.github/actions/build
+
+ test:
+ needs: [ build ]
name: ${{ matrix.case }}
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -68,13 +76,10 @@ jobs:
- mssql-jdbc-scenario
- mybatis-3.x-scenario
steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Run Plugin Test
- uses: ./.github/actions/plugins-test
+ uses: ./.github/actions/run
with:
test_case: ${{ matrix.case }}
diff --git a/.github/workflows/plugins-test.2.yaml b/.github/workflows/plugins-test.2.yaml
index 96f052f..bcf663e 100644
--- a/.github/workflows/plugins-test.2.yaml
+++ b/.github/workflows/plugins-test.2.yaml
@@ -26,20 +26,28 @@ on:
- 'apm-sniffer/**'
- 'test/plugin/**'
- '**/pom.xml'
- - '!test/e2e/**'
- - '!apm-webapp/**'
- - '!apm-dist/**'
- - '!apm-dist-es7/**'
- - '!apm-docker/**'
- - '!oap-server/**'
- '!**.md'
+ push:
+ branches:
+ - test/ci/*
concurrency:
group: plugins-2-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- PluginsTest:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - run: ./.github/actions/build
+
+ test:
+ needs: [ build ]
name: ${{ matrix.case }}
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -77,6 +85,6 @@ jobs:
with:
java-version: 8
- name: Run Plugin Test
- uses: ./.github/actions/plugins-test
+ uses: ./.github/actions/run
with:
test_case: ${{ matrix.case }}
diff --git a/.github/workflows/plugins-test.3.yaml b/.github/workflows/plugins-test.3.yaml
index 8dd1cc4..47d67cc 100644
--- a/.github/workflows/plugins-test.3.yaml
+++ b/.github/workflows/plugins-test.3.yaml
@@ -26,20 +26,28 @@ on:
- 'apm-sniffer/**'
- 'test/plugin/**'
- '**/pom.xml'
- - '!test/e2e/**'
- - '!apm-webapp/**'
- - '!apm-dist/**'
- - '!apm-dist-es7/**'
- - '!apm-docker/**'
- - '!oap-server/**'
- '!**.md'
+ push:
+ branches:
+ - test/ci/*
concurrency:
group: plugins-3-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- PluginsTest:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - run: ./.github/actions/build
+
+ test:
+ needs: [ build ]
name: ${{ matrix.case }}
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -86,11 +94,12 @@ jobs:
with:
java-version: 8
- name: Run Plugin Test
- uses: ./.github/actions/plugins-test
+ uses: ./.github/actions/run
with:
test_case: ${{ matrix.case }}
Oracle:
+ needs: [ build ]
name: Oracle
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -101,12 +110,6 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 8
- - 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 -Dmaven.test.skip
- - name: Build Docker image
- 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