Skip to content
Snippets Groups Projects
Commit be55e4b1 authored by Kwangjin Lee's avatar Kwangjin Lee
Browse files

Update .gitlab-ci.yml file

parent 283a7b7f
No related branches found
No related tags found
1 merge request!367test publish build
Pipeline #245593 failed
......@@ -49,8 +49,10 @@ deploy-draft:
- |
echo "Fetching job information..."
API_RESPONSE=$(curl -s -H "PRIVATE-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/jobs?scope[]=success")
echo "API Response:"
echo "$API_RESPONSE"
echo "Parsing build job ID..."
BUILD_JOB_ID=$(echo "$API_RESPONSE" | jq '.[] | select(.name=="build-book") | .id')
BUILD_JOB_ID=$(echo "$API_RESPONSE" | jq -r '.[] | select(.name=="build-book") | .id')
if [ -z "$BUILD_JOB_ID" ]; then
echo "Failed to find build-book job ID. Using current job ID as fallback."
BUILD_JOB_ID=$CI_JOB_ID
......@@ -80,8 +82,10 @@ deploy-production:
- |
echo "Fetching job information..."
API_RESPONSE=$(curl -s -H "PRIVATE-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/jobs?scope[]=success")
echo "API Response:"
echo "$API_RESPONSE"
echo "Parsing build job ID..."
BUILD_JOB_ID=$(echo "$API_RESPONSE" | jq '.[] | select(.name=="build-book") | .id')
BUILD_JOB_ID=$(echo "$API_RESPONSE" | jq -r '.[] | select(.name=="build-book") | .id')
if [ -z "$BUILD_JOB_ID" ]; then
echo "Failed to find build-book job ID. Using current job ID as fallback."
BUILD_JOB_ID=$CI_JOB_ID
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment