sh: Generalize chroot path handling
This commit is contained in:
parent
87ea4186d1
commit
32c7ec2912
@ -4,7 +4,9 @@
|
|||||||
# ArchLinux root via pacstrap, configured with build tools
|
# ArchLinux root via pacstrap, configured with build tools
|
||||||
# User: builduser 1000
|
# User: builduser 1000
|
||||||
|
|
||||||
BUILD_BASE='/opt/micobu/rootfs/home/builduser/base'
|
ROOTFS_BASE='/opt/micobu/rootfs'
|
||||||
|
ROOTFS_DIR='/home/builduser/base' # in rootfs
|
||||||
|
BUILD_BASE=$ROOTFS_BASE$ROOTFS_DIR
|
||||||
ARTEFACT_BASE='/opt/micobu/rootfs/home/builduser/artefacts'
|
ARTEFACT_BASE='/opt/micobu/rootfs/home/builduser/artefacts'
|
||||||
BUILD_TIMEOUT='600'
|
BUILD_TIMEOUT='600'
|
||||||
API_KEY='mykey'
|
API_KEY='mykey'
|
||||||
@ -62,7 +64,7 @@ EOF
|
|||||||
META_DATE_START="`date '+%s'`"
|
META_DATE_START="`date '+%s'`"
|
||||||
set +e
|
set +e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
firejail --noprofile --chroot=/opt/micobu-rootfs --net=none --read-write="$BUILD_DIR" env -i HOME=/home/builduser PATH=/bin:/usr/bin "bash" "-c" "timeout $BUILD_TIMEOUT ~/micobu_run.sh" | tee $BUILD_BASE/$MICOBU_TEMP_NAME/log.txt
|
firejail --noprofile --chroot=$ROOTFS_BASE --net=none --read-write="$BUILD_BASE" env -i HOME=$ROOTFS_DIR PATH=/bin:/usr/bin "bash" "-c" "timeout $BUILD_TIMEOUT ~/micobu_run.sh" | tee $BUILD_BASE/$MICOBU_TEMP_NAME/log.txt
|
||||||
RET=$?
|
RET=$?
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
set -e
|
set -e
|
||||||
|
Loading…
Reference in New Issue
Block a user