Get Docker image name with shyaml (if possible)
[skip lint]
# NOTE: This script has been adapted from content generated by github.com/conda-forge/conda-smithy
REPO_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
-IMAGE_NAME="condaforge/linux-anvil-comp7"
ARTIFACTS="$REPO_ROOT/build_artifacts"
THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
PROVIDER_DIR="$(basename $THISDIR)"
@@ -21,6 +20,16 @@ if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then
HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u)
fi
+if [ -z "${IMAGE_NAME}" ]; then
+ SHYAML_INSTALLED="$(shyaml -h || echo NO)"
+ if [ "${SHYAML_INSTALLED}" == "NO" ]; then
+ echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7"
+ IMAGE_NAME="condaforge/linux-anvil-comp7"
+ else
+ IMAGE_NAME="$(cat "${REPO_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )"
+ fi
+fi
+
mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done"
rm -f "$DONE_CANARY"
