2 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 DPKG_LOCK="/var/lib/dpkg/lock-frontend"
24 # Wait for other apt process to finish by checking the dpkg lock file.
26 while sudo lsof ${DPKG_LOCK} > /dev/null 2>&1 ; do
27 echo "DPKG file locked: ${DPKG_LOCK}."
28 echo " Waiting for another pkg instalaltion process to finish ..."
30 if [[ ${try} -gt 60 ]] ; then
31 echo "ERROR: Max number of re-tries reached, exiting..."
38 sudo apt-get install -y --no-install-recommends \
42 curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
43 sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
45 set +e && sudo apt-get purge -y google-cloud-sdk lxc-docker && set -e
46 sudo apt-get install -y --no-install-recommends \
53 google-chrome-stable \
66 sudo cp -R /etc/alternatives /etc/keep-alternatives
67 sudo apt-get install -y --no-install-recommends \
70 sudo rm -rf /etc/alternatives
71 sudo mv /etc/keep-alternatives /etc/alternatives
73 docker pull ${GEODE_DOCKER_IMAGE}
74 sudo curl -Lo /usr/local/bin/dunit-progress https://github.com/jdeppe-pivotal/progress-util/releases/download/0.2/progress.linux
75 sudo chmod +x /usr/local/bin/dunit-progress
76 wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip
77 sudo sudo rm -rf /opt/selenium/chromedriver
78 sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium
79 rm /tmp/chromedriver_linux64.zip
80 sudo mv /opt/selenium/chromedriver /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
81 sudo chmod 755 /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
82 sudo ln -fs /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION} /usr/bin/chromedriver
85 sudo rm -rf /var/lib/apt/lists/*