QA & test update

This commit is contained in:
jpic
2020-01-26 19:57:41 +01:00
parent c817784eab
commit 4f405a8709
5 changed files with 20 additions and 4 deletions
+3 -1
View File
@@ -12,4 +12,6 @@ umounts() {
}
trap umounts 0
ctr=$(buildah from $base)
mnt=$(buildah mount $ctr)
mnt=$(buildah mount $ctr)
echo "Copy.init_build"
echo "Copy.build"
+3
View File
@@ -13,9 +13,12 @@ umounts() {
trap umounts 0
ctr=$(buildah from $base)
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
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)"
if [ -n "$old" ] || ! ls .cache/apk/APKINDEX.*; then
+8
View File
@@ -13,9 +13,15 @@ umounts() {
trap umounts 0
ctr=$(buildah from $base)
mnt=$(buildah mount $ctr)
echo "User.init_build"
echo "User.init_build"
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
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)"
if [ -n "$old" ] || ! ls .cache/apk/APKINDEX.*; then
@@ -25,10 +31,12 @@ else
fi
buildah run --user root $ctr -- apk upgrade
buildah run --user root $ctr -- apk add shadow
echo "User.build"
if buildah run $ctr -- id 1000; then
i=$(buildah run $ctr -- id -n 1000)
buildah run $ctr -- usermod --home-dir /app --no-log-init 1000 $i
else
buildah run $ctr -- useradd --home-dir /app --uid 1000 app
fi
echo "User.post_build"
buildah config --user app $ctr