diff --git a/scripts/ci/before_install.sh b/scripts/ci/before_install.sh index 19645bcadf..4f48cc6f6b 100644 --- a/scripts/ci/before_install.sh +++ b/scripts/ci/before_install.sh @@ -31,7 +31,7 @@ if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Test" ]]; then ssh 0.0.0.0 ls &> /dev/null fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash "$scriptdir/install_azurite.sh" bash "$scriptdir/install_oss.sh" bash "$scriptdir/install_hadoop.sh" diff --git a/scripts/ci/install.sh b/scripts/ci/install.sh index 658bf1fd14..86d10fef01 100644 --- a/scripts/ci/install.sh +++ b/scripts/ci/install.sh @@ -10,7 +10,12 @@ scriptdir="$(dirname $0)" # work or not. $scriptdir/retry.sh pip install --upgrade pip setuptools wheel $scriptdir/retry.sh pip install .[all,tests] -$scriptdir/retry.sh pip install psutil +# Installing specific packages to workaround some bugs. Please see [1] and [2] +# +# [1] https://github.com/iterative/dvc/issues/2284 +# [2] https://github.com/iterative/dvc/issues/2387 +$scriptdir/retry.sh pip uninstall -y azure-storage-blob +$scriptdir/retry.sh pip install psutil azure-storage-blob==1.5.0 git config --global user.email "dvctester@example.com" git config --global user.name "DVC Tester" diff --git a/scripts/ci/install_azurite.sh b/scripts/ci/install_azurite.sh index 094864db42..ad6d23e71d 100755 --- a/scripts/ci/install_azurite.sh +++ b/scripts/ci/install_azurite.sh @@ -1,16 +1,20 @@ #!/usr/bin/env bash -set -euo pipefail +set -e +set -x # install docker -export DEBIAN_FRONTEND=noninteractive -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -sudo apt-get update -sudo apt-get install -y docker-ce + export DEBIAN_FRONTEND=noninteractive + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + sudo apt-get install -y docker-ce # run azurite -sudo docker run --restart always -e executable=blob -p 10000:10000 --tmpfs /opt/azurite/folder -d arafato/azurite:2.6.5 +sudo docker run -d --restart always -e executable=blob -p 10000:10000 \ + --tmpfs /opt/azurite/folder \ + mcr.microsoft.com/azure-storage/azurite:3.1.2-preview \ + azurite -l /data --blobHost 0.0.0.0 # save secrets echo "export AZURE_STORAGE_CONTAINER_NAME='travis-tests'" >> env.sh