aboutsummaryrefslogtreecommitdiff
path: root/.jenkins/get_cache.sh
diff options
context:
space:
mode:
authorPhilip Paquette <pcpaquette@gmail.com>2019-09-03 21:31:54 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-09-03 22:06:46 -0400
commit59e3599a5868343c5786aca641a172e1ed32d459 (patch)
treed7f09b1240012be559278f04905ed9360dde0a85 /.jenkins/get_cache.sh
parentf2122ed21480bd48bc67dadd08a503374be45b78 (diff)
Migrated tests from Jenkins to Travis
Diffstat (limited to '.jenkins/get_cache.sh')
-rwxr-xr-x.jenkins/get_cache.sh44
1 files changed, 0 insertions, 44 deletions
diff --git a/.jenkins/get_cache.sh b/.jenkins/get_cache.sh
deleted file mode 100755
index a589bd2..0000000
--- a/.jenkins/get_cache.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env bash
-
-# Validating number of arguments
-if [ "$#" -ne 2 ]; then
- echo "Expected 2 arguments"
- echo "Syntax: ./get_cache.sh <PR_NUMBER> <BRANCH>"
- echo "Use PR_NUMBER=0 if not a PR"
- exit 1
-fi
-
-RELEASE=$(lsb_release -c -s)
-PYTHON_VERSION=$(python -c "import sys; print('py%d%d' % (sys.version_info.major, sys.version_info.minor))")
-
-# Trying to download PR cache
-if [ "$1" != "0" ]; then
- CACHE_FILE="cache-pr_$1-$PYTHON_VERSION-$RELEASE.zip"
- CACHE_PATH="gs://ppaquette-diplomacy/cache-jenkins/game-$CACHE_FILE"
- gsutil -q stat "$CACHE_PATH"
- RET_VALUE=$?
-
- if [ $RET_VALUE == 0 ]; then
- echo "Downloading cache from $CACHE_PATH"
- gsutil cp $CACHE_PATH .
- unzip -qo $CACHE_FILE -d /
- exit 0
- else
- echo "No cache found at $CACHE_PATH"
- fi
-fi
-
-# Trying to download branch cache
-CACHE_FILE="cache-$2-$PYTHON_VERSION-$RELEASE.zip"
-CACHE_PATH="gs://ppaquette-diplomacy/cache-jenkins/game-$CACHE_FILE"
-gsutil -q stat "$CACHE_PATH"
-RET_VALUE=$?
-
-if [ $RET_VALUE == 0 ]; then
- echo "Downloading cache from $CACHE_PATH"
- gsutil cp $CACHE_PATH .
- unzip -qo $CACHE_FILE -d /
- exit 0
-else
- echo "No cache found at $CACHE_PATH"
-fi