From a0b195f87611c17decd39f16400197b24197a70a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 27 Apr 2023 15:19:05 +0200 Subject: [PATCH] ci-automation: Allow using --devcontainer-file option too I seem to have problems with getting a network connectivity inside QEMU vm when running the tests in the azure machine. I don't know what's the cause, but for the dev container tests these problems can be worked around by using the locally provided dev container image. Make it possible by specifying QEMU_DEVCONTAINER_FILE in the environment. --- ci-automation/ci-config.env | 2 +- ci-automation/vendor-testing/qemu.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ci-automation/ci-config.env b/ci-automation/ci-config.env index 944625fe45..5ddc05accc 100644 --- a/ci-automation/ci-config.env +++ b/ci-automation/ci-config.env @@ -77,7 +77,7 @@ QEMU_UPDATE_PAYLOAD="tmp/flatcar_test_update.gz" # and the binpackages from. QEMU_DEVCONTAINER_URL="${QEMU_DEVCONTAINER_URL:-}" QEMU_DEVCONTAINER_BINHOST_URL="${QEMU_DEVCONTAINER_BINHOST_URL:-}" - +QEMU_DEVCONTAINER_FILE="${QEMU_DEVCONTAINER_FILE:-}" # -- Equinix Metal -- EQUINIXMETAL_PARALLEL="${PARALLEL_TESTS:-4}" diff --git a/ci-automation/vendor-testing/qemu.sh b/ci-automation/vendor-testing/qemu.sh index ff66b6ed45..bd1763656a 100755 --- a/ci-automation/vendor-testing/qemu.sh +++ b/ci-automation/vendor-testing/qemu.sh @@ -46,6 +46,9 @@ declare -a devcontainer_opts if [ -n "${QEMU_DEVCONTAINER_URL}" ] ; then echo "++++ Using custom devcontainer URL '${QEMU_DEVCONTAINER_URL}'" devcontainer_opts+=( "--devcontainer-url" "${QEMU_DEVCONTAINER_URL}" ) +elif [ -n "${QEMU_DEVCONTAINER_FILE}" ]; then + echo "++++ Using custom devcontainer FILE '${QEMU_DEVCONTAINER_FILE}'" + devcontainer_opts+=( "--devcontainer-file" "${QEMU_DEVCONTAINER_FILE}" ) fi if [ -n "${QEMU_DEVCONTAINER_BINHOST_URL}" ] ; then echo "++++ Using custom devcontainer binhost '${QEMU_DEVCONTAINER_BINHOST_URL}'"