ocivm.sh: Allow projects to specify build VM name

Projects can now set a `buildvm` variable in their `config` file to
specify a unique name for their build VMs.  This allows multiple
projects to have running VMs simultaneously.

If a project does not provide a name, the build VM will be called
`aimeebuild`.
gentoo
Dustin 2023-04-16 20:09:05 -05:00
parent 9ea8e26504
commit ab311001a5
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ set -e
. "${CONFIGDIR:=${PWD}}"/config . "${CONFIGDIR:=${PWD}}"/config
name=build_yellow
if ! ocivm list | grep -q localhost/cross-${target}; then if ! ocivm list | grep -q localhost/cross-${target}; then
ocivm import localhost/cross-${target} ocivm import localhost/cross-${target}
fi fi
@ -12,7 +11,7 @@ ocivm \
--log-level DEBUG \ --log-level DEBUG \
run \ run \
-m 8G \ -m 8G \
-n ${name} \ -n ${buildvm:-aimeebuild} \
-w /tmp/src \ -w /tmp/src \
-v "${PWD}":/tmp/src \ -v "${PWD}":/tmp/src \
-v portagecache:/var/cache:size=16G \ -v portagecache:/var/cache:size=16G \