Test fix
This commit is contained in:
parent
d43affe9bc
commit
bb5510a934
@ -24,7 +24,7 @@ class Packages:
|
||||
self.packages = list(packages)
|
||||
self.mgr = None
|
||||
|
||||
def init_build(self, script):
|
||||
def pre_build(self, script):
|
||||
base = script.container.variable('base')
|
||||
for mgr, cmds in self.mgrs.items():
|
||||
cmd = ['podman', 'run', base, 'sh', '-c', f'type {mgr}']
|
||||
|
||||
@ -1,18 +1,15 @@
|
||||
#/usr/bin/env bash
|
||||
base="alpine"
|
||||
repo="None"
|
||||
tag="None"
|
||||
image="None"
|
||||
mounts=()
|
||||
umounts() {
|
||||
for i in "${mounts[@]}"; do
|
||||
umount $i
|
||||
echo $mounts
|
||||
mounts=("${mounts[@]/$i}")
|
||||
echo $mounts
|
||||
done
|
||||
buildah unmount $ctr
|
||||
trap - 0
|
||||
}
|
||||
trap umounts 0
|
||||
ctr=$(buildah from $base)
|
||||
mnt=$(buildah mount $ctr)
|
||||
mounts=("$mnt" "${mounts[@]}")
|
||||
mnt=$(buildah mount $ctr)
|
||||
@ -1,18 +1,15 @@
|
||||
#/usr/bin/env bash
|
||||
base="alpine"
|
||||
repo="None"
|
||||
tag="None"
|
||||
image="None"
|
||||
mounts=()
|
||||
umounts() {
|
||||
for i in "${mounts[@]}"; do
|
||||
umount $i
|
||||
echo $mounts
|
||||
mounts=("${mounts[@]/$i}")
|
||||
echo $mounts
|
||||
done
|
||||
buildah unmount $ctr
|
||||
trap - 0
|
||||
}
|
||||
trap umounts 0
|
||||
ctr=$(buildah from $base)
|
||||
mnt=$(buildah mount $ctr)
|
||||
mounts=("$mnt" "${mounts[@]}")
|
||||
mnt=$(buildah mount $ctr)
|
||||
@ -1,25 +1,21 @@
|
||||
#/usr/bin/env bash
|
||||
base="alpine"
|
||||
repo="None"
|
||||
tag="None"
|
||||
image="None"
|
||||
mounts=()
|
||||
umounts() {
|
||||
for i in "${mounts[@]}"; do
|
||||
umount $i
|
||||
echo $mounts
|
||||
mounts=("${mounts[@]/$i}")
|
||||
echo $mounts
|
||||
done
|
||||
buildah unmount $ctr
|
||||
trap - 0
|
||||
}
|
||||
trap umounts 0
|
||||
ctr=$(buildah from $base)
|
||||
mnt=$(buildah mount $ctr)
|
||||
mounts=("$mnt" "${mounts[@]}")
|
||||
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
|
||||
|
||||
@ -1,25 +1,21 @@
|
||||
#/usr/bin/env bash
|
||||
base="alpine"
|
||||
repo="None"
|
||||
tag="None"
|
||||
image="None"
|
||||
mounts=()
|
||||
umounts() {
|
||||
for i in "${mounts[@]}"; do
|
||||
umount $i
|
||||
echo $mounts
|
||||
mounts=("${mounts[@]/$i}")
|
||||
echo $mounts
|
||||
done
|
||||
buildah unmount $ctr
|
||||
trap - 0
|
||||
}
|
||||
trap umounts 0
|
||||
ctr=$(buildah from $base)
|
||||
mnt=$(buildah mount $ctr)
|
||||
mounts=("$mnt" "${mounts[@]}")
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user