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" \
22 'robotframework-selenium2library==1.8.0' \
23 'robotframework-databaselibrary==0.8.1' \
24 'robotframework-extendedselenium2library==0.9.1' \
25 'robotframework-requests==0.5.0' \
26 'robotframework-sshlibrary==2.1.2' \
27 'robotframework-sudslibrary==0.8' \
28 'robotframework-ftplibrary==1.3' \
29 'robotframework-rammbock==0.4.0.1' \
32 'robotframework-httplibrary==0.4.2' \
33 'robotframework-archivelibrary==0.3.2' \
36 'robotframework-kafkalibrary==0.0.2'
39 # get the git for the eteutils you will need to add a private key to your ssh before this
40 if [ -d $path/testsuite/eteutils ]
42 # Support LF build location
43 cd $path/testsuite/eteutils
46 git config --global http.sslVerify false
47 if [ -d ~/python-testing-utils ]
49 cd python-testing-utils
50 git pull origin master
52 git clone https://gerrit.onap.org/r/testsuite/python-testing-utils.git
53 cd python-testing-utils
61 --target="$path/robot/library" ./robotframework-onap
64 if [ -d $path/testsuite/heatbridge ]
66 # Support LF build location
67 cd $path/testsuite/heatbridge
70 git config --global http.sslVerify false
71 if [ -d ~/heatbridge ]
74 git pull origin master
76 git clone https://gerrit.onap.org/r/testsuite/heatbridge.git
85 --target="$path/robot/library" \
89 # NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2
90 # This should be removed on new release of paramiko (2.1.2) or sshlibrary
91 # https://github.com/robotframework/SSHLibrary/issues/157
94 --target="$path/robot/library" \
98 # Go back to execution folder
101 # if the script is running during the image build skip the rest of it
102 # as required software is installed already.
105 # we need to update PATH with chromium-chromedriver
106 echo "Adding in-container chromedriver to PATH"
107 ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
109 echo "Skipping desktop steps, building container image..."
112 # Get the appropriate chromedriver. Default to linux64
114 CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.43
115 CHROMEDRIVER_ZIP=chromedriver_linux64.zip
116 CHROMEDRIVER_TARGET=chromedriver.zip
118 # Handle mac and windows
122 CHROMEDRIVER_ZIP=chromedriver_win32.zip
125 CHROMEDRIVER_ZIP=chromedriver_mac64.zip
127 *) echo "Defaulting to Linux 64" ;;
130 if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ]
132 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
133 unzip chromedriver.zip -d /usr/local/bin
135 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
136 unzip $CHROMEDRIVER_TARGET
138 rm -rf $CHROMEDRIVER_TARGET
142 # Install kafkacat : https://github.com/edenhill/kafkacat
147 brew install kafkacat ;;
149 apt-get -y install kafkacat
157 brew install protobuf ;;
159 apt-get -y install protobuf-compiler