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

fix : bash ?

parent 61fcf24f
No related branches found
No related tags found
1 merge request!47Draft: TEST_CI_FORK_DO_NOT_MERGE
...@@ -15,6 +15,8 @@ build:ubuntu_cpp: ...@@ -15,6 +15,8 @@ build:ubuntu_cpp:
- apt-get -qq install -y jq - apt-get -qq install -y jq
# Check if a branch with the same name exist on the dependance repository # Check if a branch with the same name exist on the dependance repository
- > - >
set -x
BRANCH_TO_PULL="dev" # default branch
if [ "$CI_MERGE_REQUEST_ID" ]; then if [ "$CI_MERGE_REQUEST_ID" ]; then
echo "Merge request pipeline detected" echo "Merge request pipeline detected"
if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") -eq 404 ]; then if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") -eq 404 ]; then
...@@ -24,13 +26,12 @@ build:ubuntu_cpp: ...@@ -24,13 +26,12 @@ 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") -eq 404 ]; then 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
BRANCH_TO_PULL="dev" # default branch
else
# 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}
fi fi
echo "Pull from branch : ${BRANCH_TO_PULL}" echo "Pull from branch : ${BRANCH_TO_PULL}"
set +x
# Check group namespace is valid, if it is then we are in the official project(aidge group id=6437), otherwise we pull from the fork # Check group namespace is valid, if it is then we are in the official project(aidge group id=6437), otherwise we pull from the fork
- > - >
......
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