Skip to content

Commit

Permalink
travis: use azurite v3
Browse files Browse the repository at this point in the history
Trying to fix azure error on our ci:

https://travis-ci.com/iterative/dvc/jobs/224085273

Workaround for iterative#2387

Signed-off-by: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
efiop committed Aug 11, 2019
1 parent 71ab380 commit 2f30bdd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion scripts/ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
git config --global user.name "DVC Tester"
Expand Down
18 changes: 11 additions & 7 deletions scripts/ci/install_azurite.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2f30bdd

Please sign in to comment.