Skip to content
Snippets Groups Projects
Commit e6c99469 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

feat : added warning message in case of jobs not found in pipeline due to recent merge.

parent bef52a14
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,15 @@
echo "Current pipeline ID : $PIPELINE_ID"
echo "Retrieving jobs of curr pipeline from : \"$API_URL/projects/$DEP_ID/pipelines/$PIPELINE_ID/jobs\""
JOBS=$(curl -s "$API_URL/projects/$DEP_ID/pipelines/$PIPELINE_ID/jobs")
if [[ $(jq -r '.message' <<< $JOBS) == "404 Not found" ]] ; then
echo "WARNING: NO JOBS FOUND FOR PIPELINE $PIPELINE_ID OF PROJECT $DEP_NAME."
echo "WARNING: This might happen if on $DEP_NAME / $BRANCH_TO_PULL:"
echo "WARNING: - There is an ongoing pipeline"
echo "WARNING: - A branch was jsut merged in just merged to $BRANCH_TO_PULL."
echo "WARNING: IGNORING THIS PIPELINE."
echo "WARNING: To solve this issue either wait for pipeline to finish or re-run a pipeline on given branch."
continue
fi
# Retrieve jobs only if they are successful
# Only retrieve part of the json for readability
echo "Retrieving only $DEPENDENCY_JOB that are successful."
......
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