Skip to content
Snippets Groups Projects
Commit 96f7301d authored by Mihai Baruta's avatar Mihai Baruta
Browse files

The local checker should use paths simillar to the docker runner

parent 19bead77
No related branches found
No related tags found
No related merge requests found
...@@ -231,9 +231,14 @@ checker_main() { ...@@ -231,9 +231,14 @@ checker_main() {
cp -R ./* "$tmpdir" cp -R ./* "$tmpdir"
LOG_INFO "Running checker..." LOG_INFO "Running checker..."
# In your checker script if you must use absolute paths please use $CI_PROJECT_DIR to reference the location of your directory,
# otherwise stick to relative paths.
# It is guaranteed that the current working directory in which checker.sh will run is $CI_PROJECT_DIR/checker.
project_directory="/build/$USER/$(basename "$(pwd)")"
docker run --rm \ docker run --rm \
--mount type=bind,source="$tmpdir",target=/build \ --mount type=bind,source="$tmpdir",target="$project_directory" \
"$image_name" /bin/bash -c "rm -rf /usr/local/bin/bash; /build/checker/checker.sh \"${script_args[@]}\"" # remove bash middleware script "$image_name" /bin/bash -c "rm -rf /usr/local/bin/bash; cd \"$project_directory/checker\"; \"$project_directory/checker/checker.sh\" \"${script_args[@]}\"" # remove bash middleware script
if [ -n "$remove_image" ] ; then if [ -n "$remove_image" ] ; then
LOG_INFO "Cleaning up..." LOG_INFO "Cleaning up..."
......
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