-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into develop-issue#12…
…017-ui-fix # Conflicts: # console-ui/src/pages/ConfigurationManagement/ConfigurationManagement/ConfigurationManagement.js # console-ui/src/reducers/authority.js
- Loading branch information
Showing
289 changed files
with
13,681 additions
and
5,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,10 @@ name: "Continuous Integration" | |
on: | ||
push: | ||
branches: [ master, develop, v1.x-develop, v1.X ] | ||
pull_request: | ||
pull_request_target: | ||
branches: [ develop, v1.x-develop ] | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
permissions: read-all | ||
|
||
jobs: | ||
ci: | ||
|
@@ -21,16 +20,20 @@ jobs: | |
java: [8] | ||
steps: | ||
- name: "Cache Maven Repos" | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- if: github.event_name == 'pull_request_target' | ||
run: echo "REF=refs/pull/${{ github.event.number }}/merge" >> "$GITHUB_ENV" | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ env.REF }} | ||
- name: "Set up JDK ${{ matrix.java }}" | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'zulu' | ||
|
@@ -44,7 +47,11 @@ jobs: | |
- name: "Test With Maven" | ||
run: mvn -Prelease-nacos clean test -DtrimStackTrace=false -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | ||
- name: "Codecov" | ||
uses: codecov/[email protected] | ||
uses: codecov/[email protected] | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
verbose: true | ||
fail_ci_if_error: true | ||
files: ./address/target/site/jacoco/jacoco.xml,./api/target/site/jacoco/jacoco.xml,./auth/target/site/jacoco/jacoco.xml,./client/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./config/target/site/jacoco/jacoco.xml,./consistency/target/site/jacoco/jacoco.xml,./console/target/site/jacoco/jacoco.xml,./core/target/site/jacoco/jacoco.xml,./logger-adapter-impl/log4j2-adapter/target/site/jacoco/jacoco.xml,./logger-adapter-impl/logback-adapter-12/target/site/jacoco/jacoco.xml,./naming/target/site/jacoco/jacoco.xml,./persistence/target/site/jacoco/jacoco.xml,./plugin-default-impl/nacos-default-auth-plugin/target/site/jacoco/jacoco.xml,./plugin-default-impl/nacos-default-control-plugin/target/site/jacoco/jacoco.xml,./plugin/auth/target/site/jacoco/jacoco.xml,./plugin/config/target/site/jacoco/jacoco.xml,./plugin/control/target/site/jacoco/jacoco.xml,./plugin/datasource/target/site/jacoco/jacoco.xml,./plugin/encryption/target/site/jacoco/jacoco.xml,./plugin/environment/target/site/jacoco/jacoco.xml,./plugin/trace/target/site/jacoco/jacoco.xml,./prometheus/target/site/jacoco/jacoco.xml,./sys/target/site/jacoco/jacoco.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "Comment on PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
thanks-and-hint-to-document: | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
pull-requests: write | ||
name: Say thanks for the PR and hint to document | ||
steps: | ||
- name: comment on the pull request | ||
uses: hasura/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} | ||
number: ${{ github.event.number }} | ||
id: thanks-and-hint-to-document | ||
recreate: true | ||
message: | | ||
Thanks for your this PR. :pray: | ||
Please check again for your PR changes whether contains any usage/api/configuration change such as `Add new API `, `Add new configuration`, `Change default value of configuration`. | ||
If so, please add or update documents(markdown type) in `docs/next/` for repository [nacos-group/nacos-group.github.io](https://github.com/nacos-group/nacos-group.github.io/tree/develop-astro-nacos/src/content/docs/next) | ||
--- | ||
感谢您提交的PR。 :pray: | ||
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:`新增API`、`新增配置参数`、`修改默认配置`等操作。 | ||
如果是,请确保在提交之前,在仓库[nacos-group/nacos-group.github.io](https://github.com/nacos-group/nacos-group.github.io/tree/develop-astro-nacos/src/content/docs/next)中的`docs/next/`目录下添加或更新文档(markdown格式)。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,10 @@ env: | |
DOCKER_REPO: wuyfeedocker/nacos-ci | ||
DOCKER_REPO_B: wuyfeehub/nacos-ci | ||
TEST_REPO_NAME: nacos-group/nacos-e2e | ||
HEADER_PARAMS: "-H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer ${{ secrets.ACTION_TOKEN }}\" -H \"X-GitHub-Api-Version: 2022-11-28\"" | ||
HEADER_PARAMS_WRITE_COMMENT: "-H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer ${{ secrets.ACTION_TOKEN }}\" -H \"X-GitHub-Api-Version: 2022-11-28\"" | ||
BASE_URL_NACOS: https://api.github.com/repos/${GITHUB_REPOSITORY} | ||
BASE_URL_ROBOT: https://api.github.com/repos/wuyfee/nacos | ||
|
||
jobs: | ||
docker: | ||
|
@@ -108,20 +112,28 @@ jobs: | |
REPLICA_COUNT: 3 | ||
DATABASE: mysql | ||
NODE_PORT: 30000 | ||
AUTH_ENABLED: false | ||
ACTUAL_MODE: cluster | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mode: ["cluster","standalone"] | ||
mode: ["cluster","standalone","standalone_auth"] | ||
version: ${{ fromJSON(needs.docker.outputs.version-json) }} | ||
steps: | ||
- name: set nodeport | ||
run: | | ||
echo "NODE_PORT=$(expr $(expr $(expr $(expr ${{ strategy.job-index }} + 1) * ${{ github.run_number }}) % 30000) + 30000)" >> $GITHUB_ENV | ||
- name: set cluster params | ||
if: ${{ matrix.mode == 'standalone' }} | ||
- name: set params values | ||
run: | | ||
echo "REPLICA_COUNT=1" >> $GITHUB_ENV | ||
echo "DATABASE=embedded" >> $GITHUB_ENV | ||
if [[ ${{ matrix.mode }} == "standalone"* ]];then | ||
if [[ ${{ matrix.mode }} = "standalone_auth" ]]; then | ||
echo "AUTH_ENABLED=true" >> $GITHUB_ENV | ||
fi | ||
echo "ACTUAL_MODE=standalone" >> $GITHUB_ENV | ||
echo "REPLICA_COUNT=1" >> $GITHUB_ENV | ||
echo "DATABASE=embedded" >> $GITHUB_ENV | ||
echo ${{ matrix.mode }}-nacos-${{ github.run_id }}-${{ strategy.job-index }} | ||
fi | ||
- name: allocate docker repo | ||
run: | | ||
if [[ $(expr $(expr ${{ github.run_id }} + ${{ strategy.job-index }} ) % 2 ) -eq 1 ]]; then | ||
|
@@ -149,12 +161,14 @@ jobs: | |
values: | ||
namespace: nacos-${{ github.run_id }}-${{ strategy.job-index }} | ||
global: | ||
mode: ${{ matrix.mode }} | ||
mode: ${{ env.ACTUAL_MODE }} | ||
nacos: | ||
replicaCount: ${{ env.REPLICA_COUNT }} | ||
image: | ||
repository: ${{ env.DOCKER_REPO_ACTUAL }} | ||
tag: ${{ matrix.version }} | ||
auth: | ||
enabled: ${{ env.AUTH_ENABLED }} | ||
storage: | ||
type: ${{ env.DATABASE }} | ||
db: | ||
|
@@ -165,18 +179,27 @@ jobs: | |
service: | ||
nodePort: ${{ env.NODE_PORT }} | ||
type: ClusterIP | ||
e2e-java-test: | ||
if: ${{ success() }} | ||
name: Java e2e Test | ||
needs: [docker, deploy] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
CODE_PATH: java/nacos-2X | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mode: ["cluster","standalone"] | ||
mode: ["cluster","standalone","standalone_auth"] | ||
version: ${{ fromJSON(needs.docker.outputs.version-json) }} | ||
steps: | ||
- name: set code path | ||
run: | | ||
if [[ ${{ matrix.mode }} = "standalone_auth" ]]; then | ||
echo "CODE_PATH=java/auth" >> $GITHUB_ENV | ||
echo ${{ matrix.mode }}-nacos-${{ github.run_id }}-${{ strategy.job-index }} | ||
fi | ||
- uses: apache/rocketmq-test-tool@java-dev | ||
name: java e2e test | ||
with: | ||
|
@@ -192,7 +215,7 @@ jobs: | |
REPO_NAME: ${{ env.TEST_REPO_NAME }} | ||
CODE: https://github.com/${{ env.TEST_REPO_NAME }} | ||
BRANCH: main | ||
CODE_PATH: java/nacos-2X | ||
CODE_PATH: ${{ env.CODE_PATH }} | ||
CMD: mvn clean test -B | ||
ALL_IP: null | ||
CONTAINER: | ||
|
@@ -203,7 +226,6 @@ jobs: | |
RESOURCE_REQUIRE: | ||
cpu: 2 | ||
memory: 2Gi | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
name: Upload test log | ||
|
@@ -296,6 +318,7 @@ jobs: | |
BRANCH: main | ||
CODE_PATH: cpp | ||
CMD: | | ||
yum-config-manager remove centos-sclo-rh | ||
cd /root/code/cpp && make install | ||
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.bashrc && source ~/.bashrc | ||
cd /root/code/cpp/nacoscpptest | ||
|
@@ -454,7 +477,7 @@ jobs: | |
BRANCH: main | ||
CODE_PATH: python | ||
CMD: | | ||
cd /root/code/python | ||
cd /root/code/python | ||
pip3 install -r requirements.txt | ||
source ~/.bashrc | ||
cd nacospythontest && pytest --junitxml ../target/surefire-reports/TEST-report.xml test/*_test.py --log-cli-level=DEBUG | ||
|
@@ -480,15 +503,15 @@ jobs: | |
clean: | ||
if: always() | ||
if: ${{ always() }} | ||
name: Clean | ||
needs: [docker, e2e-java-test, e2e-go-test, e2e-cpp-test, e2e-csharp-test, e2e-nodejs-test, e2e-python-test] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mode: ["cluster","standalone"] | ||
mode: ["cluster","standalone","standalone_auth"] | ||
version: ${{ fromJSON(needs.docker.outputs.version-json) }} | ||
steps: | ||
- uses: apache/rocketmq-test-tool@java-dev | ||
|
@@ -498,3 +521,69 @@ jobs: | |
action: clean | ||
namespace: nacos-${{ github.run_id }}-${{ strategy.job-index }} | ||
askConfig: ${{ secrets.ASK_CONFIG_VIRGINA }} | ||
write-comment: | ||
if: ${{ always() }} | ||
name: write comment to pr | ||
needs: [docker, deploy, e2e-java-test, e2e-go-test, e2e-cpp-test, e2e-csharp-test, e2e-nodejs-test, e2e-python-test, clean] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: 'Download artifact' | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{ github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifactPR = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "pr" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifactPR.id, | ||
archive_format: 'zip', | ||
}); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); | ||
- name: unzip pr | ||
run: | | ||
unzip pr.zip | ||
cat pr.txt | ||
pr_number=`cat pr.txt` | ||
echo "PR_NUMBER=${pr_number}" >> $GITHUB_ENV | ||
- name: write issue comment | ||
run: | | ||
echo ${{ env.PR_NUMBER }} | ||
job_status="" | ||
if [ ${{ needs.docker.result }} = 'success' ] && [ ${{ needs.deploy.result }} = 'success' ] && [ ${{ needs.e2e-java-test.result }} = 'success' ] && [ ${{ needs.e2e-go-test.result }} = 'success' ] && [ ${{ needs.e2e-cpp-test.result }} = 'success' ] && [ ${{ needs.e2e-csharp-test.result }} = 'success' ] && [ ${{ needs.e2e-nodejs-test.result }} = 'success' ] && [ ${{ needs.e2e-python-test.result }} = 'success' ]; then | ||
jobs_status='$\\color{green}{SUCCESS}$' | ||
jobs_status+="\n[DETAILS](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }})" | ||
else | ||
jobs_status='$\\color{red}{FAILURE}$' | ||
jobs_status+="\n[DETAILS](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }})" | ||
fi | ||
echo ${jobs_status} | ||
markdown_content="${jobs_status}" | ||
generate_content() { | ||
if [ $1 = "success" ];then | ||
echo "\n ✅ $2 $1 " | ||
else | ||
echo "\n ❌ $2 $1 " | ||
fi | ||
} | ||
markdown_content+=$(generate_content ${{ needs.docker.result }} "- docker: ") | ||
markdown_content+=$(generate_content ${{ needs.deploy.result }} "- deploy (standalone & cluster & standalone_auth): ") | ||
markdown_content+=$(generate_content ${{ needs.e2e-java-test.result }} "- e2e-java-test (standalone & cluster & standalone_auth): ") | ||
markdown_content+=$(generate_content ${{ needs.e2e-go-test.result }} "- e2e-go-test (standalone & cluster): ") | ||
markdown_content+=$(generate_content ${{ needs.e2e-cpp-test.result }} "- e2e-cpp-test (standalone & cluster): ") | ||
markdown_content+=$(generate_content ${{ needs.e2e-csharp-test.result }} "- e2e-csharp-test (standalone & cluster): ") | ||
markdown_content+=$(generate_content ${{ needs.e2e-nodejs-test.result }} "- e2e-nodejs-test (standalone & cluster): ") | ||
markdown_content+=$(generate_content ${{ needs.e2e-python-test.result }} "- e2e-python-test (standalone & cluster): ") | ||
markdown_content+=$(generate_content ${{ needs.clean.result }} "- clean (standalone & cluster & standalone_auth): ") | ||
echo "markdown_content: \n ${markdown_content}" | ||
payload=`echo "{\"body\": \"${markdown_content}\"}" | jq .` | ||
curl -L -X POST ${{ env.HEADER_PARAMS_WRITE_COMMENT }} ${{ env.BASE_URL_NACOS }}/issues/${{ env.PR_NUMBER }}/comments -d "${payload}" |
Oops, something went wrong.