FIX - Force Alpine directory creation in case we're in Gitlab CI

This commit is contained in:
Olivier DOSSMANN 2018-08-04 23:12:01 +02:00
parent 63ca496de5
commit e7fd7b00b8
2 changed files with 4 additions and 2 deletions

View File

@ -8,4 +8,5 @@ build:
script: script:
- apt-get update && apt-get install -y wget sudo - apt-get update && apt-get install -y wget sudo
- MOUNTBIN=`which mount` && rm -f $MOUNTBIN && ln -sf `which echo` $MOUNTBIN - MOUNTBIN=`which mount` && rm -f $MOUNTBIN && ln -sf `which echo` $MOUNTBIN
- bash install-and-chroot.sh - mkdir /alpine && cp build /alpine/
- FORCE_EXEC=1 bash install-and-chroot.sh

View File

@ -5,6 +5,7 @@ DIR=${DIRPATH:-'/alpine'}
script_url="https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install" script_url="https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install"
script_version="v0.9.0" script_version="v0.9.0"
script_name="alpine-chroot-install" script_name="alpine-chroot-install"
FORCE_EXEC=${FORCE_EXEC:-0}
# Tests # Tests
if ! [[ $DIR == /* ]]; then if ! [[ $DIR == /* ]]; then
@ -20,7 +21,7 @@ if ! test -f "$SCRIPT"; then
fi fi
# Install Alpine # Install Alpine
if ! test -d "$DIR"; then if ! test -d "$DIR" || ! [[ "$FORCE_EXEC" == 0 ]]; then
sudo bash ./$SCRIPT -d $DIR -m http://ftp.halifax.rwth-aachen.de/alpine \ sudo bash ./$SCRIPT -d $DIR -m http://ftp.halifax.rwth-aachen.de/alpine \
-p abuild \ -p abuild \
-p bash \ -p bash \