2019-10-04 18:48:35 +02:00
#!/bin/bash
2020-04-10 15:14:33 +02:00
LIPASE_PACKAGE_FILE_PATH = $( ls build/lipase*.zip)
2020-03-31 18:57:36 +02:00
LIPASE_USER_MANUAL_PATH = $( pwd ) /doc/lipase.pdf
2019-10-04 18:48:35 +02:00
echo " LIPASE_PACKAGE_FILE_PATH= $LIPASE_PACKAGE_FILE_PATH "
2020-04-10 18:02:30 +02:00
LIPASE_PACKAGE_FILE_NAME = $( basename $LIPASE_PACKAGE_FILE_PATH )
2019-10-04 18:48:35 +02:00
if [ " $GRAFFY_OWNCLOUD_JENKINS_PWD " = '' ]
then
echo "the value of the environment variable GRAFFY_OWNCLOUD_JENKINS_PWD is empty, while its contents are expected to come from JenkinsFile (this script is designed to be called from the accompanying JenkinsFile)"
exit 1
fi
virtualenv ./python.virtualenv
source ./python.virtualenv/bin/activate
pip install pyocclient # installs python owncloud module
2020-04-10 18:02:30 +02:00
python -c " import owncloud; oc = owncloud.Client('https://cloud.ipr.univ-rennes1.fr'); oc.login('graffy',' $GRAFFY_OWNCLOUD_JENKINS_PWD '); oc.put_file('downloads/ $LIPASE_PACKAGE_FILE_NAME ', r' $LIPASE_PACKAGE_FILE_PATH '); oc.put_file('downloads/lipase-manual.pdf', r' $LIPASE_USER_MANUAL_PATH '); "
2019-10-04 18:48:35 +02:00