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

feat : updated condition to check if branch exist also including hrouis repo

parent 8c66773b
No related branches found
No related tags found
1 merge request!47Draft: TEST_CI_FORK_DO_NOT_MERGE
...@@ -25,9 +25,14 @@ build:ubuntu_cpp: ...@@ -25,9 +25,14 @@ build:ubuntu_cpp:
echo "Pull from ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" echo "Pull from ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}"
BRANCH_TO_PULL=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} BRANCH_TO_PULL=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
fi fi
elif [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -ne 404 ]; then # checking if given branch exist on official repo or on fork
elif [[ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -ne 404 || \
$(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/hrouis/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -ne 404 ]]
then
# Pulling from branch with same name # Pulling from branch with same name
BRANCH_TO_PULL=$CI_COMMIT_REF_NAME BRANCH_TO_PULL=$CI_COMMIT_REF_NAME
else
echo "No branch \"$CI_COMMIT_REF_NAME\" found for repository \"$DEPENDENCY_NAME\""
fi fi
- echo "Pulling from branch:\"$BRANCH_TO_PULL\"" - echo "Pulling from branch:\"$BRANCH_TO_PULL\""
......
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