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: ...@@ -8,11 +8,18 @@ build:
stage: build stage: build
script: script:
- > - >
PIPELINE_ID=$(curl -X POST RESPONSE=$(curl -X POST
-F token=$TRIGGER_SWLAB_DOCS -F token=$TRIGGER_SWLAB_DOCS
-F ref=master -F ref=master
https://gitlab.bwg.co.kr/api/v4/projects/951/trigger/pipeline | jq '.id') https://gitlab.bwg.co.kr/api/v4/projects/951/trigger/pipeline)
echo "Triggered Pipeline ID: $PIPELINE_ID" 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: check_pipeline_status:
stage: check stage: check
script: script:
...@@ -20,7 +27,7 @@ check_pipeline_status: ...@@ -20,7 +27,7 @@ check_pipeline_status:
STATUS="running" STATUS="running"
while [ "$STATUS" = "running" ]; do while [ "$STATUS" = "running" ]; do
STATUS=$(curl --header "PRIVATE-TOKEN: $TRIGGER_SWLAB_DOCS" 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" echo "Current status: $STATUS"
if [ "$STATUS" = "failed" ]; then if [ "$STATUS" = "failed" ]; then
echo "swlab-docs project pipeline failed." 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