GitLab cache

This commit is contained in:
jpic
2020-01-26 20:52:55 +01:00
parent 4f405a8709
commit 47db32ad0c
6 changed files with 25 additions and 11 deletions
+2
View File
@@ -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'))
+2 -2
View File
@@ -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)"
+2 -2
View File
@@ -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)"