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

chore : set CI in debug mode

parent 5ff8d30b
No related branches found
No related tags found
1 merge request!47Draft: TEST_CI_FORK_DO_NOT_MERGE
...@@ -11,7 +11,45 @@ build:ubuntu_cpp: ...@@ -11,7 +11,45 @@ build:ubuntu_cpp:
# aidge_core # aidge_core
- DEPENDENCY_NAME="aidge_core" - DEPENDENCY_NAME="aidge_core"
- DEPENDENCY_JOB="build:ubuntu_cpp" - DEPENDENCY_JOB="build:ubuntu_cpp"
- !reference [.download_dependency, script] # - !reference [.download_dependency, script]
- set -x
- BRANCH_TO_PULL="dev" # default branch
# Check if a branch with the same name exist on the dependance repository
- >
if [ "$CI_MERGE_REQUEST_ID" ]; then
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
echo "Pull from default"
else
# Pulling from target branch
echo "Pull from ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}"
BRANCH_TO_PULL=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
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
echo "Pull from default"
else
# Pulling from branch with same name
echo "Pull from branch name"
BRANCH_TO_PULL=${CI_COMMIT_REF_NAME}
fi
- apt-get install -y jq
# Check group namespace is valid, if not DEPENDENCY_ID=6437 (aidge group ID)
- >
if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}") -eq 404 ]; then
echo "Using aidge group id by default"
DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/6437/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id')
else
DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id')
fi
- echo "Project ID for ${DEPENDENCY_NAME} is ${DEPENDENCY_ID}"
- echo "curling from https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB"
- curl -f --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB"
- set +x
- unzip -q -o build_artifacts.zip -d .
- rm -rf build_cpp
# end !reference[]
# Build current module # Build current module
- export CMAKE_PREFIX_PATH=../install_cpp - export CMAKE_PREFIX_PATH=../install_cpp
......
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