3 # setup : script to setup required runtime environment. This script can be run again to update anything
4 # this should stay in your project directory
7 # save console output in setup_<timestamp>.log file in project directory
8 timestamp=$(date +"%m%d%Y_%H%M%S")
9 LOG_FILE=setup_$timestamp.log
10 exec > >(tee -a ${LOG_FILE} )
11 exec 2> >(tee -a ${LOG_FILE} >&2)
19 --target="$path/robot/library" \
20 'robotframework-seleniumlibrary==3.3.1' \
21 'robotframework-databaselibrary==1.2' \
22 'robotframework-angularjs==0.0.9' \
23 'robotframework-requests==0.5.0' \
24 'robotframework-sshlibrary==3.3.0' \
25 'robotframework-ftplibrary==1.6' \
26 'robotframework-archivelibrary==0.4.0' \
27 'robotframework-jsonlibrary==0.3.1'
33 --target="$path/robot/library" \
34 --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" \
35 'robotframework-onap==0.6.0.*'
37 # i dont why we need this, but lets protobuf work in docker
38 touch /var/opt/ONAP/robot/library/google/__init__.py
40 if [ -d $path/testsuite/heatbridge ]
42 # Support LF build location
43 cd $path/testsuite/heatbridge
46 git config --global http.sslVerify false
47 if [ -d ~/heatbridge ]
50 git pull origin master
52 git clone https://gerrit.onap.org/r/testsuite/heatbridge.git
61 --target="$path/robot/library" \
64 sed -i 's/cinderclient\.v1\.client/cinderclient\.v2\.client/g' /var/opt/ONAP/robot/library/heatbridge/OpenstackManager.py
66 # Go back to execution folder
69 # if the script is running during the image build skip the rest of it
70 # as required software is installed already.
73 # we need to update PATH with chromium-chromedriver
74 echo "Adding in-container chromedriver to PATH"
75 ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
77 echo "Skipping desktop steps, building container image..."
80 # Get the appropriate chromedriver. Default to linux64
82 CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/75.0.3770.140
83 CHROMEDRIVER_ZIP=chromedriver_linux64.zip
84 CHROMEDRIVER_TARGET=chromedriver.zip
86 # Handle mac and windows
90 CHROMEDRIVER_ZIP=chromedriver_win32.zip
93 CHROMEDRIVER_ZIP=chromedriver_mac64.zip
95 *) echo "Defaulting to Linux 64" ;;
98 if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ]
100 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
101 unzip chromedriver.zip -d /usr/local/bin
103 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
104 unzip $CHROMEDRIVER_TARGET
106 rm -rf $CHROMEDRIVER_TARGET