From 265d66e5a0600048b5c30552aaf08a8765de5b21 Mon Sep 17 00:00:00 2001 From: guojing Date: Thu, 5 Mar 2026 15:49:55 +0800 Subject: [PATCH 1/2] feat: update the parameter passing in the CI trigger script and result retrieval script --- .github/scripts/get-CI-result.sh | 7 ++++--- .github/scripts/trigger-CI.sh | 5 +++-- .github/scripts/trigger-docs.sh | 3 ++- .github/workflows/CI-request-trigger.yml | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/get-CI-result.sh b/.github/scripts/get-CI-result.sh index d10b7301c..44708b7a1 100644 --- a/.github/scripts/get-CI-result.sh +++ b/.github/scripts/get-CI-result.sh @@ -1,13 +1,14 @@ #!/bin/bash # 检查参数 -if [ $# -ne 2 ]; then - echo "Usage: $0 " +if [ $# -ne 3 ]; then + echo "Usage: $0 " exit 1 fi COMMIT_ID=$1 SECURITY=$2 +REPOSITORY=$3 # 设置最大等待时间 MAX_WAIT_TIME=7200 @@ -18,7 +19,7 @@ while true; do response=$(curl -s -H "Content-Type: application/json" \ -H "Authorization: Basic ${SECURITY}" \ - -d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"commitId\": \"${COMMIT_ID}\"}" "http://get-tasend-back-twkvcdsbpj.cn-hangzhou.fcapp.run") + -d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"repositoryUrl\": \"${REPOSITORY}\", \"commitId\": \"${COMMIT_ID}\"}" "https://get-tasback-pre-aiffqmsbgj.cn-hangzhou.fcapp.run") echo "Response: $response" # 检查curl是否成功 diff --git a/.github/scripts/trigger-CI.sh b/.github/scripts/trigger-CI.sh index 42d79e10d..6a163845a 100644 --- a/.github/scripts/trigger-CI.sh +++ b/.github/scripts/trigger-CI.sh @@ -17,7 +17,7 @@ PIPELINE_ID="42305" GITHUB_COMMIT_ID="${COMMIT_ID}" GITHUB_SOURCE_REPO=$3 GITHUB_PR_ID=$4 -BRANCH_NAME="open_merge/${GITHUB_PR_ID}" +BRANCH_NAME="open_merge_pre/${GITHUB_PR_ID}" # Get current timestamp timestamp=$(date +%s) @@ -38,8 +38,9 @@ curl -v -H "Content-Type: application/json" \ \"type\": \"CREATE-TASK\", \"commitId\": \"${COMMIT_ID}\", \"repositoryUrl\": \"${REPO_URL}\", + \"prId\": \"${GITHUB_PR_ID}\", \"aone\": { \"projectId\": \"${PROJECT_ID}\", \"pipelineId\": \"${PIPELINE_ID}\"}, \"newBranch\": { \"name\": \"${BRANCH_NAME}\", \"ref\": \"${BRANCH_REF}\" }, \"params\": {\"cancel-in-progress\": \"${CANCEL_IN_PROGRESS}\", \"github_commit\":\"${GITHUB_COMMIT_ID}\", \"github_source_repo\": \"${GITHUB_SOURCE_REPO}\"} }" \ - "http://triggerid-to-mq-wjrdhcgbie.cn-hangzhou.fcapp.run" \ No newline at end of file + "https://triggero-mq-pre-rbmuaqmqmz.cn-hangzhou.fcapp.run" \ No newline at end of file diff --git a/.github/scripts/trigger-docs.sh b/.github/scripts/trigger-docs.sh index beb7c0df9..cfeefea24 100644 --- a/.github/scripts/trigger-docs.sh +++ b/.github/scripts/trigger-docs.sh @@ -41,8 +41,9 @@ curl -v -H "Content-Type: application/json" \ \"type\": \"CREATE-TASK\", \"commitId\": \"${COMMIT_ID}\", \"repositoryUrl\": \"${REPO_URL}\", + \"prId\": \"${GITHUB_PR_ID}\", \"aone\": { \"projectId\": \"${PROJECT_ID}\", \"pipelineId\": \"${PIPELINE_ID}\"}, \"newBranch\": { \"name\": \"${BRANCH_NAME}\", \"ref\": \"${BRANCH_REF}\" }, \"params\": {\"cancel-in-progress\": \"${CANCEL_IN_PROGRESS}\", \"github_commit\":\"${GITHUB_COMMIT_ID}\", \"github_source_repo\": \"${GITHUB_SOURCE_REPO}\", \"checkout_submodules\": \"${CHECKOUT_SUBMODULES}\", \"checkout_username\": \"${CHECK_USER_NAME}\", \"checkout_token\": \"${CHECK_TOKEN}\"} }" \ - "http://triggerid-to-mq-wjrdhcgbie.cn-hangzhou.fcapp.run" \ No newline at end of file + "https://triggero-mq-pre-rbmuaqmqmz.cn-hangzhou.fcapp.run" \ No newline at end of file diff --git a/.github/workflows/CI-request-trigger.yml b/.github/workflows/CI-request-trigger.yml index da42050fe..319c205d2 100644 --- a/.github/workflows/CI-request-trigger.yml +++ b/.github/workflows/CI-request-trigger.yml @@ -46,4 +46,4 @@ jobs: run: | COMMIT_ID=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.event.pull_request.head.sha }}" || echo "${{ github.sha }}") echo "Using Commit ID: $COMMIT_ID" - ./get-CI-result.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}" \ No newline at end of file + ./get-CI-result.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}" "${{ github.repository }}" \ No newline at end of file From ef610b915931ad2618915db0933131595672c771 Mon Sep 17 00:00:00 2001 From: guojing Date: Thu, 5 Mar 2026 16:55:29 +0800 Subject: [PATCH 2/2] feat: update the parameter passing in the CI trigger script and result retrieval script --- .github/scripts/get-CI-result.sh | 2 +- .github/scripts/trigger-CI.sh | 4 ++-- .github/scripts/trigger-docs.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/get-CI-result.sh b/.github/scripts/get-CI-result.sh index 44708b7a1..19ee8a0c0 100644 --- a/.github/scripts/get-CI-result.sh +++ b/.github/scripts/get-CI-result.sh @@ -19,7 +19,7 @@ while true; do response=$(curl -s -H "Content-Type: application/json" \ -H "Authorization: Basic ${SECURITY}" \ - -d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"repositoryUrl\": \"${REPOSITORY}\", \"commitId\": \"${COMMIT_ID}\"}" "https://get-tasback-pre-aiffqmsbgj.cn-hangzhou.fcapp.run") + -d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"repositoryUrl\": \"${REPOSITORY}\", \"commitId\": \"${COMMIT_ID}\"}" "http://get-tasend-back-twkvcdsbpj.cn-hangzhou.fcapp.run") echo "Response: $response" # 检查curl是否成功 diff --git a/.github/scripts/trigger-CI.sh b/.github/scripts/trigger-CI.sh index 6a163845a..b6892be95 100644 --- a/.github/scripts/trigger-CI.sh +++ b/.github/scripts/trigger-CI.sh @@ -17,7 +17,7 @@ PIPELINE_ID="42305" GITHUB_COMMIT_ID="${COMMIT_ID}" GITHUB_SOURCE_REPO=$3 GITHUB_PR_ID=$4 -BRANCH_NAME="open_merge_pre/${GITHUB_PR_ID}" +BRANCH_NAME="open_merge/${GITHUB_PR_ID}" # Get current timestamp timestamp=$(date +%s) @@ -43,4 +43,4 @@ curl -v -H "Content-Type: application/json" \ \"newBranch\": { \"name\": \"${BRANCH_NAME}\", \"ref\": \"${BRANCH_REF}\" }, \"params\": {\"cancel-in-progress\": \"${CANCEL_IN_PROGRESS}\", \"github_commit\":\"${GITHUB_COMMIT_ID}\", \"github_source_repo\": \"${GITHUB_SOURCE_REPO}\"} }" \ - "https://triggero-mq-pre-rbmuaqmqmz.cn-hangzhou.fcapp.run" \ No newline at end of file + "http://triggerid-to-mq-wjrdhcgbie.cn-hangzhou.fcapp.run" \ No newline at end of file diff --git a/.github/scripts/trigger-docs.sh b/.github/scripts/trigger-docs.sh index cfeefea24..00832ae86 100644 --- a/.github/scripts/trigger-docs.sh +++ b/.github/scripts/trigger-docs.sh @@ -46,4 +46,4 @@ curl -v -H "Content-Type: application/json" \ \"newBranch\": { \"name\": \"${BRANCH_NAME}\", \"ref\": \"${BRANCH_REF}\" }, \"params\": {\"cancel-in-progress\": \"${CANCEL_IN_PROGRESS}\", \"github_commit\":\"${GITHUB_COMMIT_ID}\", \"github_source_repo\": \"${GITHUB_SOURCE_REPO}\", \"checkout_submodules\": \"${CHECKOUT_SUBMODULES}\", \"checkout_username\": \"${CHECK_USER_NAME}\", \"checkout_token\": \"${CHECK_TOKEN}\"} }" \ - "https://triggero-mq-pre-rbmuaqmqmz.cn-hangzhou.fcapp.run" \ No newline at end of file + "http://triggerid-to-mq-wjrdhcgbie.cn-hangzhou.fcapp.run" \ No newline at end of file