mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-12-05 02:31:33 +00:00
Use locals where possible
This commit is contained in:
parent
35776e7d7f
commit
6248da24e7
@ -14,13 +14,13 @@ source "${libhack_dir}/common.sh"
|
||||
|
||||
challenge::build() {
|
||||
pushd "${CHALLENGE_PATH}"
|
||||
ARGS="--build-arg NOFRONTEND=1" build_challenge_internal
|
||||
args="--build-arg NOFRONTEND=1" build_challenge_internal
|
||||
popd
|
||||
}
|
||||
|
||||
challenge::build_with_frontend() {
|
||||
pushd "${CHALLENGE_PATH}"
|
||||
ARGS="--no-cache" build_challenge_internal
|
||||
args="--no-cache" build_challenge_internal
|
||||
popd
|
||||
}
|
||||
|
||||
@ -28,11 +28,14 @@ build_challenge_internal() {
|
||||
docker build -t "${IMAGE_NAME}" \
|
||||
-f "${BUILD_CONTEXT}/Dockerfile" \
|
||||
--build-arg BUILD_CONTEXT="${BUILD_CONTEXT}" \
|
||||
${ARGS} .
|
||||
${args} .
|
||||
}
|
||||
|
||||
challenge::run() {
|
||||
pushd "${TFW_PATH}"
|
||||
local mount_baseimage
|
||||
local mount_challenge
|
||||
local mount_volumes
|
||||
if [ "${HOTRELOAD:-0}" == "1" ]; then
|
||||
[ -d "${BASEIMAGE_PATH}" ] && mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw"
|
||||
mount_challenge="-v ${CHALLENGE_PATH}/solvable/src:/srv/.tfw"
|
||||
|
Loading…
Reference in New Issue
Block a user