Skip to content

Commit 3b463bf

Browse files
committed
chore(CI-workflow): 更新CI触发脚本并添加任务开始时间戳
1 parent bce0d92 commit 3b463bf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/scripts/get-CI-result.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ fi
99
COMMIT_ID=$1
1010
SECURITY=$2
1111
REPOSITORY=$3
12+
PIPELINE_ID="42305"
13+
PROJECT_ID="3567319"
1214

1315
# 设置最大等待时间
1416
MAX_WAIT_TIME=7200
@@ -19,7 +21,7 @@ while true; do
1921

2022
response=$(curl -s -H "Content-Type: application/json" \
2123
-H "Authorization: Basic ${SECURITY}" \
22-
-d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"repositoryUrl\": \"${REPOSITORY}\", \"commitId\": \"${COMMIT_ID}\"}" "http://get-tasend-back-twkvcdsbpj.cn-hangzhou.fcapp.run")
24+
-d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"aone\": { \"projectId\": \"${PROJECT_ID}\", \"pipelineId\": \"${PIPELINE_ID}\"}, \"repositoryUrl\": \"${REPOSITORY}\",\"commitId\": \"${COMMIT_ID}\"}" "https://get-tasend-back-twkvcdsbpj.cn-hangzhou-vpc.fcapp.run")
2325
echo "Response: $response"
2426

2527
# 检查curl是否成功

.github/workflows/CI-request-trigger.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
# Runs get CI result
4545
- name: Get CI result
4646
run: |
47+
echo "=== Task started at: $(date '+%Y-%m-%d %H:%M:%S') ==="
4748
COMMIT_ID=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.event.pull_request.head.sha }}" || echo "${{ github.sha }}")
4849
echo "Using Commit ID: $COMMIT_ID"
49-
./get-CI-result.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}"
50+
./get-CI-result.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}" "${{ github.repository }}"
5051
/Volumes/work/github/guojForkAlibaba/ROCK/.github/workflows/CI-request-trigger.yml

0 commit comments

Comments
 (0)