Skip to content
Snippets Groups Projects
Commit 41c23575 authored by Esben Haabendal's avatar Esben Haabendal
Browse files

CI: Improve robustness of fetch job after_script


If the script step fails in fetch job, the after_script was failing because of
missing mirror-updates-ch dir, causing source mirror to not be updated with what
was already fetched.

Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
parent 52ee1749
No related branches found
No related tags found
1 merge request!15Various improvements in preparation for splitting components into packages
......@@ -188,7 +188,6 @@ fetch:
echo Fetching DISTRO=$DISTRO MACHINE=$MACHINE RECIPE=$RECIPE ;
bitbake $RECIPE --runall=fetch ;
done ; done ; done
- mkdir -pv mirror-updates-ch
after_script:
# Copy all regular files from downloads dir (except *.done files) to
# mirror dirs. Note, file is first copied to a temporary file (in same
......@@ -200,6 +199,7 @@ fetch:
SOURCE_MIRROR_PATH="$CI_PROJECT_DIR/build/mirror" ;
fi
- echo "Syncing mirror files to $SOURCE_MIRROR_PATH"
- mkdir -pv mirror-updates-ch
- rm -f build/downloads/*.done build/downloads/npm2/*.{done,resolved}
- for f in build/downloads/* build/downloads/npm2/* ; do if test -f "$f" -a ! -L "$f" ; then
fname=$(basename "$f") ;
......
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