GitLab cache
This commit is contained in:
@@ -16,6 +16,8 @@ from unittest import mock
|
||||
from podctl.visitors import packages
|
||||
packages.subprocess.check_call = mock.Mock()
|
||||
|
||||
os.environ['CACHE_DIR'] = '/test'
|
||||
|
||||
|
||||
def script_test(name, *visitors):
|
||||
result = str(Container(*visitors).script('build'))
|
||||
|
||||
@@ -16,8 +16,8 @@ mnt=$(buildah mount $ctr)
|
||||
echo "Packages.pre_build"
|
||||
echo "Packages.build"
|
||||
buildah run --user root $ctr -- mkdir -p /var/cache/apk
|
||||
mkdir -p $(pwd)/.cache/apk
|
||||
mount -o bind $(pwd)/.cache/apk $mnt/var/cache/apk
|
||||
mkdir -p /test/apk
|
||||
mount -o bind /test/apk $mnt/var/cache/apk
|
||||
mounts=("$mnt/var/cache/apk" "${mounts[@]}")
|
||||
buildah run $ctr -- ln -s /var/cache/apk /etc/apk/cache
|
||||
old="$(find .cache/apk/ -name APKINDEX.* -mtime +3)"
|
||||
|
||||
@@ -19,8 +19,8 @@ echo "Packages.pre_build"
|
||||
echo "User.pre_build"
|
||||
echo "Packages.build"
|
||||
buildah run --user root $ctr -- mkdir -p /var/cache/apk
|
||||
mkdir -p $(pwd)/.cache/apk
|
||||
mount -o bind $(pwd)/.cache/apk $mnt/var/cache/apk
|
||||
mkdir -p /test/apk
|
||||
mount -o bind /test/apk $mnt/var/cache/apk
|
||||
mounts=("$mnt/var/cache/apk" "${mounts[@]}")
|
||||
buildah run $ctr -- ln -s /var/cache/apk /etc/apk/cache
|
||||
old="$(find .cache/apk/ -name APKINDEX.* -mtime +3)"
|
||||
|
||||
Reference in New Issue
Block a user