Commit 780c1974 authored by heywon.choi's avatar heywon.choi

test

parent b0bc239a
Pipeline #19190 failed with stages
in 4 seconds
......@@ -8,11 +8,18 @@ build:
stage: build
script:
- >
PIPELINE_ID=$(curl -X POST
RESPONSE=$(curl -X POST
-F token=$TRIGGER_SWLAB_DOCS
-F ref=master
https://gitlab.bwg.co.kr/api/v4/projects/951/trigger/pipeline | jq '.id')
echo "Triggered Pipeline ID: $PIPELINE_ID"
https://gitlab.bwg.co.kr/api/v4/projects/951/trigger/pipeline)
echo "API Response: $RESPONSE"
PIPELINE_ID=$(echo $RESPONSE | jq -r '.[0].id')
echo "Pipeline ID: $PIPELINE_ID"
if [ "$PIPELINE_ID" == "null" ] || [ -z "$PIPELINE_ID" ]; then
echo "Failed to get Pipeline ID"
exit 1
fi
echo "Pipeline ID: $PIPELINE_ID"
check_pipeline_status:
stage: check
script:
......@@ -20,7 +27,7 @@ check_pipeline_status:
STATUS="running"
while [ "$STATUS" = "running" ]; do
STATUS=$(curl --header "PRIVATE-TOKEN: $TRIGGER_SWLAB_DOCS"
"https://gitlab.com/api/v4/projects/951/pipelines/$PIPELINE_ID" | jq -r '.status')
"https://gitlab.com/api/v4/projects/951/pipelines/$PIPELINE_ID" | jq -r '.[0].status')
echo "Current status: $STATUS"
if [ "$STATUS" = "failed" ]; then
echo "swlab-docs project pipeline failed."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment