Skip to content

Commit

Permalink
minor modifications to test script
Browse files Browse the repository at this point in the history
  • Loading branch information
jputrino committed Jun 7, 2018
1 parent 8fd89e2 commit d1bda7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ env:
global:
- DIST_REPO="f5-sphinx-theme"
- USER_REPO=$(echo $TRAVIS_REPO_SLUG | cut -f -1 -d / )
- S3_DIST_URL="http://d12ecz1n19ym1p.cloudfront.net"
- S3_DIST_URL="http://d3s2z99mfhr69y.cloudfront.net"
- BUILD_HTML_DIR=${TRAVIS_BUILD_DIR}/test-deploy/docs/_build/html
- BRANCH_DIR=${DIST_REPO}/travis-builds/${USER_REPO}/${TRAVIS_BRANCH}/
- UPLOAD_DIR="${BRANCH_DIR}$(date +%F)-${TRAVIS_BUILD_NUMBER}"
- UPLOAD_DIR="f5-sphinx-theme/$(date +%F)/${TRAVIS_BUILD_NUMBER}"

language: python
python:
Expand Down
10 changes: 6 additions & 4 deletions test/test-docs-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ RUN_ARGS=( \
--env-file=.env_travis
)

printf "Starting Docker container..." '%b\n'
printf "Starting Docker container..."

# Run the container using the provided args
# DO NOT SET -x BEFORE THIS, WE NEED TO KEEP THE CREDENTIALS OUT OF THE LOGS
# DO NOT SET -x BEFORE THIS TO KEEP THE CREDENTIALS OUT OF THE LOGS
docker run "${RUN_ARGS[@]}" ${DOC_IMG} /bin/bash -s <<EOF
set -x
set -e
Expand All @@ -35,13 +35,15 @@ pip install --user --upgrade .
cd test && make html
# deploy test docs to S3
set +x
printf "Deploying test documentation to: ${S3_DIST_URL}/${UPLOAD_DIR}/index.html"
aws s3 sync docs/_build/html s3://${AWS_S3_BUCKET}/${UPLOAD_DIR}
# create and upload indices
#s3-index-generator -b $AWS_S3_BUCKET -t $BRANCH_DIR -r ${DIST_REPO} -i 'index.html'
printf "View the test documentation at:" '%b\n'
printf "${S3_DIST_URL}/${UPLOAD_DIR}/index.html" '%b\n';
# clean up
rm -rf .env_travis
Expand Down

0 comments on commit d1bda7f

Please sign in to comment.