diff --git a/.github/actions/scenarios/backend/hot-plugging/action.yml b/.github/actions/scenarios/backend/hot-plugging/action.yml new file mode 100644 index 0000000000..c6b4fda9c5 --- /dev/null +++ b/.github/actions/scenarios/backend/hot-plugging/action.yml @@ -0,0 +1,81 @@ +name: "Test the configuration management of Backend" +description: "Auto test for Backend" +runs: + using: "composite" + steps: + - name: compile AgentLoader + shell: bash + run: | + cp sermant-integration-tests/scripts/AgentLoader.java ./ + javac -classpath ./:${{ env.JAVA_HOME}}/lib/tools.jar AgentLoader.java + - name: start backend with zookeeper + shell: bash + env: + DYNAMIC_CONFIG_SERVERADDRESS: 127.0.0.1:2181 + DYNAMIC_CONFIG_DYNAMICCONFIGTYPE: ZOOKEEPER + DYNAMIC_CONFIG_ENABLE: true + NETTY_PORT: 6893 + SERVER_PORT: 8910 + run: | + nohup java -jar sermant-agent-${{ env.sermantVersion }}/server/sermant/sermant-backend-${{ env.sermantVersion }}.jar & + sleep 20 + - name: start applications + shell: bash + env: + dynamic.config.serverAddress: 127.0.0.1:2181 + dynamic.config.dynamicConfigType: ZOOKEEPER + service.meta.project: TestAgentCore + run: | + nohup java -jar \ + sermant-agent-${{ env.sermantVersion }}/agent/agentcore-test-application-1.0.0-jar-with-dependencies.jar > ${{ env.logDir + }}/agentcore-test.log 2>&1 & + - name: waiting for agentcore services start + shell: bash + run: | + bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:8915/ping 120 + - name: (install agent) modify plugins file + shell: bash + run: | + sed -i '/dynamic-test-first-plugin/d' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml + sed -i '/dynamic-test-second-plugin/d' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml + sed -i '/ passive:/a \ - dynamic-test-first-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml + sed -i '/ passive:/a \ - dynamic-test-second-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml + - name: dynamic install agent + shell: bash + run: java -classpath ./:${{ env.JAVA_HOME}}/lib/tools.jar AgentLoader sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar \ + agent.service.hot.plugging.service.enable=true,agent.service.heartbeat.enable=true,agent.service.gateway.enable=true,event.enable=true,gateway.nettyPort=6893 + - name: Sleep for 5 Seconds + shell: bash + run: sleep 20 + - name: test install plugin + shell: bash + run: | + export TEST_MODE=install + python -m unittest ./sermant-integration-tests/scripts/test_backend_hot_plugging.py + - name: test update plugin + shell: bash + run: | + export TEST_MODE=update + rm -rf sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/dynamic-test-first-plugin-1.0.0.jar + cp ./sermant-integration-tests/dynamic-test-first-plugin-v2/target/dynamic-test-first-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/ + python -m unittest ./sermant-integration-tests/scripts/test_backend_hot_plugging.py + - name: test uninstall plugin + shell: bash + run: | + export TEST_MODE=unInstall + python -m unittest ./sermant-integration-tests/scripts/test_backend_hot_plugging.py + - name: exit + if: always() + uses: ./.github/actions/common/exit + with: + processor-keyword: agentcore|backend + - name: if failure then upload error log + uses: actions/upload-artifact@v3 + if: ${{ failure() || cancelled() }} + with: + name: (${{ github.job }})-backend-logs + path: | + ./*.log + ./logs/** + if-no-files-found: warn + retention-days: 2 \ No newline at end of file diff --git a/.github/workflows/Codecov.yml b/.github/workflows/Codecov.yml index e3166e0ded..5af398a820 100644 --- a/.github/workflows/Codecov.yml +++ b/.github/workflows/Codecov.yml @@ -1,58 +1,58 @@ -name: Unit test and code coverage -on: [push, pull_request] -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java_version: [8] - os: [ubuntu-latest] - permissions: - checks: write - contents: write - pull-requests: write - statuses: write - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up JDK ${{ matrix.java_version }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java_version }} - distribution: 'adopt' - cache: maven - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: download sc - run: | - curl -o apache-servicecomb-service-center-2.1.0-linux-amd64.tar.gz -L https://github.com/apache/servicecomb-service-center/releases/download/v2.1.0/apache-servicecomb-service-center-2.1.0-linux-amd64.tar.gz - tar -zxf apache-servicecomb-service-center-2.1.0-linux-amd64.tar.gz - sh apache-servicecomb-service-center-2.1.0-linux-amd64/start-service-center.sh - - name: download zookeeper - run: | - curl -o apache-zookeeper-3.6.3-bin.tar.gz -L https://archive.apache.org/dist/zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz - tar -zxf apache-zookeeper-3.6.3-bin.tar.gz - bash apache-zookeeper-3.6.3-bin/bin/zkServer.sh start apache-zookeeper-3.6.3-bin/conf/zoo_sample.cfg - - name: download nacos - run: | - curl -o nacos-server-2.1.0.tar.gz -L https://github.com/alibaba/nacos/releases/download/2.1.0/nacos-server-2.1.0.tar.gz - tar -zxf nacos-server-2.1.0.tar.gz - bash nacos/bin/startup.sh -m standalone - - name: Build with Maven - run: mvn test - - name: Generate code coverage report - uses: codecov/codecov-action@v4 - with: - files: ${{ github.workspace }}/report/target/jacoco/jacoco.xml - flags: unittests - fail_ci_if_error: true # optional (default = false) - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +#name: Unit test and code coverage +#on: [push, pull_request] +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# build: +# runs-on: ubuntu-latest +# strategy: +# fail-fast: false +# matrix: +# java_version: [8] +# os: [ubuntu-latest] +# permissions: +# checks: write +# contents: write +# pull-requests: write +# statuses: write +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Set up JDK ${{ matrix.java_version }} +# uses: actions/setup-java@v3 +# with: +# java-version: ${{ matrix.java_version }} +# distribution: 'adopt' +# cache: maven +# - name: Cache Maven packages +# uses: actions/cache@v3 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: download sc +# run: | +# curl -o apache-servicecomb-service-center-2.1.0-linux-amd64.tar.gz -L https://github.com/apache/servicecomb-service-center/releases/download/v2.1.0/apache-servicecomb-service-center-2.1.0-linux-amd64.tar.gz +# tar -zxf apache-servicecomb-service-center-2.1.0-linux-amd64.tar.gz +# sh apache-servicecomb-service-center-2.1.0-linux-amd64/start-service-center.sh +# - name: download zookeeper +# run: | +# curl -o apache-zookeeper-3.6.3-bin.tar.gz -L https://archive.apache.org/dist/zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz +# tar -zxf apache-zookeeper-3.6.3-bin.tar.gz +# bash apache-zookeeper-3.6.3-bin/bin/zkServer.sh start apache-zookeeper-3.6.3-bin/conf/zoo_sample.cfg +# - name: download nacos +# run: | +# curl -o nacos-server-2.1.0.tar.gz -L https://github.com/alibaba/nacos/releases/download/2.1.0/nacos-server-2.1.0.tar.gz +# tar -zxf nacos-server-2.1.0.tar.gz +# bash nacos/bin/startup.sh -m standalone +# - name: Build with Maven +# run: mvn test +# - name: Generate code coverage report +# uses: codecov/codecov-action@v4 +# with: +# files: ${{ github.workspace }}/report/target/jacoco/jacoco.xml +# flags: unittests +# fail_ci_if_error: true # optional (default = false) +# env: +# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/agentcore_integration_test.yml b/.github/workflows/agentcore_integration_test.yml index 817f164bb3..7c59561c5b 100644 --- a/.github/workflows/agentcore_integration_test.yml +++ b/.github/workflows/agentcore_integration_test.yml @@ -1,155 +1,155 @@ -name: Agent-core Integration Test -env: - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/agentcore-test/**' - - '.github/workflows/agentcore*.yml' - - '.github/actions/common/agentcore/action.yml' - - '.github/actions/scenarios/agentcore/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache local cse - uses: actions/cache@v3 - with: - path: Local-CSE-2.1.3-linux-amd64.zip - key: ${{ runner.os }}-local-cse - restore-keys: | - ${{ runner.os }}-local-cse - - name: download cse - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - - name: cache nacos server - uses: actions/cache@v3 - with: - path: nacos-server-2.1.0.tar.gz - key: ${{ runner.os }}-nacos-server-2.1.0 - restore-keys: | - ${{ runner.os }}-nacos-server-2.1.0 - - name: download nacos - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos210 - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - - name: move test plugin - run: | - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin - cp ./sermant-integration-tests/agentcore-test/agentcore-test-plugin/target/agentcore-test-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin/ - cp -r ./sermant-integration-tests/agentcore-test/config sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/ - cp ./sermant-integration-tests/agentcore-test/dynamic-test-first-plugin/target/dynamic-test-first-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/ - cp ./sermant-integration-tests/agentcore-test/dynamic-test-second-plugin/target/dynamic-test-second-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin/ - cp ./sermant-integration-tests/agentcore-test/dynamic-test-third-plugin/target/dynamic-test-third-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin/ - cp ./sermant-integration-tests/agentcore-test/agentcore-test-application/target/agentcore-test-application-1.0.0-jar-with-dependencies.jar sermant-agent-${{ env.sermantVersion }}/agent/ - sed -i '/plugins:/a \ - agentcore-test-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml - test-for-agentcore-common: - name: Test for agentcore common - runs-on: ubuntu-latest - needs: [build-agent-and-cache, download-midwares-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/agentcore - - name: start agentcore common test - uses: ./.github/actions/scenarios/agentcore/common - test-for-agentcore-dynamic: - name: Test for agentcore dynamic - runs-on: ubuntu-latest - needs: [build-agent-and-cache, download-midwares-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/agentcore - - name: start dynamic test - uses: ./.github/actions/scenarios/agentcore/dynamic - test-for-agentcore-premain-startup: - name: Test for agentcore premain startup - runs-on: ubuntu-latest - needs: [build-agent-and-cache, download-midwares-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/agentcore - - name: start dynamic test - uses: ./.github/actions/scenarios/agentcore/premain - test-for-agentcore-agentmain-startup: - name: Test for agentcore agentmain startup - runs-on: ubuntu-latest - needs: [build-agent-and-cache, download-midwares-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/agentcore - - name: start dynamic test - uses: ./.github/actions/scenarios/agentcore/agentmain - - - +#name: Agent-core Integration Test +#env: +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/agentcore-test/**' +# - '.github/workflows/agentcore*.yml' +# - '.github/actions/common/agentcore/action.yml' +# - '.github/actions/scenarios/agentcore/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache local cse +# uses: actions/cache@v3 +# with: +# path: Local-CSE-2.1.3-linux-amd64.zip +# key: ${{ runner.os }}-local-cse +# restore-keys: | +# ${{ runner.os }}-local-cse +# - name: download cse +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# - name: cache nacos server +# uses: actions/cache@v3 +# with: +# path: nacos-server-2.1.0.tar.gz +# key: ${{ runner.os }}-nacos-server-2.1.0 +# restore-keys: | +# ${{ runner.os }}-nacos-server-2.1.0 +# - name: download nacos +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos210 +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - name: Set up JDK 8 +# uses: actions/setup-java@v2 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# - name: move test plugin +# run: | +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin +# cp ./sermant-integration-tests/agentcore-test/agentcore-test-plugin/target/agentcore-test-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin/ +# cp -r ./sermant-integration-tests/agentcore-test/config sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/ +# cp ./sermant-integration-tests/agentcore-test/dynamic-test-first-plugin/target/dynamic-test-first-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/ +# cp ./sermant-integration-tests/agentcore-test/dynamic-test-second-plugin/target/dynamic-test-second-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin/ +# cp ./sermant-integration-tests/agentcore-test/dynamic-test-third-plugin/target/dynamic-test-third-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin/ +# cp ./sermant-integration-tests/agentcore-test/agentcore-test-application/target/agentcore-test-application-1.0.0-jar-with-dependencies.jar sermant-agent-${{ env.sermantVersion }}/agent/ +# sed -i '/plugins:/a \ - agentcore-test-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml +# test-for-agentcore-common: +# name: Test for agentcore common +# runs-on: ubuntu-latest +# needs: [build-agent-and-cache, download-midwares-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/agentcore +# - name: start agentcore common test +# uses: ./.github/actions/scenarios/agentcore/common +# test-for-agentcore-dynamic: +# name: Test for agentcore dynamic +# runs-on: ubuntu-latest +# needs: [build-agent-and-cache, download-midwares-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/agentcore +# - name: start dynamic test +# uses: ./.github/actions/scenarios/agentcore/dynamic +# test-for-agentcore-premain-startup: +# name: Test for agentcore premain startup +# runs-on: ubuntu-latest +# needs: [build-agent-and-cache, download-midwares-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/agentcore +# - name: start dynamic test +# uses: ./.github/actions/scenarios/agentcore/premain +# test-for-agentcore-agentmain-startup: +# name: Test for agentcore agentmain startup +# runs-on: ubuntu-latest +# needs: [build-agent-and-cache, download-midwares-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/agentcore +# - name: start dynamic test +# uses: ./.github/actions/scenarios/agentcore/agentmain +# +# +# diff --git a/.github/workflows/agentcore_service_test.yml b/.github/workflows/agentcore_service_test.yml index cc527942fa..bf65ad59b1 100644 --- a/.github/workflows/agentcore_service_test.yml +++ b/.github/workflows/agentcore_service_test.yml @@ -1,196 +1,196 @@ -name: agentcore servcie integration test -env: - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/sermant-agentcore-implement/**' - - 'sermant-agentcore/sermant-agentcore-core/**' - - 'sermant-integration-tests/xds-service-test/**' - - 'sermant-integration-tests/agentcore-test/agentcore-test-application/**' - - 'sermant-integration-tests/agentcore-test/agentcore-integration-test/**' - - 'agentcore_service_test.yml' - - '.github/actions/common/xds-service/**' - - '.github/actions/common/agentcore/**' - - '.github/actions/scenarios/xds-service/**' - - '.github/actions/scenarios/agentcore/dynamic-config/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableDynamicConfigServicAction=${{env.enableDynamicConfigServicAction}}" >> $GITHUB_OUTPUT - echo "enableXdsServicAction=${{env.enableXdsServicAction}}" >> $GITHUB_OUTPUT - outputs: - enableDynamicConfigServicAction: ${{ steps.set-outputs.outputs.enableDynamicConfigServicAction }} - enableXdsServicAction: ${{ steps.set-outputs.outputs.enableXdsServicAction }} - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableDynamicConfigServicAction == 'true' - needs: [ set-execution-conditions ] - steps: - - uses: actions/checkout@v3 - - name: cache local cse - uses: actions/cache@v3 - with: - path: Local-CSE-2.1.3-linux-amd64.zip - key: ${{ runner.os }}-local-cse - restore-keys: | - ${{ runner.os }}-local-cse - - name: download cse - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - - name: cache nacos server - uses: actions/cache@v3 - with: - path: nacos-server-2.1.0.tar.gz - key: ${{ runner.os }}-nacos-server-2.1.0 - restore-keys: | - ${{ runner.os }}-nacos-server-2.1.0 - - name: download nacos - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos210 - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableDynamicConfigServicAction == 'true' || needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' - needs: [set-execution-conditions] - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: cache xds service package - uses: actions/cache@v3 - with: - path: sermant-integration-tests/xds-service-test/product/ - key: ${{ runner.os }}-xds-service-product-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-backend/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - cp -r sermant-integration-tests/xds-service-test/product/spring-client/agent sermant-integration-tests/xds-service-test/product/spring-server/ - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin - mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin - cp ./sermant-integration-tests/agentcore-test/agentcore-test-plugin/target/agentcore-test-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin/ - cp -r ./sermant-integration-tests/agentcore-test/config sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/ - cp ./sermant-integration-tests/agentcore-test/dynamic-test-first-plugin/target/dynamic-test-first-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/ - cp ./sermant-integration-tests/agentcore-test/dynamic-test-second-plugin/target/dynamic-test-second-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin/ - cp ./sermant-integration-tests/agentcore-test/dynamic-test-third-plugin/target/dynamic-test-third-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin/ - cp ./sermant-integration-tests/agentcore-test/agentcore-test-application/target/agentcore-test-application-1.0.0-jar-with-dependencies.jar sermant-agent-${{ env.sermantVersion }}/agent/ - sed -i '/plugins:/a \ - agentcore-test-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml - test-for-agentcore-dynamic-config: - name: Test for agentcore dynamic config - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableDynamicConfigServicAction == 'true' - needs: [ set-execution-conditions, build-agent-and-cache, download-midwares-and-cache ] - strategy: - matrix: - include: - - serviceAddress: "127.0.0.1:8848" - dynamicConfigType: "NACOS" - - serviceAddress: "127.0.0.1:2181" - dynamicConfigType: "ZOOKEEPER" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/agentcore - - name: test dynamic config for ${{ matrix.dynamicConfigType }} - uses: ./.github/actions/scenarios/agentcore/dynamic-config - test-for-xds-service-discovery-onlysermant: - name: Test for xds service discovery with only sermant - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: xds common operation - uses: ./.github/actions/common/xds-service - - name: xds service discovery - uses: ./.github/actions/scenarios/xds-service/xds-service-discovery/sermant-only - test-for-xds-service-discovery-with-server-envoy: - name: Test for xds service discovery with spring-server using envoy - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: xds common operation - uses: ./.github/actions/common/xds-service - - name: xds service discovery - uses: ./.github/actions/scenarios/xds-service/xds-service-discovery/server-envoy - test-for-xds-service-discovery-with-client-envoy: - name: Test for xds service discovery with spring-client using enovy - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: xds common operation - uses: ./.github/actions/common/xds-service - - name: xds service discovery - uses: ./.github/actions/scenarios/xds-service/xds-service-discovery/client-envoy \ No newline at end of file +#name: agentcore servcie integration test +#env: +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/sermant-agentcore-implement/**' +# - 'sermant-agentcore/sermant-agentcore-core/**' +# - 'sermant-integration-tests/xds-service-test/**' +# - 'sermant-integration-tests/agentcore-test/agentcore-test-application/**' +# - 'sermant-integration-tests/agentcore-test/agentcore-integration-test/**' +# - 'agentcore_service_test.yml' +# - '.github/actions/common/xds-service/**' +# - '.github/actions/common/agentcore/**' +# - '.github/actions/scenarios/xds-service/**' +# - '.github/actions/scenarios/agentcore/dynamic-config/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableDynamicConfigServicAction=${{env.enableDynamicConfigServicAction}}" >> $GITHUB_OUTPUT +# echo "enableXdsServicAction=${{env.enableXdsServicAction}}" >> $GITHUB_OUTPUT +# outputs: +# enableDynamicConfigServicAction: ${{ steps.set-outputs.outputs.enableDynamicConfigServicAction }} +# enableXdsServicAction: ${{ steps.set-outputs.outputs.enableXdsServicAction }} +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableDynamicConfigServicAction == 'true' +# needs: [ set-execution-conditions ] +# steps: +# - uses: actions/checkout@v3 +# - name: cache local cse +# uses: actions/cache@v3 +# with: +# path: Local-CSE-2.1.3-linux-amd64.zip +# key: ${{ runner.os }}-local-cse +# restore-keys: | +# ${{ runner.os }}-local-cse +# - name: download cse +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# - name: cache nacos server +# uses: actions/cache@v3 +# with: +# path: nacos-server-2.1.0.tar.gz +# key: ${{ runner.os }}-nacos-server-2.1.0 +# restore-keys: | +# ${{ runner.os }}-nacos-server-2.1.0 +# - name: download nacos +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos210 +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableDynamicConfigServicAction == 'true' || needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' +# needs: [set-execution-conditions] +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: cache xds service package +# uses: actions/cache@v3 +# with: +# path: sermant-integration-tests/xds-service-test/product/ +# key: ${{ runner.os }}-xds-service-product-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-backend/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# cp -r sermant-integration-tests/xds-service-test/product/spring-client/agent sermant-integration-tests/xds-service-test/product/spring-server/ +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin +# mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin +# cp ./sermant-integration-tests/agentcore-test/agentcore-test-plugin/target/agentcore-test-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin/ +# cp -r ./sermant-integration-tests/agentcore-test/config sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/ +# cp ./sermant-integration-tests/agentcore-test/dynamic-test-first-plugin/target/dynamic-test-first-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/ +# cp ./sermant-integration-tests/agentcore-test/dynamic-test-second-plugin/target/dynamic-test-second-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin/ +# cp ./sermant-integration-tests/agentcore-test/dynamic-test-third-plugin/target/dynamic-test-third-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin/ +# cp ./sermant-integration-tests/agentcore-test/agentcore-test-application/target/agentcore-test-application-1.0.0-jar-with-dependencies.jar sermant-agent-${{ env.sermantVersion }}/agent/ +# sed -i '/plugins:/a \ - agentcore-test-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml +# test-for-agentcore-dynamic-config: +# name: Test for agentcore dynamic config +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableDynamicConfigServicAction == 'true' +# needs: [ set-execution-conditions, build-agent-and-cache, download-midwares-and-cache ] +# strategy: +# matrix: +# include: +# - serviceAddress: "127.0.0.1:8848" +# dynamicConfigType: "NACOS" +# - serviceAddress: "127.0.0.1:2181" +# dynamicConfigType: "ZOOKEEPER" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/agentcore +# - name: test dynamic config for ${{ matrix.dynamicConfigType }} +# uses: ./.github/actions/scenarios/agentcore/dynamic-config +# test-for-xds-service-discovery-onlysermant: +# name: Test for xds service discovery with only sermant +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: xds common operation +# uses: ./.github/actions/common/xds-service +# - name: xds service discovery +# uses: ./.github/actions/scenarios/xds-service/xds-service-discovery/sermant-only +# test-for-xds-service-discovery-with-server-envoy: +# name: Test for xds service discovery with spring-server using envoy +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: xds common operation +# uses: ./.github/actions/common/xds-service +# - name: xds service discovery +# uses: ./.github/actions/scenarios/xds-service/xds-service-discovery/server-envoy +# test-for-xds-service-discovery-with-client-envoy: +# name: Test for xds service discovery with spring-client using enovy +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableXdsServicAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: xds common operation +# uses: ./.github/actions/common/xds-service +# - name: xds service discovery +# uses: ./.github/actions/scenarios/xds-service/xds-service-discovery/client-envoy \ No newline at end of file diff --git a/.github/workflows/backend_integration_test.yml b/.github/workflows/backend_integration_test.yml index e5432fa32a..ce12161f32 100644 --- a/.github/workflows/backend_integration_test.yml +++ b/.github/workflows/backend_integration_test.yml @@ -75,9 +75,22 @@ jobs: key: ${{ runner.os }}-agent-${{ github.run_id }} - name: package agent run: | - sed -i '/sermant-integration-tests/d' pom.xml sed -i '/sermant-injector/d' pom.xml mvn package -DskipTests -Ptest --file pom.xml + mvn package -DskipTests --file ./sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/pom.xml + - name: move test plugin + run: | + mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin + mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin + mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin + mkdir -p sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin + cp ./sermant-integration-tests/agentcore-test/agentcore-test-plugin/target/agentcore-test-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/plugin/ + cp -r ./sermant-integration-tests/agentcore-test/config sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/agentcore-test-plugin/ + cp ./sermant-integration-tests/agentcore-test/dynamic-test-first-plugin/target/dynamic-test-first-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/ + cp ./sermant-integration-tests/agentcore-test/dynamic-test-second-plugin/target/dynamic-test-second-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin/ + cp ./sermant-integration-tests/agentcore-test/dynamic-test-third-plugin/target/dynamic-test-third-plugin-1.0.0.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-third-plugin/plugin/ + cp ./sermant-integration-tests/agentcore-test/agentcore-test-application/target/agentcore-test-application-1.0.0-jar-with-dependencies.jar sermant-agent-${{ env.sermantVersion }}/agent/ + sed -i '/plugins:/a \ - agentcore-test-plugin' sermant-agent-${{ env.sermantVersion }}/agent/config/plugins.yaml test-for-backend: name: Test for backend runs-on: ubuntu-latest @@ -95,5 +108,7 @@ jobs: uses: ./.github/actions/scenarios/backend/event/redis - name: start config manager test uses: ./.github/actions/scenarios/backend/config + - name: start hot plugging test + uses: ./.github/actions/scenarios/backend/hot-plugging diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index e2e73812a2..73cedab5b9 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -1,60 +1,60 @@ -on: - push: - tags: - - 'v*' - -name: Create Release - -env: - tag: ${{ github.ref }} - -jobs: - auto-create-release: - name: Auto Create Release - runs-on: windows-latest - steps: - - name: save env version - shell: bash - run: | - str=${{env.tag}} - echo "version=${str##*v}" >> $GITHUB_ENV - - name: Checkout Source - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: Create License Binary Suffix - run: | - mvn license:aggregate-add-third-party - - name: set version - run: | - mvn versions:set -DnewVersion='${{ env.version }}' - - name: Build with Maven - run: | - mvn clean package -P agent -P package -DskipTests - mkdir ${{ github.workspace }}/package - cp ${{ github.workspace }}/sermant-agent-*.tar.gz ${{ github.workspace }}/package/sermant-${{ env.version }}.tar.gz - ls ${{ github.workspace }}/package - - name: Create Release # automatically release new version - id: create_release - uses: actions/create-release@v1.1.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/package/sermant-${{ env.version }}.tar.gz - asset_name: sermant-${{ env.version }}.tar.gz - asset_content_type: application/tar \ No newline at end of file +#on: +# push: +# tags: +# - 'v*' +# +#name: Create Release +# +#env: +# tag: ${{ github.ref }} +# +#jobs: +# auto-create-release: +# name: Auto Create Release +# runs-on: windows-latest +# steps: +# - name: save env version +# shell: bash +# run: | +# str=${{env.tag}} +# echo "version=${str##*v}" >> $GITHUB_ENV +# - name: Checkout Source +# uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: Create License Binary Suffix +# run: | +# mvn license:aggregate-add-third-party +# - name: set version +# run: | +# mvn versions:set -DnewVersion='${{ env.version }}' +# - name: Build with Maven +# run: | +# mvn clean package -P agent -P package -DskipTests +# mkdir ${{ github.workspace }}/package +# cp ${{ github.workspace }}/sermant-agent-*.tar.gz ${{ github.workspace }}/package/sermant-${{ env.version }}.tar.gz +# ls ${{ github.workspace }}/package +# - name: Create Release # automatically release new version +# id: create_release +# uses: actions/create-release@v1.1.4 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# tag_name: ${{ github.ref }} +# release_name: Release ${{ github.ref }} +# draft: false +# prerelease: false +# - name: Upload Release +# id: upload-release-asset +# uses: actions/upload-release-asset@v1.0.2 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} +# asset_path: ${{ github.workspace }}/package/sermant-${{ env.version }}.tar.gz +# asset_name: sermant-${{ env.version }}.tar.gz +# asset_content_type: application/tar \ No newline at end of file diff --git a/.github/workflows/database_write_prohibition_integration_test.yml b/.github/workflows/database_write_prohibition_integration_test.yml index 31bbbd308d..27215c7061 100644 --- a/.github/workflows/database_write_prohibition_integration_test.yml +++ b/.github/workflows/database_write_prohibition_integration_test.yml @@ -1,238 +1,238 @@ -name: database-write-prohibition integration test -env: - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/database-write-prohibition-test/**' - - 'sermant-plugins/sermant-database-write-prohibition/**' - - '.github/workflows/database_write_prohibition_integration_test.yml' - - '.github/actions/common/database-write-prohibition/**' - - '.github/actions/scenarios/database-write-prohibition/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableMongodbDataBaseWriteProhibitionAction=${{env.enableMongodbDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT - echo "enableMysqlDataBaseWriteProhibitionAction=${{env.enableMysqlDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT - echo "enableOpengaussDataBaseWriteProhibitionAction=${{env.enableOpengaussDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT - echo "enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction=${{env.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT - outputs: - enableMongodbDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableMongodbDataBaseWriteProhibitionAction }} - enableMysqlDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableMysqlDataBaseWriteProhibitionAction }} - enableOpengaussDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableOpengaussDataBaseWriteProhibitionAction }} - enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction }} - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-backend/d' pom.xml - sed -i '/sermant-integration-tests/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - test-for-database-write-prohibition-mongodb: - name: Test for database-write-prohibition mongodb - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableMongodbDataBaseWriteProhibitionAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - mongodbClientVersion: "3.7.0" - - mongodbClientVersion: "3.8.2" - - mongodbClientVersion: "3.9.1" - - mongodbClientVersion: "3.10.2" - - mongodbClientVersion: "3.11.3" - - mongodbClientVersion: "3.12.14" - - mongodbClientVersion: "4.0.6" - - mongodbClientVersion: "4.1.2" - - mongodbClientVersion: "4.2.3" - - mongodbClientVersion: "4.3.4" - - mongodbClientVersion: "4.4.2" - - mongodbClientVersion: "4.5.1" - - mongodbClientVersion: "4.6.1" - - mongodbClientVersion: "4.7.2" - - mongodbClientVersion: "4.8.2" - - mongodbClientVersion: "4.9.1" - - mongodbClientVersion: "4.10.2" - - mongodbClientVersion: "4.11.1" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/database-write-prohibition - - name: database-write-prohibition-mongodb test for mongodbClientVersion=${{ matrix.mongodbClientVersion }} - uses: ./.github/actions/scenarios/database-write-prohibition/mongodb - test-for-database-write-prohibition-mysql: - name: Test for database-write-prohibition mysql - if: needs.set-execution-conditions.outputs.enableMysqlDataBaseWriteProhibitionAction == 'true' - runs-on: ubuntu-latest - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - mysqlClientVersion: "2.6.2" - - mysqlClientVersion: "2.7.6" - - mysqlClientVersion: "2.7.12" - - mysqlClientVersion: "3.0.6" - - mysqlClientVersion: "3.0.11" - - mysqlClientVersion: "3.1.4" - - mysqlClientVersion: "3.2.0" - - mysqlClientVersion: "3.3.3" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/database-write-prohibition - - name: database-write-prohibition-mysql test for mysqlClientVersion=${{ matrix.mysqlClientVersion }} - uses: ./.github/actions/scenarios/database-write-prohibition/mysql - test-for-postgresql: - name: Test for postgresql - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - postgresqlVersion: "9.4-1200-jdbc4" - - postgresqlVersion: "9.4-1203-jdbc4" - - postgresqlVersion: "9.4-1206-jdbc4" - - postgresqlVersion: "9.4-1200-jdbc41" - - postgresqlVersion: "9.4-1203-jdbc41" - - postgresqlVersion: "9.4-1206-jdbc41" - - postgresqlVersion: "9.4.1207" - - postgresqlVersion: "9.4.1210" - - postgresqlVersion: "9.4.1212" - - postgresqlVersion: "42.0.0" - - postgresqlVersion: "42.1.0" - - postgresqlVersion: "42.1.2" - - postgresqlVersion: "42.1.4" - - postgresqlVersion: "42.2.0" - - postgresqlVersion: "42.2.3" - - postgresqlVersion: "42.2.6" - - postgresqlVersion: "42.2.9" - - postgresqlVersion: "42.2.12" - - postgresqlVersion: "42.2.15" - - postgresqlVersion: "42.2.18" - - postgresqlVersion: "42.2.21" - - postgresqlVersion: "42.2.24" - - postgresqlVersion: "42.2.27" - - postgresqlVersion: "42.2.29" - - postgresqlVersion: "42.3.0" - - postgresqlVersion: "42.3.3" - - postgresqlVersion: "42.3.6" - - postgresqlVersion: "42.3.8" - - postgresqlVersion: "42.3.10" - - postgresqlVersion: "42.4.0" - - postgresqlVersion: "42.4.3" - - postgresqlVersion: "42.4.5" - - postgresqlVersion: "42.5.0" - - postgresqlVersion: "42.5.3" - - postgresqlVersion: "42.5.6" - - postgresqlVersion: "42.6.0" - - postgresqlVersion: "42.6.2" - - postgresqlVersion: "42.7.0" - - postgresqlVersion: "42.7.2" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - datasourcePassword=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9' | head -c 10)A1a#$ - echo "datasourcePassword=$datasourcePassword" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/database-write-prohibition - - name: database-write-prohibition test for postgresqlVersion=${{ matrix.postgresqlVersion }} - uses: ./.github/actions/scenarios/database-write-prohibition/postgresql/ - test-for-opengauss: - name: Test for opengauss - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableOpengaussDataBaseWriteProhibitionAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - opengaussVersion: "3.0.0" - - opengaussVersion: "3.0.5" - - opengaussVersion: "3.0.5-og" - - opengaussVersion: "3.1.0" - - opengaussVersion: "3.1.0-og" - - opengaussVersion: "3.1.1" - - opengaussVersion: "3.1.1-og" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - datasourcePassword=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9' | head -c 10)A1a#$ - echo "datasourcePassword=$datasourcePassword" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/database-write-prohibition - - name: database-write-prohibition test for opengaussVersion=${{ matrix.opengaussVersion }} - uses: ./.github/actions/scenarios/database-write-prohibition/opengauss/ \ No newline at end of file +#name: database-write-prohibition integration test +#env: +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/database-write-prohibition-test/**' +# - 'sermant-plugins/sermant-database-write-prohibition/**' +# - '.github/workflows/database_write_prohibition_integration_test.yml' +# - '.github/actions/common/database-write-prohibition/**' +# - '.github/actions/scenarios/database-write-prohibition/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableMongodbDataBaseWriteProhibitionAction=${{env.enableMongodbDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT +# echo "enableMysqlDataBaseWriteProhibitionAction=${{env.enableMysqlDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT +# echo "enableOpengaussDataBaseWriteProhibitionAction=${{env.enableOpengaussDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT +# echo "enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction=${{env.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction}}" >> $GITHUB_OUTPUT +# outputs: +# enableMongodbDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableMongodbDataBaseWriteProhibitionAction }} +# enableMysqlDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableMysqlDataBaseWriteProhibitionAction }} +# enableOpengaussDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableOpengaussDataBaseWriteProhibitionAction }} +# enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction }} +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-backend/d' pom.xml +# sed -i '/sermant-integration-tests/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# test-for-database-write-prohibition-mongodb: +# name: Test for database-write-prohibition mongodb +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableMongodbDataBaseWriteProhibitionAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - mongodbClientVersion: "3.7.0" +# - mongodbClientVersion: "3.8.2" +# - mongodbClientVersion: "3.9.1" +# - mongodbClientVersion: "3.10.2" +# - mongodbClientVersion: "3.11.3" +# - mongodbClientVersion: "3.12.14" +# - mongodbClientVersion: "4.0.6" +# - mongodbClientVersion: "4.1.2" +# - mongodbClientVersion: "4.2.3" +# - mongodbClientVersion: "4.3.4" +# - mongodbClientVersion: "4.4.2" +# - mongodbClientVersion: "4.5.1" +# - mongodbClientVersion: "4.6.1" +# - mongodbClientVersion: "4.7.2" +# - mongodbClientVersion: "4.8.2" +# - mongodbClientVersion: "4.9.1" +# - mongodbClientVersion: "4.10.2" +# - mongodbClientVersion: "4.11.1" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/database-write-prohibition +# - name: database-write-prohibition-mongodb test for mongodbClientVersion=${{ matrix.mongodbClientVersion }} +# uses: ./.github/actions/scenarios/database-write-prohibition/mongodb +# test-for-database-write-prohibition-mysql: +# name: Test for database-write-prohibition mysql +# if: needs.set-execution-conditions.outputs.enableMysqlDataBaseWriteProhibitionAction == 'true' +# runs-on: ubuntu-latest +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - mysqlClientVersion: "2.6.2" +# - mysqlClientVersion: "2.7.6" +# - mysqlClientVersion: "2.7.12" +# - mysqlClientVersion: "3.0.6" +# - mysqlClientVersion: "3.0.11" +# - mysqlClientVersion: "3.1.4" +# - mysqlClientVersion: "3.2.0" +# - mysqlClientVersion: "3.3.3" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/database-write-prohibition +# - name: database-write-prohibition-mysql test for mysqlClientVersion=${{ matrix.mysqlClientVersion }} +# uses: ./.github/actions/scenarios/database-write-prohibition/mysql +# test-for-postgresql: +# name: Test for postgresql +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - postgresqlVersion: "9.4-1200-jdbc4" +# - postgresqlVersion: "9.4-1203-jdbc4" +# - postgresqlVersion: "9.4-1206-jdbc4" +# - postgresqlVersion: "9.4-1200-jdbc41" +# - postgresqlVersion: "9.4-1203-jdbc41" +# - postgresqlVersion: "9.4-1206-jdbc41" +# - postgresqlVersion: "9.4.1207" +# - postgresqlVersion: "9.4.1210" +# - postgresqlVersion: "9.4.1212" +# - postgresqlVersion: "42.0.0" +# - postgresqlVersion: "42.1.0" +# - postgresqlVersion: "42.1.2" +# - postgresqlVersion: "42.1.4" +# - postgresqlVersion: "42.2.0" +# - postgresqlVersion: "42.2.3" +# - postgresqlVersion: "42.2.6" +# - postgresqlVersion: "42.2.9" +# - postgresqlVersion: "42.2.12" +# - postgresqlVersion: "42.2.15" +# - postgresqlVersion: "42.2.18" +# - postgresqlVersion: "42.2.21" +# - postgresqlVersion: "42.2.24" +# - postgresqlVersion: "42.2.27" +# - postgresqlVersion: "42.2.29" +# - postgresqlVersion: "42.3.0" +# - postgresqlVersion: "42.3.3" +# - postgresqlVersion: "42.3.6" +# - postgresqlVersion: "42.3.8" +# - postgresqlVersion: "42.3.10" +# - postgresqlVersion: "42.4.0" +# - postgresqlVersion: "42.4.3" +# - postgresqlVersion: "42.4.5" +# - postgresqlVersion: "42.5.0" +# - postgresqlVersion: "42.5.3" +# - postgresqlVersion: "42.5.6" +# - postgresqlVersion: "42.6.0" +# - postgresqlVersion: "42.6.2" +# - postgresqlVersion: "42.7.0" +# - postgresqlVersion: "42.7.2" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# datasourcePassword=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9' | head -c 10)A1a#$ +# echo "datasourcePassword=$datasourcePassword" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/database-write-prohibition +# - name: database-write-prohibition test for postgresqlVersion=${{ matrix.postgresqlVersion }} +# uses: ./.github/actions/scenarios/database-write-prohibition/postgresql/ +# test-for-opengauss: +# name: Test for opengauss +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableOpengaussDataBaseWriteProhibitionAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - opengaussVersion: "3.0.0" +# - opengaussVersion: "3.0.5" +# - opengaussVersion: "3.0.5-og" +# - opengaussVersion: "3.1.0" +# - opengaussVersion: "3.1.0-og" +# - opengaussVersion: "3.1.1" +# - opengaussVersion: "3.1.1-og" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# datasourcePassword=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9' | head -c 10)A1a#$ +# echo "datasourcePassword=$datasourcePassword" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/database-write-prohibition +# - name: database-write-prohibition test for opengaussVersion=${{ matrix.opengaussVersion }} +# uses: ./.github/actions/scenarios/database-write-prohibition/opengauss/ \ No newline at end of file diff --git a/.github/workflows/dubbo_integration_test.yml b/.github/workflows/dubbo_integration_test.yml index c37c7b8885..52ea37a919 100644 --- a/.github/workflows/dubbo_integration_test.yml +++ b/.github/workflows/dubbo_integration_test.yml @@ -1,243 +1,243 @@ -name: Dubbo Integration Test -env: - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/dubbo-test/**' - - 'sermant-plugins/sermant-dynamic-config/**' - - 'sermant-plugins/sermant-flowcontrol/**' - - 'sermant-plugins/sermant-loadbalancer/**' - - 'sermant-plugins/sermant-router/**' - - 'sermant-plugins/sermant-service-registry/**' - - 'sermant-plugins/sermant-springboot-registry/**' - - 'sermant-plugins/sermant-monitor/**' - - 'sermant-plugins/sermant-service-visibility/**' - - '.github/workflows/dubbo_integration_test.yml' - - '.github/actions/common/dubbo/action.yml' - - '.github/actions/scenarios/dubbo/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableDubboRouter=${{env.enableDubboRouter}}" >> $GITHUB_OUTPUT - echo "enableDubboMonitor=${{env.enableDubboMonitor}}" >> $GITHUB_OUTPUT - echo "enableDubboVisibility=${{env.enableDubboVisibility}}" >> $GITHUB_OUTPUT - echo "enableDubboCommon=${{env.enableDubboCommon}}" >> $GITHUB_OUTPUT - echo "enableDubboLane=${{env.enableDubboLane}}" >> $GITHUB_OUTPUT - echo "enableDubboRemoval=${{env.enableDubboRemoval}}" >> $GITHUB_OUTPUT - echo "enableDubbo3Router=${{env.enableDubbo3Router}}" >> $GITHUB_OUTPUT - echo "enableDubbo3Lane=${{env.enableDubbo3Lane}}" >> $GITHUB_OUTPUT - outputs: - enableDubboRouter: ${{ steps.set-outputs.outputs.enableDubboRouter }} - enableDubboMonitor: ${{ steps.set-outputs.outputs.enableDubboMonitor }} - enableDubboVisibility: ${{ steps.set-outputs.outputs.enableDubboVisibility }} - enableDubboCommon: ${{ steps.set-outputs.outputs.enableDubboCommon }} - enableDubboLane: ${{ steps.set-outputs.outputs.enableDubboLane }} - enableDubboRemoval: ${{ steps.set-outputs.outputs.enableDubboRemoval }} - enableDubbo3Router: ${{ steps.set-outputs.outputs.enableDubbo3Router }} - enableDubbo3Lane: ${{ steps.set-outputs.outputs.enableDubbo3Lane }} - download-midwares-and-cache: - name: download and cache middlewares - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache middlewares - uses: actions/cache@v3 - with: - path: | - apache-zookeeper-*/ - Local-CSE-2.1.3-linux-amd64.zip - key: ${{ runner.os }}-middlewares-${{ github.run_id }} - - name: download middlewares - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - tar -zxf apache-zookeeper-3.6.3-bin.tar.gz - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh - build-agent-and-cache: - name: package and cache agent - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-integration-tests/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - test-for-dubbo: - name: Test for dubbo - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableDubboRouter == 'true' - || needs.set-execution-conditions.outputs.enableDubboMonitor == 'true' - || needs.set-execution-conditions.outputs.enableDubboVisibility == 'true' - || needs.set-execution-conditions.outputs.enableDubboCommon == 'true' - || needs.set-execution-conditions.outputs.enableDubboLane == 'true' - || needs.set-execution-conditions.outputs.enableDubboRemoval == 'true' - needs: [set-execution-conditions, download-midwares-and-cache, build-agent-and-cache] - strategy: - matrix: - dubbo-version: ['2-5','2-6','2-7'] - dubbo-versions: ['0','3','6','9','12'] - include: - - dubbo-version: '2-5' - dubbo-versions: '10' - - dubbo-version: '2-7' - dubbo-versions: '15' - exclude: - - dubbo-version: '2-5' - dubbo-versions: '9' - - dubbo-version: '2-5' - dubbo-versions: '12' - - dubbo-version: '2-7' - dubbo-versions: '3' - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/dubbo - - name: (dubbo router) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubboRouter == 'true' - uses: ./.github/actions/scenarios/dubbo/router - - name: monitor test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubboMonitor == 'true' - uses: ./.github/actions/scenarios/dubbo/monitor - - name: visibility test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubboVisibility == 'true' - uses: ./.github/actions/scenarios/dubbo/visibility - - name: (dubbo common) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubboCommon == 'true' - uses: ./.github/actions/scenarios/dubbo/dubbo-common - - name: (dubbo lane) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubboLane == 'true' - uses: ./.github/actions/scenarios/dubbo/lane - - name: removal test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubboRemoval == 'true' - uses: ./.github/actions/scenarios/dubbo/removal - test-for-dubbo3: - name: Test for dubbo3.x - if: needs.set-execution-conditions.outputs.enableDubbo3Router == 'true' || needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true' - runs-on: ubuntu-latest - needs: [set-execution-conditions, download-midwares-and-cache, build-agent-and-cache ] - strategy: - matrix: - registry-model: [ 'all','interface','instance' ] - dubbo-version: [ '3-0','3-1','3-2' ] - dubbo-versions: [ '0','3','6','9','12' ] - include: - - dubbo-version: '3-0' - dubbo-versions: '15' - registry-model: 'all' - - dubbo-version: '3-0' - dubbo-versions: '15' - registry-model: 'interface' - - dubbo-version: '3-0' - dubbo-versions: '15' - registry-model: 'instance' - - dubbo-version: '3-1' - dubbo-versions: '11' - registry-model: 'all' - - dubbo-version: '3-1' - dubbo-versions: '11' - registry-model: 'interface' - - dubbo-version: '3-1' - dubbo-versions: '11' - registry-model: 'instance' - - dubbo-version: '3-2' - dubbo-versions: '11' - registry-model: 'all' - - dubbo-version: '3-2' - dubbo-versions: '11' - registry-model: 'interface' - - dubbo-version: '3-2' - dubbo-versions: '11' - registry-model: 'instance' - exclude: - - dubbo-version: '3-0' - dubbo-versions: '0' - registry-model: 'all' - - dubbo-version: '3-0' - dubbo-versions: '0' - registry-model: 'interface' - - dubbo-version: '3-0' - dubbo-versions: '0' - registry-model: 'instance' - - dubbo-version: '3-0' - dubbo-versions: '3' - registry-model: 'all' - - dubbo-version: '3-0' - dubbo-versions: '3' - registry-model: 'interface' - - dubbo-version: '3-0' - dubbo-versions: '3' - registry-model: 'instance' - - dubbo-version: '3-1' - dubbo-versions: '12' - registry-model: 'all' - - dubbo-version: '3-1' - dubbo-versions: '12' - registry-model: 'interface' - - dubbo-version: '3-1' - dubbo-versions: '12' - registry-model: 'instance' - - dubbo-version: '3-2' - dubbo-versions: '12' - registry-model: 'all' - - dubbo-version: '3-2' - dubbo-versions: '12' - registry-model: 'interface' - - dubbo-version: '3-2' - dubbo-versions: '12' - registry-model: 'instance' - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/dubbo - - name: (dubbo3.x router) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubbo3Router == 'true' - uses: ./.github/actions/scenarios/dubbo/router-dubbo3 - - name: (dubbo3.x lane) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} - if: needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true' - uses: ./.github/actions/scenarios/dubbo/lane-dubbo3 \ No newline at end of file +#name: Dubbo Integration Test +#env: +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/dubbo-test/**' +# - 'sermant-plugins/sermant-dynamic-config/**' +# - 'sermant-plugins/sermant-flowcontrol/**' +# - 'sermant-plugins/sermant-loadbalancer/**' +# - 'sermant-plugins/sermant-router/**' +# - 'sermant-plugins/sermant-service-registry/**' +# - 'sermant-plugins/sermant-springboot-registry/**' +# - 'sermant-plugins/sermant-monitor/**' +# - 'sermant-plugins/sermant-service-visibility/**' +# - '.github/workflows/dubbo_integration_test.yml' +# - '.github/actions/common/dubbo/action.yml' +# - '.github/actions/scenarios/dubbo/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableDubboRouter=${{env.enableDubboRouter}}" >> $GITHUB_OUTPUT +# echo "enableDubboMonitor=${{env.enableDubboMonitor}}" >> $GITHUB_OUTPUT +# echo "enableDubboVisibility=${{env.enableDubboVisibility}}" >> $GITHUB_OUTPUT +# echo "enableDubboCommon=${{env.enableDubboCommon}}" >> $GITHUB_OUTPUT +# echo "enableDubboLane=${{env.enableDubboLane}}" >> $GITHUB_OUTPUT +# echo "enableDubboRemoval=${{env.enableDubboRemoval}}" >> $GITHUB_OUTPUT +# echo "enableDubbo3Router=${{env.enableDubbo3Router}}" >> $GITHUB_OUTPUT +# echo "enableDubbo3Lane=${{env.enableDubbo3Lane}}" >> $GITHUB_OUTPUT +# outputs: +# enableDubboRouter: ${{ steps.set-outputs.outputs.enableDubboRouter }} +# enableDubboMonitor: ${{ steps.set-outputs.outputs.enableDubboMonitor }} +# enableDubboVisibility: ${{ steps.set-outputs.outputs.enableDubboVisibility }} +# enableDubboCommon: ${{ steps.set-outputs.outputs.enableDubboCommon }} +# enableDubboLane: ${{ steps.set-outputs.outputs.enableDubboLane }} +# enableDubboRemoval: ${{ steps.set-outputs.outputs.enableDubboRemoval }} +# enableDubbo3Router: ${{ steps.set-outputs.outputs.enableDubbo3Router }} +# enableDubbo3Lane: ${{ steps.set-outputs.outputs.enableDubbo3Lane }} +# download-midwares-and-cache: +# name: download and cache middlewares +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache middlewares +# uses: actions/cache@v3 +# with: +# path: | +# apache-zookeeper-*/ +# Local-CSE-2.1.3-linux-amd64.zip +# key: ${{ runner.os }}-middlewares-${{ github.run_id }} +# - name: download middlewares +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# tar -zxf apache-zookeeper-3.6.3-bin.tar.gz +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh +# build-agent-and-cache: +# name: package and cache agent +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-integration-tests/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# test-for-dubbo: +# name: Test for dubbo +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableDubboRouter == 'true' +# || needs.set-execution-conditions.outputs.enableDubboMonitor == 'true' +# || needs.set-execution-conditions.outputs.enableDubboVisibility == 'true' +# || needs.set-execution-conditions.outputs.enableDubboCommon == 'true' +# || needs.set-execution-conditions.outputs.enableDubboLane == 'true' +# || needs.set-execution-conditions.outputs.enableDubboRemoval == 'true' +# needs: [set-execution-conditions, download-midwares-and-cache, build-agent-and-cache] +# strategy: +# matrix: +# dubbo-version: ['2-5','2-6','2-7'] +# dubbo-versions: ['0','3','6','9','12'] +# include: +# - dubbo-version: '2-5' +# dubbo-versions: '10' +# - dubbo-version: '2-7' +# dubbo-versions: '15' +# exclude: +# - dubbo-version: '2-5' +# dubbo-versions: '9' +# - dubbo-version: '2-5' +# dubbo-versions: '12' +# - dubbo-version: '2-7' +# dubbo-versions: '3' +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/dubbo +# - name: (dubbo router) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubboRouter == 'true' +# uses: ./.github/actions/scenarios/dubbo/router +# - name: monitor test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubboMonitor == 'true' +# uses: ./.github/actions/scenarios/dubbo/monitor +# - name: visibility test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubboVisibility == 'true' +# uses: ./.github/actions/scenarios/dubbo/visibility +# - name: (dubbo common) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubboCommon == 'true' +# uses: ./.github/actions/scenarios/dubbo/dubbo-common +# - name: (dubbo lane) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubboLane == 'true' +# uses: ./.github/actions/scenarios/dubbo/lane +# - name: removal test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubboRemoval == 'true' +# uses: ./.github/actions/scenarios/dubbo/removal +# test-for-dubbo3: +# name: Test for dubbo3.x +# if: needs.set-execution-conditions.outputs.enableDubbo3Router == 'true' || needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true' +# runs-on: ubuntu-latest +# needs: [set-execution-conditions, download-midwares-and-cache, build-agent-and-cache ] +# strategy: +# matrix: +# registry-model: [ 'all','interface','instance' ] +# dubbo-version: [ '3-0','3-1','3-2' ] +# dubbo-versions: [ '0','3','6','9','12' ] +# include: +# - dubbo-version: '3-0' +# dubbo-versions: '15' +# registry-model: 'all' +# - dubbo-version: '3-0' +# dubbo-versions: '15' +# registry-model: 'interface' +# - dubbo-version: '3-0' +# dubbo-versions: '15' +# registry-model: 'instance' +# - dubbo-version: '3-1' +# dubbo-versions: '11' +# registry-model: 'all' +# - dubbo-version: '3-1' +# dubbo-versions: '11' +# registry-model: 'interface' +# - dubbo-version: '3-1' +# dubbo-versions: '11' +# registry-model: 'instance' +# - dubbo-version: '3-2' +# dubbo-versions: '11' +# registry-model: 'all' +# - dubbo-version: '3-2' +# dubbo-versions: '11' +# registry-model: 'interface' +# - dubbo-version: '3-2' +# dubbo-versions: '11' +# registry-model: 'instance' +# exclude: +# - dubbo-version: '3-0' +# dubbo-versions: '0' +# registry-model: 'all' +# - dubbo-version: '3-0' +# dubbo-versions: '0' +# registry-model: 'interface' +# - dubbo-version: '3-0' +# dubbo-versions: '0' +# registry-model: 'instance' +# - dubbo-version: '3-0' +# dubbo-versions: '3' +# registry-model: 'all' +# - dubbo-version: '3-0' +# dubbo-versions: '3' +# registry-model: 'interface' +# - dubbo-version: '3-0' +# dubbo-versions: '3' +# registry-model: 'instance' +# - dubbo-version: '3-1' +# dubbo-versions: '12' +# registry-model: 'all' +# - dubbo-version: '3-1' +# dubbo-versions: '12' +# registry-model: 'interface' +# - dubbo-version: '3-1' +# dubbo-versions: '12' +# registry-model: 'instance' +# - dubbo-version: '3-2' +# dubbo-versions: '12' +# registry-model: 'all' +# - dubbo-version: '3-2' +# dubbo-versions: '12' +# registry-model: 'interface' +# - dubbo-version: '3-2' +# dubbo-versions: '12' +# registry-model: 'instance' +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/dubbo +# - name: (dubbo3.x router) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubbo3Router == 'true' +# uses: ./.github/actions/scenarios/dubbo/router-dubbo3 +# - name: (dubbo3.x lane) test for ${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }} +# if: needs.set-execution-conditions.outputs.enableDubbo3Lane == 'true' +# uses: ./.github/actions/scenarios/dubbo/lane-dubbo3 \ No newline at end of file diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 098334de19..214dd1bf2d 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -1,33 +1,33 @@ -name: FOSSA analysis -on: - push: - branches: - - '*' - paths-ignore: - - '**.md' - - '**/NOTICE' - - '**/LICENSE' - pull_request: - branches: - - 'develop' - paths-ignore: - - '**.md' - - '**/NOTICE' - - '**/LICENSE' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: run FOSSA analysis - uses: fossas/fossa-action@main - with: - # FOSSA Push-Only API Token - api-key: '91dd4c4fcf9069d8463c1f00c6664724' - - name: run FOSSA test - uses: fossas/fossa-action@main - with: - # FOSSA Push-Only API Token - api-key: '91dd4c4fcf9069d8463c1f00c6664724' - run-tests: true \ No newline at end of file +#name: FOSSA analysis +#on: +# push: +# branches: +# - '*' +# paths-ignore: +# - '**.md' +# - '**/NOTICE' +# - '**/LICENSE' +# pull_request: +# branches: +# - 'develop' +# paths-ignore: +# - '**.md' +# - '**/NOTICE' +# - '**/LICENSE' +# +#jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: run FOSSA analysis +# uses: fossas/fossa-action@main +# with: +# # FOSSA Push-Only API Token +# api-key: '91dd4c4fcf9069d8463c1f00c6664724' +# - name: run FOSSA test +# uses: fossas/fossa-action@main +# with: +# # FOSSA Push-Only API Token +# api-key: '91dd4c4fcf9069d8463c1f00c6664724' +# run-tests: true \ No newline at end of file diff --git a/.github/workflows/generate_release_note.yml b/.github/workflows/generate_release_note.yml index 6552f4f951..3bd6c8b5af 100644 --- a/.github/workflows/generate_release_note.yml +++ b/.github/workflows/generate_release_note.yml @@ -1,101 +1,101 @@ -name: Generate Release Note - -on: - workflow_dispatch: - inputs: - version: - description: 'Version number to be generate release note this time' - required: true - -env: - version: ${{ inputs.version }} - - -jobs: - generate-release-notes: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Get Milestone Bug Issues - id: milestone-bug-issues - run: | - curl -sSL \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=kind/bug" \ - > milestone-bug-issues.json - - name: Get Milestone Feature Issues - id: milestone-feature-issues - run: | - curl -sSL \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=kind/feature" \ - > milestone-feature-issues.json - - name: Get Milestone Enhancement Issues - id: milestone-enhancement-issues - run: | - curl -sSL \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=kind/enhancement" \ - > milestone-enhancement-issues.json - - name: Get Milestone Doc Issues - id: milestone-doc-issues - run: | - curl -sSL \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=area/docs" \ - > milestone-doc-issues.json - - name: Generate Release Notes - id: generate-release-notes - run: | - release_notes=""; - milestone_feature_issues=$(cat milestone-feature-issues.json) - if [[ $(echo "${milestone_feature_issues}" | jq '. | length') -eq 0 ]]; then - echo "No issues labeled as kind/feature" - else - release_notes="## ⭐ Feature\n" - for issue in $(echo "${milestone_feature_issues}" | jq -r '.[] | @base64'); do - _jq() { - echo ${issue} | base64 --decode | jq -r ${1} - } - release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" - done - fi - milestone_enhancement_issues=$(cat milestone-enhancement-issues.json) - if [[ $(echo "${milestone_enhancement_issues}" | jq '. | length') -eq 0 ]]; then - echo "No issues labeled as kind/enhancement" - else - release_notes+="## 📈 Improvements\n" - for issue in $(echo "${milestone_enhancement_issues}" | jq -r '.[] | @base64'); do - _jq() { - echo ${issue} | base64 --decode | jq -r ${1} - } - release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" - done - fi - milestone_bug_issues=$(cat milestone-bug-issues.json) - if [[ $(echo "${milestone_bug_issues}" | jq '. | length') -eq 0 ]]; then - echo "No issues labeled as kind/bug" - else - release_notes+="## 🐞 Fixes\n" - for issue in $(echo "${milestone_bug_issues}" | jq -r '.[] | @base64'); do - _jq() { - echo ${issue} | base64 --decode | jq -r ${1} - } - release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" - done - fi - milestone_doc_issues=$(cat milestone-doc-issues.json) - if [[ $(echo "${milestone_doc_issues}" | jq '. | length') -eq 0 ]]; then - echo "No issues labeled as area/docs" - else - release_notes+="## 📔 Documentation\n" - for issue in $(echo "${milestone_doc_issues}" | jq -r '.[] | @base64'); do - _jq() { - echo ${issue} | base64 --decode | jq -r ${1} - } - release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" - done - fi - echo "Generated Release Notes:" - echo -e "$release_notes" \ No newline at end of file +#name: Generate Release Note +# +#on: +# workflow_dispatch: +# inputs: +# version: +# description: 'Version number to be generate release note this time' +# required: true +# +#env: +# version: ${{ inputs.version }} +# +# +#jobs: +# generate-release-notes: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v2 +# - name: Get Milestone Bug Issues +# id: milestone-bug-issues +# run: | +# curl -sSL \ +# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ +# "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=kind/bug" \ +# > milestone-bug-issues.json +# - name: Get Milestone Feature Issues +# id: milestone-feature-issues +# run: | +# curl -sSL \ +# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ +# "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=kind/feature" \ +# > milestone-feature-issues.json +# - name: Get Milestone Enhancement Issues +# id: milestone-enhancement-issues +# run: | +# curl -sSL \ +# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ +# "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=kind/enhancement" \ +# > milestone-enhancement-issues.json +# - name: Get Milestone Doc Issues +# id: milestone-doc-issues +# run: | +# curl -sSL \ +# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ +# "https://api.github.com/repos/${{ github.repository }}/issues?q=milestone=${{ env.version }}&labels=area/docs" \ +# > milestone-doc-issues.json +# - name: Generate Release Notes +# id: generate-release-notes +# run: | +# release_notes=""; +# milestone_feature_issues=$(cat milestone-feature-issues.json) +# if [[ $(echo "${milestone_feature_issues}" | jq '. | length') -eq 0 ]]; then +# echo "No issues labeled as kind/feature" +# else +# release_notes="## ⭐ Feature\n" +# for issue in $(echo "${milestone_feature_issues}" | jq -r '.[] | @base64'); do +# _jq() { +# echo ${issue} | base64 --decode | jq -r ${1} +# } +# release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" +# done +# fi +# milestone_enhancement_issues=$(cat milestone-enhancement-issues.json) +# if [[ $(echo "${milestone_enhancement_issues}" | jq '. | length') -eq 0 ]]; then +# echo "No issues labeled as kind/enhancement" +# else +# release_notes+="## 📈 Improvements\n" +# for issue in $(echo "${milestone_enhancement_issues}" | jq -r '.[] | @base64'); do +# _jq() { +# echo ${issue} | base64 --decode | jq -r ${1} +# } +# release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" +# done +# fi +# milestone_bug_issues=$(cat milestone-bug-issues.json) +# if [[ $(echo "${milestone_bug_issues}" | jq '. | length') -eq 0 ]]; then +# echo "No issues labeled as kind/bug" +# else +# release_notes+="## 🐞 Fixes\n" +# for issue in $(echo "${milestone_bug_issues}" | jq -r '.[] | @base64'); do +# _jq() { +# echo ${issue} | base64 --decode | jq -r ${1} +# } +# release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" +# done +# fi +# milestone_doc_issues=$(cat milestone-doc-issues.json) +# if [[ $(echo "${milestone_doc_issues}" | jq '. | length') -eq 0 ]]; then +# echo "No issues labeled as area/docs" +# else +# release_notes+="## 📔 Documentation\n" +# for issue in $(echo "${milestone_doc_issues}" | jq -r '.[] | @base64'); do +# _jq() { +# echo ${issue} | base64 --decode | jq -r ${1} +# } +# release_notes+="- $(_jq '.title'). Issue #$(_jq '.number')\n" +# done +# fi +# echo "Generated Release Notes:" +# echo -e "$release_notes" \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 01b26a8bc0..ed98a3e381 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,52 +1,52 @@ -name: CI - -on: - push: - pull_request: - branches: - - '*' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - - checkstyle: - name: Checkstyle - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: reviewdog/action-setup@v1 - with: - reviewdog_version: v0.18.1 - - name: download checkstyle - run: curl -o checkstyle.jar -L https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.41.1/checkstyle-8.41.1-all.jar - - name: checkstyle - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - java -jar checkstyle.jar -c checkstyle.xml -f xml . | reviewdog -f=checkstyle -name="Checkstyle Check" -reporter=github-pr-check -level=error - - build: - runs-on: windows-latest - name: build - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: Create License Binary Suffix - run: | - mvn license:aggregate-add-third-party - - name: Build with Maven - run: | - mvn clean package -P agent -P package -DskipTests - mkdir ${{ github.workspace }}/package - cp ${{ github.workspace }}/sermant-agent-*.tar ${{ github.workspace }}/package - - name: upload package - uses: actions/upload-artifact@v4 - with: - name: sermant - path: ${{ github.workspace }}/package +#name: CI +# +#on: +# push: +# pull_request: +# branches: +# - '*' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# +# checkstyle: +# name: Checkstyle +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - uses: reviewdog/action-setup@v1 +# with: +# reviewdog_version: v0.18.1 +# - name: download checkstyle +# run: curl -o checkstyle.jar -L https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.41.1/checkstyle-8.41.1-all.jar +# - name: checkstyle +# env: +# REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: | +# java -jar checkstyle.jar -c checkstyle.xml -f xml . | reviewdog -f=checkstyle -name="Checkstyle Check" -reporter=github-pr-check -level=error +# +# build: +# runs-on: windows-latest +# name: build +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: Create License Binary Suffix +# run: | +# mvn license:aggregate-add-third-party +# - name: Build with Maven +# run: | +# mvn clean package -P agent -P package -DskipTests +# mkdir ${{ github.workspace }}/package +# cp ${{ github.workspace }}/sermant-agent-*.tar ${{ github.workspace }}/package +# - name: upload package +# uses: actions/upload-artifact@v4 +# with: +# name: sermant +# path: ${{ github.workspace }}/package diff --git a/.github/workflows/mq_consume_prohibition_integration_test.yml b/.github/workflows/mq_consume_prohibition_integration_test.yml index 192b59f40d..ce863930c5 100644 --- a/.github/workflows/mq_consume_prohibition_integration_test.yml +++ b/.github/workflows/mq_consume_prohibition_integration_test.yml @@ -1,214 +1,214 @@ -name: mq-consume-prohibition integration test -env: - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/mq-consume-prohibition-test/**' - - 'sermant-plugins/sermant-mq-consume-prohibition/**' - - '.github/workflows/mq_consume_prohibition_integration_test.yml' - - '.github/actions/common/mq-consume-prohibition/**' - - '.github/actions/scenarios/mq-consume-prohibition/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableKafkaConsumeProhibitionAction=${{env.enableKafkaConsumeProhibitionAction}}" >> $GITHUB_OUTPUT - echo "enableRocketmqConsumeProhibitionAction=${{env.enableRocketmqConsumeProhibitionAction}}" >> $GITHUB_OUTPUT - outputs: - enableKafkaConsumeProhibitionAction: ${{ steps.set-outputs.outputs.enableKafkaConsumeProhibitionAction }} - enableRocketmqConsumeProhibitionAction: ${{ steps.set-outputs.outputs.enableRocketmqConsumeProhibitionAction }} - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - - name: cache rocketmq - uses: actions/cache@v3 - with: - path: rocketmq-all-5.1.4-bin-release.zip - key: ${{ runner.os }}-rocketmq-all-5.1.4-bin-release - restore-keys: | - ${{ runner.os }}-rocketmq-all-5.1.4-bin-release - - name: download rocketmq - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh rocketmq514 - - name: cache kafka - uses: actions/cache@v3 - with: - path: kafka_2.13-2.7.0.tgz - key: ${{ runner.os }}-kafka_2.13-2.7.0 - restore-keys: | - ${{ runner.os }}-kafka_2.13-2.7.0 - - name: download kafka - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh kafka - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-backend/d' pom.xml - sed -i '/sermant-integration-tests/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - test-for-mq-consume-prohibition-kafka: - name: Test for mq-consume-prohibition kafka - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableKafkaConsumeProhibitionAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - kafkaVersion: "2.0.1" - - kafkaVersion: "2.1.1" - - kafkaVersion: "2.2.2" - - kafkaVersion: "2.3.1" - - kafkaVersion: "2.4.0" - - kafkaVersion: "2.5.1" - - kafkaVersion: "2.6.3" - - kafkaVersion: "2.7.2" - - kafkaVersion: "2.8.2" - - kafkaVersion: "3.0.2" - - kafkaVersion: "3.1.2" - - kafkaVersion: "3.2.2" - - kafkaVersion: "3.3.2" - - kafkaVersion: "3.4.1" - - kafkaVersion: "3.5.2" - - kafkaVersion: "3.6.1" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/mq-consume-prohibition - - name: mq-consume-prohibition test for kafkaVersion=${{ matrix.kafkaVersion }} - uses: ./.github/actions/scenarios/mq-consume-prohibition/kafka - test-for-rocketmq-one-topic: - name: Test for rocketmq consumer with one topic - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - rocketMqVersion: "4.6.1" - - rocketMqVersion: "4.7.1" - - rocketMqVersion: "4.8.0" - - rocketMqVersion: "4.9.7" - - rocketMqVersion: "5.0.0" - - rocketMqVersion: "5.1.4" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/mq-consume-prohibition - - name: mq-consume-prohibition-rocketmq test for rocketMqVersion=${{ matrix.rocketMqVersion }} - uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-one-topic - test-for-rocketmq-two-topic: - name: Test for rocketmq consumer with two topic - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - rocketMqVersion: "4.6.1" - - rocketMqVersion: "4.7.1" - - rocketMqVersion: "4.8.0" - - rocketMqVersion: "4.9.7" - - rocketMqVersion: "5.0.0" - - rocketMqVersion: "5.1.4" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/mq-consume-prohibition - - name: mq-consume-prohibition test for rocketMqVersion=${{ matrix.rocketMqVersion }} - uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-two-topic - test-for-rocketmq-two-consumer: - name: Test for rocketmq consumer with two consumer - if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true' - runs-on: ubuntu-latest - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - rocketMqVersion: "4.6.1" - - rocketMqVersion: "4.7.1" - - rocketMqVersion: "4.8.0" - - rocketMqVersion: "4.9.7" - - rocketMqVersion: "5.0.0" - - rocketMqVersion: "5.1.4" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/mq-consume-prohibition - - name: mq-consume-prohibition test for rocketMqVersion=${{ matrix.rocketMqVersion }} - uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-two-consumer \ No newline at end of file +#name: mq-consume-prohibition integration test +#env: +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/mq-consume-prohibition-test/**' +# - 'sermant-plugins/sermant-mq-consume-prohibition/**' +# - '.github/workflows/mq_consume_prohibition_integration_test.yml' +# - '.github/actions/common/mq-consume-prohibition/**' +# - '.github/actions/scenarios/mq-consume-prohibition/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableKafkaConsumeProhibitionAction=${{env.enableKafkaConsumeProhibitionAction}}" >> $GITHUB_OUTPUT +# echo "enableRocketmqConsumeProhibitionAction=${{env.enableRocketmqConsumeProhibitionAction}}" >> $GITHUB_OUTPUT +# outputs: +# enableKafkaConsumeProhibitionAction: ${{ steps.set-outputs.outputs.enableKafkaConsumeProhibitionAction }} +# enableRocketmqConsumeProhibitionAction: ${{ steps.set-outputs.outputs.enableRocketmqConsumeProhibitionAction }} +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# - name: cache rocketmq +# uses: actions/cache@v3 +# with: +# path: rocketmq-all-5.1.4-bin-release.zip +# key: ${{ runner.os }}-rocketmq-all-5.1.4-bin-release +# restore-keys: | +# ${{ runner.os }}-rocketmq-all-5.1.4-bin-release +# - name: download rocketmq +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh rocketmq514 +# - name: cache kafka +# uses: actions/cache@v3 +# with: +# path: kafka_2.13-2.7.0.tgz +# key: ${{ runner.os }}-kafka_2.13-2.7.0 +# restore-keys: | +# ${{ runner.os }}-kafka_2.13-2.7.0 +# - name: download kafka +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh kafka +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-backend/d' pom.xml +# sed -i '/sermant-integration-tests/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# test-for-mq-consume-prohibition-kafka: +# name: Test for mq-consume-prohibition kafka +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableKafkaConsumeProhibitionAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - kafkaVersion: "2.0.1" +# - kafkaVersion: "2.1.1" +# - kafkaVersion: "2.2.2" +# - kafkaVersion: "2.3.1" +# - kafkaVersion: "2.4.0" +# - kafkaVersion: "2.5.1" +# - kafkaVersion: "2.6.3" +# - kafkaVersion: "2.7.2" +# - kafkaVersion: "2.8.2" +# - kafkaVersion: "3.0.2" +# - kafkaVersion: "3.1.2" +# - kafkaVersion: "3.2.2" +# - kafkaVersion: "3.3.2" +# - kafkaVersion: "3.4.1" +# - kafkaVersion: "3.5.2" +# - kafkaVersion: "3.6.1" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/mq-consume-prohibition +# - name: mq-consume-prohibition test for kafkaVersion=${{ matrix.kafkaVersion }} +# uses: ./.github/actions/scenarios/mq-consume-prohibition/kafka +# test-for-rocketmq-one-topic: +# name: Test for rocketmq consumer with one topic +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - rocketMqVersion: "4.6.1" +# - rocketMqVersion: "4.7.1" +# - rocketMqVersion: "4.8.0" +# - rocketMqVersion: "4.9.7" +# - rocketMqVersion: "5.0.0" +# - rocketMqVersion: "5.1.4" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/mq-consume-prohibition +# - name: mq-consume-prohibition-rocketmq test for rocketMqVersion=${{ matrix.rocketMqVersion }} +# uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-one-topic +# test-for-rocketmq-two-topic: +# name: Test for rocketmq consumer with two topic +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - rocketMqVersion: "4.6.1" +# - rocketMqVersion: "4.7.1" +# - rocketMqVersion: "4.8.0" +# - rocketMqVersion: "4.9.7" +# - rocketMqVersion: "5.0.0" +# - rocketMqVersion: "5.1.4" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/mq-consume-prohibition +# - name: mq-consume-prohibition test for rocketMqVersion=${{ matrix.rocketMqVersion }} +# uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-two-topic +# test-for-rocketmq-two-consumer: +# name: Test for rocketmq consumer with two consumer +# if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true' +# runs-on: ubuntu-latest +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - rocketMqVersion: "4.6.1" +# - rocketMqVersion: "4.7.1" +# - rocketMqVersion: "4.8.0" +# - rocketMqVersion: "4.9.7" +# - rocketMqVersion: "5.0.0" +# - rocketMqVersion: "5.1.4" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/mq-consume-prohibition +# - name: mq-consume-prohibition test for rocketMqVersion=${{ matrix.rocketMqVersion }} +# uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-two-consumer \ No newline at end of file diff --git a/.github/workflows/publish_maven_central_warehouse.yml b/.github/workflows/publish_maven_central_warehouse.yml index 415c214a49..12df5112bf 100644 --- a/.github/workflows/publish_maven_central_warehouse.yml +++ b/.github/workflows/publish_maven_central_warehouse.yml @@ -1,53 +1,53 @@ -on: - workflow_dispatch: - inputs: - version: - description: 'Version number to be released this time' - required: true - -name: publish - -env: - version: ${{ inputs.version }} - -jobs: - publish: - name: publish Maven central warehouse - runs-on: ubuntu-latest - steps: - - name: Checkout Source - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - server-id: sermant - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - name: set version - run: | - mvn versions:set -DnewVersion='${{ env.version }}' - - name: Install secret key - run: | - cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - - name: publish agentCore - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: | - cd ${{ github.workspace }}/sermant-agentcore - mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_KEY_PASSWORD }} clean deploy -P release -DskipTests - - name: install - run: | - cd ${{ github.workspace }} - mvn clean install -DskipTests - - name: publish plugin - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: | - cd ${{ github.workspace }} - mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_KEY_PASSWORD }} clean deploy -P release -DskipTests \ No newline at end of file +#on: +# workflow_dispatch: +# inputs: +# version: +# description: 'Version number to be released this time' +# required: true +# +#name: publish +# +#env: +# version: ${{ inputs.version }} +# +#jobs: +# publish: +# name: publish Maven central warehouse +# runs-on: ubuntu-latest +# steps: +# - name: Checkout Source +# uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# server-id: sermant +# server-username: MAVEN_USERNAME +# server-password: MAVEN_PASSWORD +# - name: set version +# run: | +# mvn versions:set -DnewVersion='${{ env.version }}' +# - name: Install secret key +# run: | +# cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import +# gpg --list-secret-keys --keyid-format LONG +# - name: publish agentCore +# env: +# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} +# MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} +# run: | +# cd ${{ github.workspace }}/sermant-agentcore +# mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_KEY_PASSWORD }} clean deploy -P release -DskipTests +# - name: install +# run: | +# cd ${{ github.workspace }} +# mvn clean install -DskipTests +# - name: publish plugin +# env: +# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} +# MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} +# run: | +# cd ${{ github.workspace }} +# mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_KEY_PASSWORD }} clean deploy -P release -DskipTests \ No newline at end of file diff --git a/.github/workflows/spring_integration_test_1.yml b/.github/workflows/spring_integration_test_1.yml index 3771f1d610..3874c4909b 100644 --- a/.github/workflows/spring_integration_test_1.yml +++ b/.github/workflows/spring_integration_test_1.yml @@ -1,196 +1,196 @@ -name: Spring Integration Test1 -env: - projectSpringBootVersion: 2.2.0.RELEASE - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/spring-test/**' - - 'sermant-plugins/sermant-dynamic-config/**' - - 'sermant-plugins/sermant-flowcontrol/**' - - 'sermant-plugins/sermant-monitor/**' - - 'sermant-plugins/sermant-loadbalancer/**' - - 'sermant-plugins/sermant-router/**' - - 'sermant-plugins/sermant-service-registry/**' - - 'sermant-plugins/sermant-springboot-registry/**' - - 'sermant-plugins/sermant-service-visibility/**' - - '.github/workflows/spring_integration_test_1.yml' - - '.github/actions/common/spring/action.yml' - - '.github/actions/scenarios/spring/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableGraceful=${{env.enableGraceful}}" >> $GITHUB_OUTPUT - echo "enableSpringCommon=${{env.enableSpringCommon}}" >> $GITHUB_OUTPUT - echo "enableDynamicConfig=${{env.enableDynamicConfig}}" >> $GITHUB_OUTPUT - echo "enableSpringMonitor=${{env.enableSpringMonitor}}" >> $GITHUB_OUTPUT - echo "enableSpringVisibility=${{env.enableSpringVisibility}}" >> $GITHUB_OUTPUT - echo "enableSpringRemoval=${{env.enableSpringRemoval}}" >> $GITHUB_OUTPUT - outputs: - enableGraceful: ${{ steps.set-outputs.outputs.enableGraceful }} - enableSpringCommon: ${{ steps.set-outputs.outputs.enableSpringCommon }} - enableDynamicConfig: ${{ steps.set-outputs.outputs.enableDynamicConfig }} - enableSpringMonitor: ${{ steps.set-outputs.outputs.enableSpringMonitor }} - enableSpringVisibility: ${{ steps.set-outputs.outputs.enableSpringVisibility }} - enableSpringRemoval: ${{ steps.set-outputs.outputs.enableSpringRemoval }} - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache local cse - uses: actions/cache@v3 - with: - path: Local-CSE-2.1.3-linux-amd64.zip - key: ${{ runner.os }}-local-cse - restore-keys: | - ${{ runner.os }}-local-cse - - name: download cse - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - - name: cache nacos server - uses: actions/cache@v3 - with: - path: nacos-server-1.4.2.tar.gz - key: ${{ runner.os }}-nacos-server-1.4.2 - restore-keys: | - ${{ runner.os }}-nacos-server-1.4.2 - - name: download nacos - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-integration-tests/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - test-for-spring: - name: Test for spring - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableGraceful == 'true' - || needs.set-execution-conditions.outputs.enableSpringCommon == 'true' - || needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' - || needs.set-execution-conditions.outputs.enableSpringMonitor == 'true' - || needs.set-execution-conditions.outputs.enableSpringVisibility == 'true' - || needs.set-execution-conditions.outputs.enableSpringRemoval == 'true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - springBootVersion: "1.5.0.RELEASE" - springCloudVersion: "Edgware.SR2" - nacosVersion: "1.5.0.RELEASE" - - springBootVersion: "2.0.2.RELEASE" - springCloudVersion: "Finchley.RELEASE" - httpClientVersion: "4.1.3" - nacosVersion: "2.0.0.RELEASE" - jettyClientVersion: "1.0.1" - - springBootVersion: "2.1.0.RELEASE" - springCloudVersion: "Greenwich.RELEASE" - httpClientVersion: "4.2.6" - nacosVersion: "2.1.0.RELEASE" - jettyClientVersion: "1.0.1" - - springBootVersion: "2.2.0.RELEASE" - springCloudVersion: "Hoxton.RELEASE" - httpClientVersion: "4.3.6" - nacosVersion: "2.2.0.RELEASE" - jettyClientVersion: "1.0.3" - - springBootVersion: "2.3.0.RELEASE" - springCloudVersion: "Hoxton.RELEASE" - httpClientVersion: "4.4.1" - nacosVersion: "2.2.8.RELEASE" - jettyClientVersion: "1.1.2" - - springBootVersion: "2.4.0" - springCloudVersion: "2020.0.0" - httpClientVersion: "4.5.6" - nacosVersion: "2021.0.1.0" - jettyClientVersion: "1.1.4" - - springBootVersion: "2.6.2" - springCloudVersion: "2021.0.0" - httpClientVersion: "4.5.10" - nacosVersion: "2021.1" - jettyClientVersion: "1.1.10" - - springBootVersion: "2.7.2" - springCloudVersion: "2021.0.3" - httpClientVersion: "4.5.13" - jettyClientVersion: "1.1.12" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/spring - - name: (graceful) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableGraceful == 'true' - uses: ./.github/actions/scenarios/spring/graceful - - name: (spring common) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringCommon == 'true' - uses: ./.github/actions/scenarios/spring/spring-common - - name: (nacos dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: ${{ matrix.nacosVersion != '' && needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' }} - uses: ./.github/actions/scenarios/spring/dynamic-config-nacos - - name: (zk dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' - uses: ./.github/actions/scenarios/spring/dynamic-config-zk - - name: monitor test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringMonitor == 'true' - uses: ./.github/actions/scenarios/spring/monitor - - name: visibility test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringVisibility == 'true' - uses: ./.github/actions/scenarios/spring/visibility - - name: removal test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringRemoval == 'true' - uses: ./.github/actions/scenarios/spring/removal +#name: Spring Integration Test1 +#env: +# projectSpringBootVersion: 2.2.0.RELEASE +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/spring-test/**' +# - 'sermant-plugins/sermant-dynamic-config/**' +# - 'sermant-plugins/sermant-flowcontrol/**' +# - 'sermant-plugins/sermant-monitor/**' +# - 'sermant-plugins/sermant-loadbalancer/**' +# - 'sermant-plugins/sermant-router/**' +# - 'sermant-plugins/sermant-service-registry/**' +# - 'sermant-plugins/sermant-springboot-registry/**' +# - 'sermant-plugins/sermant-service-visibility/**' +# - '.github/workflows/spring_integration_test_1.yml' +# - '.github/actions/common/spring/action.yml' +# - '.github/actions/scenarios/spring/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableGraceful=${{env.enableGraceful}}" >> $GITHUB_OUTPUT +# echo "enableSpringCommon=${{env.enableSpringCommon}}" >> $GITHUB_OUTPUT +# echo "enableDynamicConfig=${{env.enableDynamicConfig}}" >> $GITHUB_OUTPUT +# echo "enableSpringMonitor=${{env.enableSpringMonitor}}" >> $GITHUB_OUTPUT +# echo "enableSpringVisibility=${{env.enableSpringVisibility}}" >> $GITHUB_OUTPUT +# echo "enableSpringRemoval=${{env.enableSpringRemoval}}" >> $GITHUB_OUTPUT +# outputs: +# enableGraceful: ${{ steps.set-outputs.outputs.enableGraceful }} +# enableSpringCommon: ${{ steps.set-outputs.outputs.enableSpringCommon }} +# enableDynamicConfig: ${{ steps.set-outputs.outputs.enableDynamicConfig }} +# enableSpringMonitor: ${{ steps.set-outputs.outputs.enableSpringMonitor }} +# enableSpringVisibility: ${{ steps.set-outputs.outputs.enableSpringVisibility }} +# enableSpringRemoval: ${{ steps.set-outputs.outputs.enableSpringRemoval }} +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache local cse +# uses: actions/cache@v3 +# with: +# path: Local-CSE-2.1.3-linux-amd64.zip +# key: ${{ runner.os }}-local-cse +# restore-keys: | +# ${{ runner.os }}-local-cse +# - name: download cse +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# - name: cache nacos server +# uses: actions/cache@v3 +# with: +# path: nacos-server-1.4.2.tar.gz +# key: ${{ runner.os }}-nacos-server-1.4.2 +# restore-keys: | +# ${{ runner.os }}-nacos-server-1.4.2 +# - name: download nacos +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-integration-tests/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# test-for-spring: +# name: Test for spring +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableGraceful == 'true' +# || needs.set-execution-conditions.outputs.enableSpringCommon == 'true' +# || needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' +# || needs.set-execution-conditions.outputs.enableSpringMonitor == 'true' +# || needs.set-execution-conditions.outputs.enableSpringVisibility == 'true' +# || needs.set-execution-conditions.outputs.enableSpringRemoval == 'true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - springBootVersion: "1.5.0.RELEASE" +# springCloudVersion: "Edgware.SR2" +# nacosVersion: "1.5.0.RELEASE" +# - springBootVersion: "2.0.2.RELEASE" +# springCloudVersion: "Finchley.RELEASE" +# httpClientVersion: "4.1.3" +# nacosVersion: "2.0.0.RELEASE" +# jettyClientVersion: "1.0.1" +# - springBootVersion: "2.1.0.RELEASE" +# springCloudVersion: "Greenwich.RELEASE" +# httpClientVersion: "4.2.6" +# nacosVersion: "2.1.0.RELEASE" +# jettyClientVersion: "1.0.1" +# - springBootVersion: "2.2.0.RELEASE" +# springCloudVersion: "Hoxton.RELEASE" +# httpClientVersion: "4.3.6" +# nacosVersion: "2.2.0.RELEASE" +# jettyClientVersion: "1.0.3" +# - springBootVersion: "2.3.0.RELEASE" +# springCloudVersion: "Hoxton.RELEASE" +# httpClientVersion: "4.4.1" +# nacosVersion: "2.2.8.RELEASE" +# jettyClientVersion: "1.1.2" +# - springBootVersion: "2.4.0" +# springCloudVersion: "2020.0.0" +# httpClientVersion: "4.5.6" +# nacosVersion: "2021.0.1.0" +# jettyClientVersion: "1.1.4" +# - springBootVersion: "2.6.2" +# springCloudVersion: "2021.0.0" +# httpClientVersion: "4.5.10" +# nacosVersion: "2021.1" +# jettyClientVersion: "1.1.10" +# - springBootVersion: "2.7.2" +# springCloudVersion: "2021.0.3" +# httpClientVersion: "4.5.13" +# jettyClientVersion: "1.1.12" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/spring +# - name: (graceful) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableGraceful == 'true' +# uses: ./.github/actions/scenarios/spring/graceful +# - name: (spring common) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringCommon == 'true' +# uses: ./.github/actions/scenarios/spring/spring-common +# - name: (nacos dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: ${{ matrix.nacosVersion != '' && needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' }} +# uses: ./.github/actions/scenarios/spring/dynamic-config-nacos +# - name: (zk dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' +# uses: ./.github/actions/scenarios/spring/dynamic-config-zk +# - name: monitor test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringMonitor == 'true' +# uses: ./.github/actions/scenarios/spring/monitor +# - name: visibility test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringVisibility == 'true' +# uses: ./.github/actions/scenarios/spring/visibility +# - name: removal test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringRemoval == 'true' +# uses: ./.github/actions/scenarios/spring/removal diff --git a/.github/workflows/spring_integration_test_2.yml b/.github/workflows/spring_integration_test_2.yml index 14a788af32..56ef0ebbe4 100644 --- a/.github/workflows/spring_integration_test_2.yml +++ b/.github/workflows/spring_integration_test_2.yml @@ -1,167 +1,167 @@ -name: Spring Integration Test2 -env: - projectSpringBootVersion: 2.2.0.RELEASE - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/spring-test/**' - - 'sermant-plugins/sermant-router/**' - - 'sermant-plugins/sermant-service-registry/**' - - 'sermant-plugins/sermant-springboot-registry/**' - - '.github/workflows/spring_integration_test_2.yml' - - '.github/actions/common/spring/action.yml' - - '.github/actions/scenarios/spring/router/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableSpringRouter=${{env.enableSpringRouter}}" >> $GITHUB_OUTPUT - echo "enableSpringTagRouter=${{env.enableSpringTagRouter}}" >> $GITHUB_OUTPUT - echo "enableSpringLane=${{env.enableSpringLane}}" >> $GITHUB_OUTPUT - outputs: - enableSpringRouter: ${{ steps.set-outputs.outputs.enableSpringRouter }} - enableSpringTagRouter: ${{ steps.set-outputs.outputs.enableSpringTagRouter }} - enableSpringLane: ${{ steps.set-outputs.outputs.enableSpringLane }} - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache local cse - uses: actions/cache@v3 - with: - path: Local-CSE-2.1.3-linux-amd64.zip - key: ${{ runner.os }}-local-cse - restore-keys: | - ${{ runner.os }}-local-cse - - name: download cse - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - - name: cache nacos server - uses: actions/cache@v3 - with: - path: nacos-server-1.4.2.tar.gz - key: ${{ runner.os }}-nacos-server-1.4.2 - restore-keys: | - ${{ runner.os }}-nacos-server-1.4.2 - - name: download nacos - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-backend/d' pom.xml - sed -i '/sermant-integration-tests/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - mvn package -DskipTests -Ptest --file pom.xml - test-for-spring: - name: Test for spring - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableSpringRouter == 'true' - || needs.set-execution-conditions.outputs.enableSpringTagRouter == 'true' - || needs.set-execution-conditions.outputs.enableSpringLane == 'true' - needs: [ set-execution-conditions, build-agent-and-cache, download-midwares-and-cache ] - strategy: - matrix: - include: - - springBootVersion: "1.5.0.RELEASE" - springCloudVersion: "Edgware.SR2" - nacosVersion: "1.5.0.RELEASE" - - springBootVersion: "2.0.2.RELEASE" - springCloudVersion: "Finchley.RELEASE" - httpClientVersion: "4.1.3" - nacosVersion: "2.0.0.RELEASE" - - springBootVersion: "2.1.0.RELEASE" - springCloudVersion: "Greenwich.RELEASE" - httpClientVersion: "4.2.6" - nacosVersion: "2.1.0.RELEASE" - - springBootVersion: "2.2.0.RELEASE" - springCloudVersion: "Hoxton.RELEASE" - httpClientVersion: "4.3.6" - nacosVersion: "2.2.0.RELEASE" - - springBootVersion: "2.3.0.RELEASE" - springCloudVersion: "Hoxton.RELEASE" - httpClientVersion: "4.4.1" - nacosVersion: "2.2.8.RELEASE" - - springBootVersion: "2.4.0" - springCloudVersion: "2020.0.0" - httpClientVersion: "4.5.6" - nacosVersion: "2021.0.1.0" - - springBootVersion: "2.6.2" - springCloudVersion: "2021.0.0" - httpClientVersion: "4.5.10" - nacosVersion: "2021.1" - - springBootVersion: "2.7.2" - springCloudVersion: "2021.0.3" - httpClientVersion: "4.5.13" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/spring - - name: (spring router) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringRouter == 'true' - uses: ./.github/actions/scenarios/spring/router/spring-router - - name: (spring tag router) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringTagRouter == 'true' - uses: ./.github/actions/scenarios/spring/router/spring-tag-router - - name: (spring tag az router) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringTagRouter == 'true' - uses: ./.github/actions/scenarios/spring/router/spring-tag-az-router - - name: (spring lane) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringLane == 'true' - uses: ./.github/actions/scenarios/spring/lane +#name: Spring Integration Test2 +#env: +# projectSpringBootVersion: 2.2.0.RELEASE +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/spring-test/**' +# - 'sermant-plugins/sermant-router/**' +# - 'sermant-plugins/sermant-service-registry/**' +# - 'sermant-plugins/sermant-springboot-registry/**' +# - '.github/workflows/spring_integration_test_2.yml' +# - '.github/actions/common/spring/action.yml' +# - '.github/actions/scenarios/spring/router/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableSpringRouter=${{env.enableSpringRouter}}" >> $GITHUB_OUTPUT +# echo "enableSpringTagRouter=${{env.enableSpringTagRouter}}" >> $GITHUB_OUTPUT +# echo "enableSpringLane=${{env.enableSpringLane}}" >> $GITHUB_OUTPUT +# outputs: +# enableSpringRouter: ${{ steps.set-outputs.outputs.enableSpringRouter }} +# enableSpringTagRouter: ${{ steps.set-outputs.outputs.enableSpringTagRouter }} +# enableSpringLane: ${{ steps.set-outputs.outputs.enableSpringLane }} +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache local cse +# uses: actions/cache@v3 +# with: +# path: Local-CSE-2.1.3-linux-amd64.zip +# key: ${{ runner.os }}-local-cse +# restore-keys: | +# ${{ runner.os }}-local-cse +# - name: download cse +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# - name: cache nacos server +# uses: actions/cache@v3 +# with: +# path: nacos-server-1.4.2.tar.gz +# key: ${{ runner.os }}-nacos-server-1.4.2 +# restore-keys: | +# ${{ runner.os }}-nacos-server-1.4.2 +# - name: download nacos +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-backend/d' pom.xml +# sed -i '/sermant-integration-tests/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# test-for-spring: +# name: Test for spring +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableSpringRouter == 'true' +# || needs.set-execution-conditions.outputs.enableSpringTagRouter == 'true' +# || needs.set-execution-conditions.outputs.enableSpringLane == 'true' +# needs: [ set-execution-conditions, build-agent-and-cache, download-midwares-and-cache ] +# strategy: +# matrix: +# include: +# - springBootVersion: "1.5.0.RELEASE" +# springCloudVersion: "Edgware.SR2" +# nacosVersion: "1.5.0.RELEASE" +# - springBootVersion: "2.0.2.RELEASE" +# springCloudVersion: "Finchley.RELEASE" +# httpClientVersion: "4.1.3" +# nacosVersion: "2.0.0.RELEASE" +# - springBootVersion: "2.1.0.RELEASE" +# springCloudVersion: "Greenwich.RELEASE" +# httpClientVersion: "4.2.6" +# nacosVersion: "2.1.0.RELEASE" +# - springBootVersion: "2.2.0.RELEASE" +# springCloudVersion: "Hoxton.RELEASE" +# httpClientVersion: "4.3.6" +# nacosVersion: "2.2.0.RELEASE" +# - springBootVersion: "2.3.0.RELEASE" +# springCloudVersion: "Hoxton.RELEASE" +# httpClientVersion: "4.4.1" +# nacosVersion: "2.2.8.RELEASE" +# - springBootVersion: "2.4.0" +# springCloudVersion: "2020.0.0" +# httpClientVersion: "4.5.6" +# nacosVersion: "2021.0.1.0" +# - springBootVersion: "2.6.2" +# springCloudVersion: "2021.0.0" +# httpClientVersion: "4.5.10" +# nacosVersion: "2021.1" +# - springBootVersion: "2.7.2" +# springCloudVersion: "2021.0.3" +# httpClientVersion: "4.5.13" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/spring +# - name: (spring router) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringRouter == 'true' +# uses: ./.github/actions/scenarios/spring/router/spring-router +# - name: (spring tag router) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringTagRouter == 'true' +# uses: ./.github/actions/scenarios/spring/router/spring-tag-router +# - name: (spring tag az router) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringTagRouter == 'true' +# uses: ./.github/actions/scenarios/spring/router/spring-tag-az-router +# - name: (spring lane) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringLane == 'true' +# uses: ./.github/actions/scenarios/spring/lane diff --git a/.github/workflows/tagtransmission_integration_test.yml b/.github/workflows/tagtransmission_integration_test.yml index 2121f11456..8ea8b888bf 100644 --- a/.github/workflows/tagtransmission_integration_test.yml +++ b/.github/workflows/tagtransmission_integration_test.yml @@ -1,491 +1,491 @@ -name: Tagtransmission integration test -env: - sermantVersion: 1.0.0 -on: - push: - pull_request: - branches: - - '*' - paths: - - 'sermant-agentcore/**' - - 'sermant-integration-tests/tag-transmission-test/**' - - 'sermant-plugins/sermant-tag-transmission/**' - - '.github/workflows/tagtransmission_integration_test.yml' - - '.github/actions/common/tag-transmission/**' - - '.github/actions/scenarios/tag-transmission/**' - - '.github/actions/common/plugin-change-check/action.yml' - - '.github/actions/common/entry/action.yml' - - '.github/actions/common/exit/action.yml' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} - cancel-in-progress: true -jobs: - set-execution-conditions: - name: set-execution-conditions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: plugin-change-check - id: plugin-change-check - uses: ./.github/actions/common/plugin-change-check - - name: set-outputs - id: set-outputs - run: | - echo "enableHttpclientV3TagTransmissionAction=${{env.enableHttpclientV3TagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableHttpclientV4TagTransmissionAction=${{env.enableHttpclientV4TagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableOkhttpTagTransmissionAction=${{env.enableOkhttpTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableGrpcTagTransmissionAction=${{env.enableGrpcTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableSofarpcTagTransmissionAction=${{env.enableSofarpcTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableServicecombTagTransmissionAction=${{env.enableServicecombTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableAlibabaDubboTagTransmissionAction=${{env.enableAlibabaDubboTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableApacheDubboTagTransmissionAction=${{env.enableApacheDubboTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableCrossthreadTagTransmissionAction=${{env.enableCrossthreadTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableConfigTagTransmissionAction=${{env.enableConfigTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableKafkaTagTransmissionAction=${{env.enableKafkaTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableRocketmqTagTransmissionAction=${{env.enableRocketmqTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableJettyTagTransmissionAction=${{env.enableJettyTagTransmissionAction}}" >> $GITHUB_OUTPUT - echo "enableTomcatTagTransmissionAction=${{env.enableTomcatTagTransmissionAction}}" >> $GITHUB_OUTPUT - outputs: - enableHttpclientV3TagTransmissionAction: ${{ steps.set-outputs.outputs.enableHttpclientV3TagTransmissionAction }} - enableHttpclientV4TagTransmissionAction: ${{ steps.set-outputs.outputs.enableHttpclientV4TagTransmissionAction }} - enableOkhttpTagTransmissionAction: ${{ steps.set-outputs.outputs.enableOkhttpTagTransmissionAction }} - enableGrpcTagTransmissionAction: ${{ steps.set-outputs.outputs.enableGrpcTagTransmissionAction }} - enableSofarpcTagTransmissionAction: ${{ steps.set-outputs.outputs.enableSofarpcTagTransmissionAction }} - enableServicecombTagTransmissionAction: ${{ steps.set-outputs.outputs.enableServicecombTagTransmissionAction }} - enableAlibabaDubboTagTransmissionAction: ${{ steps.set-outputs.outputs.enableAlibabaDubboTagTransmissionAction }} - enableApacheDubboTagTransmissionAction: ${{ steps.set-outputs.outputs.enableApacheDubboTagTransmissionAction }} - enableCrossthreadTagTransmissionAction: ${{ steps.set-outputs.outputs.enableCrossthreadTagTransmissionAction }} - enableConfigTagTransmissionAction: ${{ steps.set-outputs.outputs.enableConfigTagTransmissionAction }} - enableKafkaTagTransmissionAction: ${{ steps.set-outputs.outputs.enableKafkaTagTransmissionAction }} - enableRocketmqTagTransmissionAction: ${{ steps.set-outputs.outputs.enableRocketmqTagTransmissionAction }} - enableJettyTagTransmissionAction: ${{ steps.set-outputs.outputs.enableJettyTagTransmissionAction }} - enableTomcatTagTransmissionAction: ${{ steps.set-outputs.outputs.enableTomcatTagTransmissionAction }} - download-midwares-and-cache: - name: download midwares and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache local cse - uses: actions/cache@v3 - with: - path: Local-CSE-2.1.3-linux-amd64.zip - key: ${{ runner.os }}-local-cse - restore-keys: | - ${{ runner.os }}-local-cse - - name: download cse - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse - - name: cache zookeeper - uses: actions/cache@v3 - with: - path: apache-zookeeper-3.6.3-bin.tar.gz - key: ${{ runner.os }}-apache-zookeeper-3.6.3 - restore-keys: | - ${{ runner.os }}-apache-zookeeper-3.6.3 - - name: download zookeeper - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk - - name: cache nacos server - uses: actions/cache@v3 - with: - path: nacos-server-1.4.2.tar.gz - key: ${{ runner.os }}-nacos-server-1.4.2 - restore-keys: | - ${{ runner.os }}-nacos-server-1.4.2 - - name: download nacos - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos - - name: cache rocketmq - uses: actions/cache@v3 - with: - path: rocketmq-all-4.8.0-bin-release.zip - key: ${{ runner.os }}-rocketmq-all-4.8.0-bin-release - restore-keys: | - ${{ runner.os }}-rocketmq-all-4.8.0-bin-release - - name: download rocketmq - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh rocketmq - - name: cache kafka - uses: actions/cache@v3 - with: - path: kafka_2.13-2.7.0.tgz - key: ${{ runner.os }}-kafka_2.13-2.7.0 - restore-keys: | - ${{ runner.os }}-kafka_2.13-2.7.0 - - name: download kafka - run: | - export ROOT_PATH=$(pwd) - bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh kafka - build-agent-and-cache: - name: build agent and cache - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: cache agent - uses: actions/cache@v3 - with: - path: sermant-agent-*/ - key: ${{ runner.os }}-agent-${{ github.run_id }} - - name: package agent - run: | - sed -i '/sermant-backend/d' pom.xml - sed -i '/sermant-integration-tests/d' pom.xml - sed -i '/sermant-injector/d' pom.xml - sed -i '/sermant-flowcontrol/d' sermant-plugins/pom.xml - mvn package -DskipTests -Ptest --file pom.xml - test-for-tag-transmission-httpclientv3: - name: Test for tag transmission httpclientv3 - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableHttpclientV3TagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - httpClientVersion: "3.0.1" - - httpClientVersion: "3.1" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for httpClientVersion=${{ matrix.httpClientVersion }} - uses: ./.github/actions/scenarios/tag-transmission/httpclientv3 - test-for-tag-transmission-httpclientv4: - name: Test for tag transmission httpclientv4 - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableHttpclientV4TagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - httpClientVersion: "4.3.6" - - httpClientVersion: "4.4.1" - - httpClientVersion: "4.5.14" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for httpClientVersion=${{ matrix.httpClientVersion }} - uses: ./.github/actions/scenarios/tag-transmission/httpclientv4 - test-for-tag-transmission-okhttp: - name: Test for tag transmission okhttp - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableOkhttpTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - okHttpVersion: "2.0.0" - - okHttpVersion: "2.1.0" - - okHttpVersion: "2.2.0" - - okHttpVersion: "2.3.0" - - okHttpVersion: "2.4.0" - - okHttpVersion: "2.5.0" - - okHttpVersion: "2.6.0" - - okHttpVersion: "2.7.5" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for okHttpVersion=${{ matrix.okHttpVersion }} - uses: ./.github/actions/scenarios/tag-transmission/okhttp - test-for-tag-transmission-grpc: - name: Test for tag transmission grpc - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableGrpcTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - grpcVersion: "1.13.1" - - grpcVersion: "1.21.0" - - grpcVersion: "1.26.0" - - grpcVersion: "1.31.0" - - grpcVersion: "1.37.0" - - grpcVersion: "1.42.2" - - grpcVersion: "1.49.0" - - grpcVersion: "1.52.1" - - grpcVersion: "1.58.0" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for grpcVersion=${{ matrix.grpcVersion }} - uses: ./.github/actions/scenarios/tag-transmission/grpc - test-for-tag-transmission-sofarpc: - name: Test for tag transmission sofarpc - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableSofarpcTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - sofaRpcVersion: "5.3.4" - - sofaRpcVersion: "5.4.8" - - sofaRpcVersion: "5.5.9" - - sofaRpcVersion: "5.6.5" - - sofaRpcVersion: "5.7.10" - - sofaRpcVersion: "5.8.8" - - sofaRpcVersion: "5.9.2" - - sofaRpcVersion: "5.10.0" - - sofaRpcVersion: "5.11.1" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for sofaRpcVersion=${{ matrix.sofaRpcVersion }} - uses: ./.github/actions/scenarios/tag-transmission/sofarpc - test-for-tag-transmission-servicecomb: - name: Test for tag transmission servicecomb - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableServicecombTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - serviceCombVersion: "2.1.6" - - serviceCombVersion: "2.2.4" - - serviceCombVersion: "2.3.6" - - serviceCombVersion: "2.5.3" - - serviceCombVersion: "2.6.3" - - serviceCombVersion: "2.7.10" - - serviceCombVersion: "2.8.12" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for servicecombVersion=${{ matrix.serviceCombVersion }} - uses: ./.github/actions/scenarios/tag-transmission/servicecomb - test-for-tag-transmission-alibabadubbo: - name: Test for tag transmission alibabadubbo - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableAlibabaDubboTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - alibabaDubboVersion: "2.6.0" - - alibabaDubboVersion: "2.6.3" - - alibabaDubboVersion: "2.6.6" - - alibabaDubboVersion: "2.6.9" - - alibabaDubboVersion: "2.6.12" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for alibabaDubboVersion=${{ matrix.alibabaDubboVersion }} - uses: ./.github/actions/scenarios/tag-transmission/alibaba-dubbo - test-for-tag-transmission-apachedubbo: - name: Test for tag transmission apachedubbo - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableApacheDubboTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - apacheDubboVersion: "2.7.5" - - apacheDubboVersion: "2.7.15" - - apacheDubboVersion: "2.7.23" - - apacheDubboVersion: "3.0.15" - - apacheDubboVersion: "3.1.11" - - apacheDubboVersion: "3.2.7" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for apacheDubboVersion=${{ matrix.apacheDubboVersion}} - uses: ./.github/actions/scenarios/tag-transmission/apache-dubbo - test-for-tag-transmission-crossthread: - name: Test for tag transmission crossthread - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableCrossthreadTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for crossthread - uses: ./.github/actions/scenarios/tag-transmission/crossthread - test-for-tag-transmission-config: - name: Test for tag transmission config - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableConfigTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for config - uses: ./.github/actions/scenarios/tag-transmission/config - test-for-tag-transmission-kafka: - name: Test for tag transmission kafka - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableKafkaTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - kafkaVersion: "2.3.1" - - kafkaVersion: "1.1.1" - - kafkaVersion: "2.7.2" - - kafkaVersion: "3.4.0" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for kafkaVersion=${{ matrix.kafkaVersion }} - uses: ./.github/actions/scenarios/tag-transmission/kafka - test-for-tag-transmission-rocketmq: - name: Test for tag transmission rocketmq - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableRocketmqTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - rocketMqVersion: "4.9.7" - - rocketMqVersion: "5.0.0" - - rocketMqVersion: "5.1.4" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for rocketMqVersion=${{ matrix.rocketMqVersion }} - uses: ./.github/actions/scenarios/tag-transmission/rocketmq - test-for-tag-transmission-jdkhttp-jetty: - name: Test for tag transmission jdkhttp and jetty - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableJettyTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - springBootVersion: "1.0.2.RELEASE" - - springBootVersion: "1.1.12.RELEASE" - - springBootVersion: "1.3.8.RELEASE" - - springBootVersion: "1.4.7.RELEASE" - - springBootVersion: "1.5.22.RELEASE" - - springBootVersion: "2.2.0.RELEASE" - - springBootVersion: "2.4.13" - - springBootVersion: "2.7.16" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for springBootVersion=${{ matrix.springBootVersion }} - uses: ./.github/actions/scenarios/tag-transmission/jdkhttp-jetty - test-for-tag-transmission-jdkhttp-tomcat: - name: Test for tag transmission jdkhttp and tomcat - runs-on: ubuntu-latest - if: needs.set-execution-conditions.outputs.enableTomcatTagTransmissionAction=='true' - needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] - strategy: - matrix: - include: - - springBootVersion: "1.0.2.RELEASE" - - springBootVersion: "1.1.12.RELEASE" - - springBootVersion: "1.3.8.RELEASE" - - springBootVersion: "1.4.7.RELEASE" - - springBootVersion: "1.5.22.RELEASE" - - springBootVersion: "2.2.0.RELEASE" - - springBootVersion: "2.4.13" - - springBootVersion: "2.7.16" - fail-fast: false - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 100 - - name: set java version to environment - run: | - echo "javaVersion=8" >> $GITHUB_ENV - - name: common operations - uses: ./.github/actions/common/tag-transmission - - name: tag transmission test for springBootVersion=${{ matrix.springBootVersion }} - uses: ./.github/actions/scenarios/tag-transmission/jdkhttp-tomcat \ No newline at end of file +#name: Tagtransmission integration test +#env: +# sermantVersion: 1.0.0 +#on: +# push: +# pull_request: +# branches: +# - '*' +# paths: +# - 'sermant-agentcore/**' +# - 'sermant-integration-tests/tag-transmission-test/**' +# - 'sermant-plugins/sermant-tag-transmission/**' +# - '.github/workflows/tagtransmission_integration_test.yml' +# - '.github/actions/common/tag-transmission/**' +# - '.github/actions/scenarios/tag-transmission/**' +# - '.github/actions/common/plugin-change-check/action.yml' +# - '.github/actions/common/entry/action.yml' +# - '.github/actions/common/exit/action.yml' +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }} +# cancel-in-progress: true +#jobs: +# set-execution-conditions: +# name: set-execution-conditions +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: plugin-change-check +# id: plugin-change-check +# uses: ./.github/actions/common/plugin-change-check +# - name: set-outputs +# id: set-outputs +# run: | +# echo "enableHttpclientV3TagTransmissionAction=${{env.enableHttpclientV3TagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableHttpclientV4TagTransmissionAction=${{env.enableHttpclientV4TagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableOkhttpTagTransmissionAction=${{env.enableOkhttpTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableGrpcTagTransmissionAction=${{env.enableGrpcTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableSofarpcTagTransmissionAction=${{env.enableSofarpcTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableServicecombTagTransmissionAction=${{env.enableServicecombTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableAlibabaDubboTagTransmissionAction=${{env.enableAlibabaDubboTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableApacheDubboTagTransmissionAction=${{env.enableApacheDubboTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableCrossthreadTagTransmissionAction=${{env.enableCrossthreadTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableConfigTagTransmissionAction=${{env.enableConfigTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableKafkaTagTransmissionAction=${{env.enableKafkaTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableRocketmqTagTransmissionAction=${{env.enableRocketmqTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableJettyTagTransmissionAction=${{env.enableJettyTagTransmissionAction}}" >> $GITHUB_OUTPUT +# echo "enableTomcatTagTransmissionAction=${{env.enableTomcatTagTransmissionAction}}" >> $GITHUB_OUTPUT +# outputs: +# enableHttpclientV3TagTransmissionAction: ${{ steps.set-outputs.outputs.enableHttpclientV3TagTransmissionAction }} +# enableHttpclientV4TagTransmissionAction: ${{ steps.set-outputs.outputs.enableHttpclientV4TagTransmissionAction }} +# enableOkhttpTagTransmissionAction: ${{ steps.set-outputs.outputs.enableOkhttpTagTransmissionAction }} +# enableGrpcTagTransmissionAction: ${{ steps.set-outputs.outputs.enableGrpcTagTransmissionAction }} +# enableSofarpcTagTransmissionAction: ${{ steps.set-outputs.outputs.enableSofarpcTagTransmissionAction }} +# enableServicecombTagTransmissionAction: ${{ steps.set-outputs.outputs.enableServicecombTagTransmissionAction }} +# enableAlibabaDubboTagTransmissionAction: ${{ steps.set-outputs.outputs.enableAlibabaDubboTagTransmissionAction }} +# enableApacheDubboTagTransmissionAction: ${{ steps.set-outputs.outputs.enableApacheDubboTagTransmissionAction }} +# enableCrossthreadTagTransmissionAction: ${{ steps.set-outputs.outputs.enableCrossthreadTagTransmissionAction }} +# enableConfigTagTransmissionAction: ${{ steps.set-outputs.outputs.enableConfigTagTransmissionAction }} +# enableKafkaTagTransmissionAction: ${{ steps.set-outputs.outputs.enableKafkaTagTransmissionAction }} +# enableRocketmqTagTransmissionAction: ${{ steps.set-outputs.outputs.enableRocketmqTagTransmissionAction }} +# enableJettyTagTransmissionAction: ${{ steps.set-outputs.outputs.enableJettyTagTransmissionAction }} +# enableTomcatTagTransmissionAction: ${{ steps.set-outputs.outputs.enableTomcatTagTransmissionAction }} +# download-midwares-and-cache: +# name: download midwares and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: cache local cse +# uses: actions/cache@v3 +# with: +# path: Local-CSE-2.1.3-linux-amd64.zip +# key: ${{ runner.os }}-local-cse +# restore-keys: | +# ${{ runner.os }}-local-cse +# - name: download cse +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse +# - name: cache zookeeper +# uses: actions/cache@v3 +# with: +# path: apache-zookeeper-3.6.3-bin.tar.gz +# key: ${{ runner.os }}-apache-zookeeper-3.6.3 +# restore-keys: | +# ${{ runner.os }}-apache-zookeeper-3.6.3 +# - name: download zookeeper +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk +# - name: cache nacos server +# uses: actions/cache@v3 +# with: +# path: nacos-server-1.4.2.tar.gz +# key: ${{ runner.os }}-nacos-server-1.4.2 +# restore-keys: | +# ${{ runner.os }}-nacos-server-1.4.2 +# - name: download nacos +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos +# - name: cache rocketmq +# uses: actions/cache@v3 +# with: +# path: rocketmq-all-4.8.0-bin-release.zip +# key: ${{ runner.os }}-rocketmq-all-4.8.0-bin-release +# restore-keys: | +# ${{ runner.os }}-rocketmq-all-4.8.0-bin-release +# - name: download rocketmq +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh rocketmq +# - name: cache kafka +# uses: actions/cache@v3 +# with: +# path: kafka_2.13-2.7.0.tgz +# key: ${{ runner.os }}-kafka_2.13-2.7.0 +# restore-keys: | +# ${{ runner.os }}-kafka_2.13-2.7.0 +# - name: download kafka +# run: | +# export ROOT_PATH=$(pwd) +# bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh kafka +# build-agent-and-cache: +# name: build agent and cache +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - name: Set up JDK 8 +# uses: actions/setup-java@v3 +# with: +# java-version: '8' +# distribution: 'adopt' +# cache: maven +# - name: cache agent +# uses: actions/cache@v3 +# with: +# path: sermant-agent-*/ +# key: ${{ runner.os }}-agent-${{ github.run_id }} +# - name: package agent +# run: | +# sed -i '/sermant-backend/d' pom.xml +# sed -i '/sermant-integration-tests/d' pom.xml +# sed -i '/sermant-injector/d' pom.xml +# sed -i '/sermant-flowcontrol/d' sermant-plugins/pom.xml +# mvn package -DskipTests -Ptest --file pom.xml +# test-for-tag-transmission-httpclientv3: +# name: Test for tag transmission httpclientv3 +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableHttpclientV3TagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - httpClientVersion: "3.0.1" +# - httpClientVersion: "3.1" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for httpClientVersion=${{ matrix.httpClientVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/httpclientv3 +# test-for-tag-transmission-httpclientv4: +# name: Test for tag transmission httpclientv4 +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableHttpclientV4TagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - httpClientVersion: "4.3.6" +# - httpClientVersion: "4.4.1" +# - httpClientVersion: "4.5.14" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for httpClientVersion=${{ matrix.httpClientVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/httpclientv4 +# test-for-tag-transmission-okhttp: +# name: Test for tag transmission okhttp +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableOkhttpTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - okHttpVersion: "2.0.0" +# - okHttpVersion: "2.1.0" +# - okHttpVersion: "2.2.0" +# - okHttpVersion: "2.3.0" +# - okHttpVersion: "2.4.0" +# - okHttpVersion: "2.5.0" +# - okHttpVersion: "2.6.0" +# - okHttpVersion: "2.7.5" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for okHttpVersion=${{ matrix.okHttpVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/okhttp +# test-for-tag-transmission-grpc: +# name: Test for tag transmission grpc +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableGrpcTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - grpcVersion: "1.13.1" +# - grpcVersion: "1.21.0" +# - grpcVersion: "1.26.0" +# - grpcVersion: "1.31.0" +# - grpcVersion: "1.37.0" +# - grpcVersion: "1.42.2" +# - grpcVersion: "1.49.0" +# - grpcVersion: "1.52.1" +# - grpcVersion: "1.58.0" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for grpcVersion=${{ matrix.grpcVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/grpc +# test-for-tag-transmission-sofarpc: +# name: Test for tag transmission sofarpc +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableSofarpcTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - sofaRpcVersion: "5.3.4" +# - sofaRpcVersion: "5.4.8" +# - sofaRpcVersion: "5.5.9" +# - sofaRpcVersion: "5.6.5" +# - sofaRpcVersion: "5.7.10" +# - sofaRpcVersion: "5.8.8" +# - sofaRpcVersion: "5.9.2" +# - sofaRpcVersion: "5.10.0" +# - sofaRpcVersion: "5.11.1" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for sofaRpcVersion=${{ matrix.sofaRpcVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/sofarpc +# test-for-tag-transmission-servicecomb: +# name: Test for tag transmission servicecomb +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableServicecombTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - serviceCombVersion: "2.1.6" +# - serviceCombVersion: "2.2.4" +# - serviceCombVersion: "2.3.6" +# - serviceCombVersion: "2.5.3" +# - serviceCombVersion: "2.6.3" +# - serviceCombVersion: "2.7.10" +# - serviceCombVersion: "2.8.12" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for servicecombVersion=${{ matrix.serviceCombVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/servicecomb +# test-for-tag-transmission-alibabadubbo: +# name: Test for tag transmission alibabadubbo +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableAlibabaDubboTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - alibabaDubboVersion: "2.6.0" +# - alibabaDubboVersion: "2.6.3" +# - alibabaDubboVersion: "2.6.6" +# - alibabaDubboVersion: "2.6.9" +# - alibabaDubboVersion: "2.6.12" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for alibabaDubboVersion=${{ matrix.alibabaDubboVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/alibaba-dubbo +# test-for-tag-transmission-apachedubbo: +# name: Test for tag transmission apachedubbo +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableApacheDubboTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - apacheDubboVersion: "2.7.5" +# - apacheDubboVersion: "2.7.15" +# - apacheDubboVersion: "2.7.23" +# - apacheDubboVersion: "3.0.15" +# - apacheDubboVersion: "3.1.11" +# - apacheDubboVersion: "3.2.7" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for apacheDubboVersion=${{ matrix.apacheDubboVersion}} +# uses: ./.github/actions/scenarios/tag-transmission/apache-dubbo +# test-for-tag-transmission-crossthread: +# name: Test for tag transmission crossthread +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableCrossthreadTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for crossthread +# uses: ./.github/actions/scenarios/tag-transmission/crossthread +# test-for-tag-transmission-config: +# name: Test for tag transmission config +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableConfigTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for config +# uses: ./.github/actions/scenarios/tag-transmission/config +# test-for-tag-transmission-kafka: +# name: Test for tag transmission kafka +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableKafkaTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - kafkaVersion: "2.3.1" +# - kafkaVersion: "1.1.1" +# - kafkaVersion: "2.7.2" +# - kafkaVersion: "3.4.0" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for kafkaVersion=${{ matrix.kafkaVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/kafka +# test-for-tag-transmission-rocketmq: +# name: Test for tag transmission rocketmq +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableRocketmqTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - rocketMqVersion: "4.9.7" +# - rocketMqVersion: "5.0.0" +# - rocketMqVersion: "5.1.4" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for rocketMqVersion=${{ matrix.rocketMqVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/rocketmq +# test-for-tag-transmission-jdkhttp-jetty: +# name: Test for tag transmission jdkhttp and jetty +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableJettyTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - springBootVersion: "1.0.2.RELEASE" +# - springBootVersion: "1.1.12.RELEASE" +# - springBootVersion: "1.3.8.RELEASE" +# - springBootVersion: "1.4.7.RELEASE" +# - springBootVersion: "1.5.22.RELEASE" +# - springBootVersion: "2.2.0.RELEASE" +# - springBootVersion: "2.4.13" +# - springBootVersion: "2.7.16" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for springBootVersion=${{ matrix.springBootVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/jdkhttp-jetty +# test-for-tag-transmission-jdkhttp-tomcat: +# name: Test for tag transmission jdkhttp and tomcat +# runs-on: ubuntu-latest +# if: needs.set-execution-conditions.outputs.enableTomcatTagTransmissionAction=='true' +# needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache] +# strategy: +# matrix: +# include: +# - springBootVersion: "1.0.2.RELEASE" +# - springBootVersion: "1.1.12.RELEASE" +# - springBootVersion: "1.3.8.RELEASE" +# - springBootVersion: "1.4.7.RELEASE" +# - springBootVersion: "1.5.22.RELEASE" +# - springBootVersion: "2.2.0.RELEASE" +# - springBootVersion: "2.4.13" +# - springBootVersion: "2.7.16" +# fail-fast: false +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 100 +# - name: set java version to environment +# run: | +# echo "javaVersion=8" >> $GITHUB_ENV +# - name: common operations +# uses: ./.github/actions/common/tag-transmission +# - name: tag transmission test for springBootVersion=${{ matrix.springBootVersion }} +# uses: ./.github/actions/scenarios/tag-transmission/jdkhttp-tomcat \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-config/config/test/config.properties b/sermant-agentcore/sermant-agentcore-config/config/test/config.properties index 8c9ed5c728..f667bf5885 100644 --- a/sermant-agentcore/sermant-agentcore-config/config/test/config.properties +++ b/sermant-agentcore/sermant-agentcore-config/config/test/config.properties @@ -36,6 +36,8 @@ agent.service.dynamic.config.enable=true agent.service.httpserver.enable=false # xDS service switch agent.service.xds.service.enable=false +# dynamic mount service switch +agent.service.hot.plugging.service.enable=false # Metric service switch agent.service.metric.enable=false #============================= Event configuration =============================# diff --git a/sermant-backend/src/main/resources/application.properties b/sermant-backend/src/main/resources/application.properties index ae8fe92ab9..8c54ef4a1c 100644 --- a/sermant-backend/src/main/resources/application.properties +++ b/sermant-backend/src/main/resources/application.properties @@ -41,8 +41,8 @@ session.expire=60 dynamic.config.enable=true dynamic.config.namespace=default dynamic.config.timeout=30000 -dynamic.config.serverAddress=127.0.0.1:30110 -dynamic.config.dynamicConfigType=KIE +dynamic.config.serverAddress=127.0.0.1:2181 +dynamic.config.dynamicConfigType=ZOOKEEPER dynamic.config.connectTimeout=3000 dynamic.config.enableAuth=false dynamic.config.userName= diff --git a/sermant-backend/src/main/webapp/frontend/auto-imports.d.ts b/sermant-backend/src/main/webapp/frontend/auto-imports.d.ts index ccbac87ae6..918aad8808 100644 --- a/sermant-backend/src/main/webapp/frontend/auto-imports.d.ts +++ b/sermant-backend/src/main/webapp/frontend/auto-imports.d.ts @@ -4,5 +4,5 @@ // Generated by unplugin-auto-import export {} declare global { - const ElMessage: typeof import('element-plus/es')['ElMessage'] + } diff --git a/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/controller/TestController.java b/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/controller/TestController.java index 8287ad5e6e..eaa0a463cf 100644 --- a/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/controller/TestController.java +++ b/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/controller/TestController.java @@ -83,6 +83,19 @@ public Map testInstallPlugin() { return resultMap; } + /** + * 测试动态安装插件 + * + * @return 测试结果 + */ + public Map testUpdatePlugin() { + Map resultMap = new HashMap<>(); + DynamicTest dynamicTest = new DynamicTest(); + dynamicTest.testUpdatePlugin(); + resultMap.put(DynamicResults.DYNAMIC_UPDATE_PLUGIN.name(), DynamicResults.DYNAMIC_UPDATE_PLUGIN.getResult()); + return resultMap; + } + /** * 测试动态卸载插件 * diff --git a/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/results/DynamicResults.java b/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/results/DynamicResults.java index a84bae2504..dc509af5fb 100644 --- a/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/results/DynamicResults.java +++ b/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/results/DynamicResults.java @@ -76,7 +76,12 @@ public enum DynamicResults { /** * agentmain启动,passive插件失效 */ - AGENTMAIN_PASSIVE_PLUGIN_INTERCEPTOR_FAILURE("Test agentmain startup, passive plugin failure."); + AGENTMAIN_PASSIVE_PLUGIN_INTERCEPTOR_FAILURE("Test agentmain startup, passive plugin failure."), + + /** + * 动态更新插件 + */ + DYNAMIC_UPDATE_PLUGIN("Test dynamic update plugin."); /** * 用例描述 diff --git a/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/tests/dynamic/DynamicTest.java b/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/tests/dynamic/DynamicTest.java index c8b1437a9d..1ed2619aa1 100644 --- a/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/tests/dynamic/DynamicTest.java +++ b/sermant-integration-tests/agentcore-test/agentcore-test-application/src/main/java/com/example/sermant/agentcore/test/application/tests/dynamic/DynamicTest.java @@ -31,6 +31,7 @@ public class DynamicTest { private static final int FIRST_PLUGIN_ENHANCE_INDEX = 0; private static final int SECOND_PLUGIN_ENHANCE_INDEX = 1; private static final int THIRD_PLUGIN_ENHANCE_INDEX = 2; + private static final int FIRST_PLUGIN_V2_ENHANCE_INDEX = 3; /** * 用于测试插件反射修改的回执结果:监听成功 */ @@ -44,17 +45,27 @@ public static void setServiceCloseSuccess(boolean flag) { * 测试动态安装插件 */ public void testInstallPlugin() { - boolean[] result = repeatEnhance(false, false, false); + boolean[] result = repeatEnhance(false, false, false, false); if (result[FIRST_PLUGIN_ENHANCE_INDEX] && result[SECOND_PLUGIN_ENHANCE_INDEX]) { DynamicResults.DYNAMIC_INSTALL_PLUGIN_REPEAT_ENHANCE.setResult(true); } } + /** + * 测试动态升级插件 + */ + public void testUpdatePlugin() { + boolean[] result = repeatEnhance(false, false, false, false); + if (result[FIRST_PLUGIN_V2_ENHANCE_INDEX] && result[SECOND_PLUGIN_ENHANCE_INDEX]) { + DynamicResults.DYNAMIC_UPDATE_PLUGIN.setResult(true); + } + } + /** * 测试动态卸载插件 */ public void testUninstallPlugin() { - boolean[] result = repeatEnhance(false, false, false); + boolean[] result = repeatEnhance(false, false, false, false); if (!result[FIRST_PLUGIN_ENHANCE_INDEX]) { DynamicResults.DYNAMIC_UNINSTALL_PLUGIN_INTERCEPTOR_FAILURE.setResult(true); } @@ -67,7 +78,7 @@ public void testUninstallPlugin() { * 测试动态卸载Agent */ public void testUninstallAgent() { - boolean[] result = repeatEnhance(false, false, false); + boolean[] result = repeatEnhance(false, false, false, false); if (!result[FIRST_PLUGIN_ENHANCE_INDEX] && !result[SECOND_PLUGIN_ENHANCE_INDEX]) { DynamicResults.DYNAMIC_UNINSTALL_AGENT_PLUGIN_FAILURE.setResult(true); } @@ -77,7 +88,7 @@ public void testUninstallAgent() { * 测试动态重装Agent */ public void testReInstallAgent() { - boolean[] result = repeatEnhance(false, false, false); + boolean[] result = repeatEnhance(false, false, false, false); if (result[FIRST_PLUGIN_ENHANCE_INDEX] && result[SECOND_PLUGIN_ENHANCE_INDEX]) { DynamicResults.DYNAMIC_REINSTALL_AGENT_PLUGIN_SUCCESS.setResult(true); } @@ -87,7 +98,7 @@ public void testReInstallAgent() { * 测试premain启动 */ public void testPremainStartup() { - boolean[] result = repeatEnhance(false, false, false); + boolean[] result = repeatEnhance(false, false, false, false); if (result[FIRST_PLUGIN_ENHANCE_INDEX]) { DynamicResults.PREMAIN_STATIC_PLUGIN_INTERCEPTOR_SUCCESS.setResult(true); } @@ -100,7 +111,7 @@ public void testPremainStartup() { * 测试agentmain启动 */ public void testAgentmainStartup() { - boolean[] result = repeatEnhance(false, false, false); + boolean[] result = repeatEnhance(false, false, false, false); if (!result[FIRST_PLUGIN_ENHANCE_INDEX]) { DynamicResults.AGENTMAIN_STATIC_PLUGIN_INTERCEPTOR_FAILURE.setResult(true); } @@ -115,12 +126,13 @@ public void testAgentmainStartup() { /** * 测试插件的增强拦截方法 * - * @param firstEnhanceFlag first-plugin的增强flag + * @param firstEnhanceFlag first-plugin的增强flag * @param secondEnhanceFlag second-plugin的增强flag - * @param thirdEnhanceFlag second-plugin的增强flag + * @param thirdEnhanceFlag second-plugin的增强flag * @return 增强结果数组 */ - private boolean[] repeatEnhance(boolean firstEnhanceFlag, boolean secondEnhanceFlag, boolean thirdEnhanceFlag) { - return new boolean[]{firstEnhanceFlag, secondEnhanceFlag, thirdEnhanceFlag}; + private boolean[] repeatEnhance(boolean firstEnhanceFlag, boolean secondEnhanceFlag, boolean thirdEnhanceFlag, + boolean fourthEnhanceFlag) { + return new boolean[]{firstEnhanceFlag, secondEnhanceFlag, thirdEnhanceFlag, fourthEnhanceFlag}; } } diff --git a/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/pom.xml b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/pom.xml new file mode 100644 index 0000000000..39d10778bc --- /dev/null +++ b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/pom.xml @@ -0,0 +1,47 @@ + + + io.sermant.integration + agentcore-test + 1.0.0 + + 4.0.0 + dynamic-test-first-plugin-v2 + + + dynamic-test-first-plugin + ${project.version} + 8 + 8 + plugin + + + + + io.sermant + sermant-agentcore-core + provided + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + + ${package.plugin.name} + ${package.plugin.version} + + + + + + + diff --git a/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/java/io/sermant/dynamic/test/first/plugin/declarer/TestDynamicDeclarer.java b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/java/io/sermant/dynamic/test/first/plugin/declarer/TestDynamicDeclarer.java new file mode 100644 index 0000000000..8a62830213 --- /dev/null +++ b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/java/io/sermant/dynamic/test/first/plugin/declarer/TestDynamicDeclarer.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024-2024 Sermant Authors. All rights reserved. + * + * Licensed 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. + */ + +package io.sermant.dynamic.test.first.plugin.declarer; + +import io.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import io.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import io.sermant.core.plugin.agent.matcher.ClassMatcher; +import io.sermant.core.plugin.agent.matcher.MethodMatcher; +import io.sermant.dynamic.test.first.plugin.interceptor.RepeatEnhanceInterceptor; + +/** + * Dynamic installation, uninstallation, and testing of enhanced classes for the first plugin + * + * @author tangle + * @since 2024-09-26 + */ +public class TestDynamicDeclarer extends AbstractPluginDeclarer { + @Override + public ClassMatcher getClassMatcher() { + return ClassMatcher.nameEquals( + "com.example.sermant.agentcore.test.application.tests.dynamic.DynamicTest"); + } + + @Override + public InterceptDeclarer[] getInterceptDeclarers(ClassLoader classLoader) { + return new InterceptDeclarer[]{ + InterceptDeclarer.build(MethodMatcher.nameEquals("repeatEnhance"), new RepeatEnhanceInterceptor()) + }; + } +} diff --git a/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/java/io/sermant/dynamic/test/first/plugin/interceptor/RepeatEnhanceInterceptor.java b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/java/io/sermant/dynamic/test/first/plugin/interceptor/RepeatEnhanceInterceptor.java new file mode 100644 index 0000000000..51db87bcbe --- /dev/null +++ b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/java/io/sermant/dynamic/test/first/plugin/interceptor/RepeatEnhanceInterceptor.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024-2024 Sermant Authors. All rights reserved. + * + * Licensed 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. + */ + +package io.sermant.dynamic.test.first.plugin.interceptor; + +import io.sermant.core.common.LoggerFactory; +import io.sermant.core.plugin.agent.entity.ExecuteContext; +import io.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Dynamic installation, uninstallation, and testing of interceptors for the first plugin + * + * @author tangle + * @since 2024-09-26 + */ +public class RepeatEnhanceInterceptor extends AbstractInterceptor { + private static final Logger LOGGER = LoggerFactory.getLogger(); + + @Override + public ExecuteContext before(ExecuteContext context) { + context.getArguments()[3] = true; + LOGGER.log(Level.INFO, "Test repeat enhance, first plugin enhance success"); + return context; + } + + @Override + public ExecuteContext after(ExecuteContext context) { + return context; + } +} diff --git a/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/resources/META-INF/services/io.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/resources/META-INF/services/io.sermant.core.plugin.agent.declarer.PluginDeclarer new file mode 100644 index 0000000000..518523b089 --- /dev/null +++ b/sermant-integration-tests/agentcore-test/dynamic-test-first-plugin-v2/src/main/resources/META-INF/services/io.sermant.core.plugin.agent.declarer.PluginDeclarer @@ -0,0 +1 @@ +io.sermant.dynamic.test.first.plugin.declarer.TestDynamicDeclarer \ No newline at end of file diff --git a/sermant-integration-tests/agentcore-test/pom.xml b/sermant-integration-tests/agentcore-test/pom.xml index 5b250dfd90..2b37165e10 100644 --- a/sermant-integration-tests/agentcore-test/pom.xml +++ b/sermant-integration-tests/agentcore-test/pom.xml @@ -47,6 +47,7 @@ dynamic-test-first-plugin dynamic-test-second-plugin dynamic-test-third-plugin + dynamic-test-first-plugin-v2 diff --git a/sermant-integration-tests/scripts/test_backend_hot_plugging.py b/sermant-integration-tests/scripts/test_backend_hot_plugging.py new file mode 100644 index 0000000000..30f3f08b16 --- /dev/null +++ b/sermant-integration-tests/scripts/test_backend_hot_plugging.py @@ -0,0 +1,88 @@ +# +# Copyright (C) 2024-2024 Sermant Authors. All rights reserved. +# +# Licensed 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. +# +# + +import requests +import time +import unittest +import os + +class TestConfig(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.mode = os.getenv('TEST_MODE','default') + + hot_plugging_url = "http://127.0.0.1:8910/sermant/publishHotPluggingConfig" + query_plugin_info_url = "http://127.0.0.1:8910/sermant/getPluginsInfo" + query_install_result_url = "http://127.0.0.1:8915/testInstallPlugin" + query_uninstall_result_url = "http://127.0.0.1:8915/testUninstallPlugin" + header = {'content-type': 'application/json'} + install_plugin_param = { + "commandType": "INSTALL-PLUGINS", + "params": "", + "instanceIds": "", + "pluginNames": "dynamic-test-first-plugin,dynamic-test-second-plugin" + } + unInstall_plugin_param = { + "commandType": "UNINSTALL-PLUGINS", + "params": "", + "instanceIds": "", + "pluginNames": "dynamic-test-first-plugin" + } + update_plugin_param = { + "commandType": "UPDATE-PLUGINS", + "params": "", + "instanceIds": "", + "pluginNames": "dynamic-test-first-plugin" + } + + def set_instance_id(self): + session = requests.session() + resp = session.get(self.query_plugin_info_url).json() + print(resp) + self.unInstall_plugin_param["instanceIds"] = resp[0].get('instanceId') + self.install_plugin_param["instanceIds"] = resp[0].get('instanceId') + self.update_plugin_param["instanceIds"] = resp[0].get('instanceId') + session.close() + return resp + + def test_hot_plugging_function(self): + self.set_instance_id() + if self.mode == 'install': + session = requests.session() + resp = session.post(self.hot_plugging_url, json=self.install_plugin_param, headers=self.header).json() + print(resp) + time.sleep(20) + self.set_instance_id() + resp = session.get(self.query_install_result_url).json() + print(resp) + self.assertTrue(resp.get('DYNAMIC_INSTALL_PLUGIN_REPEAT_ENHANCE')) + elif self.mode == 'update': + session = requests.session() + session.get(self.hot_plugging_url, json=self.update_plugin_param, headers=self.header).json() + time.sleep(20) + resp = session.get(self.query_install_result_url).json() + self.assertTrue(resp.get('DYNAMIC_UPDATE_PLUGIN')) + elif self.mode == 'unInstall': + session = requests.session() + session.get(self.hot_plugging_url, json=self.unInstall_plugin_param, headers=self.header).json() + time.sleep(20) + resp = session.get(self.query_uninstall_result_url).json() + self.assertTrue(resp.get('DYNAMIC_UNINSTALL_PLUGIN_INTERCEPTOR_FAILURE')); + self.assertTrue(resp.get('DYNAMIC_UNINSTALL_REPEAT_ENHANCE')); + +if __name__ == "__main__": + unittest.main()