This variable is specific to local container execution and is a result of the hierarchy we chose for local container executions: $ ls build libvirt # build is the script, libvirt is a repo clone The variable would never be populated in GitLab environment, so we set the default to $PWD to make it harmless in such a case. Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx> --- ci/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/build.sh b/ci/build.sh index aeb1bf4b05..4d7ef810f2 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -7,7 +7,10 @@ export PATH="$CCACHE_WRAPPERSDIR:$PATH" export VIR_TEST_VERBOSE="1" export VIR_TEST_DEBUG="1" -cd "$CI_CONT_SRCDIR" +# CI_CONT_SRCDIR will only ever be set in local container executions. For +# GitLab CI environment the variable defaults to $PWD to avoid any disruptions +# in the expected environment view. +cd "${CI_CONT_SRCDIR:=$PWD}" # $MESON_OPTS is an env that can optionally be set in the container, # populated at build time from the Dockerfile. A typical use case would -- 2.39.1