Files
opencloud/tests/config/drone/check_web_cache.sh
Kiran Parajuli c430c1868b Zip before cache
Signed-off-by: Kiran Parajuli <kiranparajuli589@gmail.com>
2022-08-18 10:14:28 +05:45

19 lines
538 B
Bash

#!/bin/bash
source .drone.env
echo "Checking web version - $WEB_COMMITID in cache"
URL="$CACHE_ENDPOINT/$CACHE_BUCKET/ocis/web-test-runner/$WEB_COMMITID/web.tar.gz"
echo "Checking for the web cache at '$URL'."
if curl --output /dev/null --silent --head --fail "$URL"
then
echo "Web with commit id $WEB_COMMITID already available in cache"
# https://discourse.drone.io/t/how-to-exit-a-pipeline-early-without-failing/3951
# exit a Pipeline early without failing
exit 78
else
echo "Web with $WEB_COMMITID not available in cache"
fi