3 if [ -z "$PYARTIPROXY_IP" ];then
4 #echo "ERROR: cannot upload, no PYARTIPROXY_IP"
6 # TODO: lab-baylibre-agl does not get env as it should be. I will debug this later.
7 echo "DEBUG: No PYARTIPROXY_IP variable, fallback to baylibre one"
8 PYARTIPROXY_IP=10.1.1.47
12 echo "ERROR: missing path argument"
17 echo "ERROR: missing filename argument"
21 curl --silent --show-error -F "filename=$2" -F "data=@$1" http://$PYARTIPROXY_IP:9090/cgi-bin/pyartiproxy.py --output curl.out
23 echo "ERROR: with curl"
24 # retry without silent
25 curl --show-error -F "filename=$2" -F "data=@$1" http://$PYARTIPROXY_IP:9090/cgi-bin/pyartiproxy.py --output curl.out
27 ARTI_URL=$(grep -E '^http://.*|https://.*' curl.out)
28 echo "==========================="
30 echo "==========================="
31 if [ -z "$ARTI_URL" ];then
32 # No URL something is wrong
33 lava-test-reference artifactory-$2 --result fail
36 lava-test-reference artifactory-$2 --result pass --reference $ARTI_URL