Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Establishing a common download URL between DM and travis (#135)
Browse files Browse the repository at this point in the history
* Enabling common binaries for travis and DM.

* Updates.

* Updating protoc url download filename.
  • Loading branch information
mirons-google committed Mar 22, 2017
1 parent 87ed6f3 commit 393618f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
1 change: 1 addition & 0 deletions data/protoc_url.txt
@@ -0,0 +1 @@
https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
6 changes: 4 additions & 2 deletions deployment-templates/py/forseti-instance.py
Expand Up @@ -79,6 +79,7 @@ def GenerateConfig(context):
sudo apt-get install -y python-pip python-dev
USER_HOME=/home/ubuntu
FORSETI_PROTOC_URL=https://raw.githubusercontent.com/GoogleCloudPlatform/forseti-security/master/data/protoc
# Check whether Cloud SQL proxy is installed
CLOUD_SQL_PROXY=$(ls $USER_HOME/cloud_sql_proxy)
Expand Down Expand Up @@ -118,8 +119,9 @@ def GenerateConfig(context):
PROTOC_PATH=$(which protoc)
if [ -z "$PROTOC_PATH" ]; then
cd $USER_HOME
wget https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
unzip -o protoc-3.2.0-linux-x86_64.zip
PROTOC_DOWNLOAD_URL=$(curl -s $FORSETI_PROTOC_URL)
wget $PROTOC_DOWNLOAD_URL
unzip -o $(basename $PROTOC_DOWNLOAD_URL)
sudo cp bin/protoc /usr/local/bin
fi
Expand Down
28 changes: 0 additions & 28 deletions scripts/travis_install.sh

This file was deleted.

7 changes: 4 additions & 3 deletions scripts/travis_install_protoc.sh
Expand Up @@ -18,10 +18,11 @@
set -e

PROTOC_DOWNLOAD_PATH="/tmp/protoc"
FORSETI_PROTOC_URL="https://raw.githubusercontent.com/GoogleCloudPlatform/forseti-security/master/data/protoc"

echo "Downloading protoc."
mkdir -p $PROTOC_DOWNLOAD_PATH
cd $PROTOC_DOWNLOAD_PATH
wget -P $PROTOC_DOWNLOAD_PATH \
https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
unzip -d $PROTOC_DOWNLOAD_PATH protoc-3.2.0-linux-x86_64.zip
PROTOC_DOWNLOAD_URL=$(curl -s $FORSETI_PROTOC_URL)
wget -P $PROTOC_DOWNLOAD_PATH $PROTOC_DOWNLOAD_URL
unzip -d $PROTOC_DOWNLOAD_PATH $(basename PROTOC_DOWNLOAD_URL)

0 comments on commit 393618f

Please sign in to comment.