#!/bin/bash

VIRTUALENV_DIR=/var/tmp/virtualenvs/$(echo ${JOB_NAME} | tr ' ' '-')
export PIP_DOWNLOAD_CACHE=/var/tmp/pip_download_cache

virtualenv --clear --no-site-packages $VIRTUALENV_DIR
source $VIRTUALENV_DIR/bin/activate

pip install -r requirements.txt

python fetch_csv.py --client-secrets /etc/google/oauth/client_secrets.json --oauth-tokens /var/lib/google/oauth/drive.db 
python create_pages.py

mkdir -p artefacts
cd output
tar -zcvf ../artefacts/service-explorer-$BUILD_ID.tgz .

#!/bin/bash

VIRTUALENV_DIR=/var/tmp/virtualenvs/$(echo ${JOB_NAME} | tr ' ' '-')
export PIP_DOWNLOAD_CACHE=/var/tmp/pip_download_cache

virtualenv --clear --no-site-packages $VIRTUALENV_DIR
source $VIRTUALENV_DIR/bin/activate

pip install -r requirements.txt

python fetch_csv.py --client-secrets /etc/google/oauth/client_secrets.json --oauth-tokens /var/lib/google/oauth/drive.db 
python create_pages.py

mkdir -p artefacts
cd output
tar -zcvf ../artefacts/service-explorer.tgz .

Remove build number from artefact name.
Remove build number from artefact name.

CI already publishes artefacts in folders versioned with the build
number. We don't need the build number in the filename too, and removing
it will produce cleaner URLs.
