Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #162 from jputrino/kilo
Browse files Browse the repository at this point in the history
Fixes #161
  • Loading branch information
jputrino authored Apr 13, 2018
2 parents 36eb98e + d5c50e4 commit 7ac64d9
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 75 deletions.
90 changes: 45 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,55 @@ python:
services:
- docker
env:
- PYTHONPATH=~/heat:/home/travis/f5-common-python:$PWD
- PYTHONPATH=~/heat:/home/travis/f5-common-python:$PWD
before_install:
- docker pull f5devcentral/containthedocs
- sudo apt-get -qq update
- git config --global user.email "[email protected]"
- git config --global user.name "Travis F5 Openstack"
- sudo apt-get -y install build-essential libssl-dev libffi-dev python-dev
- git clone https://github.com/openstack/heat.git ~/heat
- cd ~/heat/
- git checkout tags/kilo-eol
- cd $TRAVIS_BUILD_DIR
- docker pull f5devcentral/containthedocs
- sudo apt-get -qq update
- git config --global user.email "[email protected]"
- git config --global user.name "Travis F5 Openstack"
- sudo apt-get -y install build-essential libssl-dev libffi-dev python-dev
- git clone https://github.com/openstack/heat.git ~/heat
- cd ~/heat/
- git checkout tags/kilo-eol
- cd $TRAVIS_BUILD_DIR
install:
- pip install -r requirements.unit.test.txt
- pip install -r ~/heat/requirements.txt
- pip install -r requirements.unit.test.txt
- pip install -r ~/heat/requirements.txt
script:
- flake8 f5_heat/resources/
- py.test f5_heat/resources/test --cov=f5_heat/resources
- python setup.py sdist
- ./docs/doc_scripts/docker-docs.sh ./docs/doc_scripts/test-docs.sh
- flake8 f5_heat/resources/
- py.test f5_heat/resources/test --cov=f5_heat/resources
- python setup.py sdist
- ./docs/doc_scripts/docker-docs.sh ./docs/doc_scripts/test-docs.sh
deploy:
- provider: pypi
user: $PYPI_USER
password: $PYPI_PASSWORD
server: https://pypi.python.org/pypi
on:
all_branches: true
tags: true
python: 2.7
skip_cleanup: true
# deploy docs to s3
# if this is not a tagged release, the docs will deploy to /products/openstack/heat-plugins/$TRAVIS_BRANCH
- provider: script
skip_cleanup: true
on:
repo: F5Networks/f5-openstack-heat-plugins
branch: kilo
condition: $TRAVIS_TAG = ""
script:
- ./docs/doc_scripts/deploy-docs.sh publish-product-docs-to-prod openstack/heat-plugins $TRAVIS_BRANCH
# if this is a tagged release, the docs go to /products/openstack/heat-plugins/$TRAVIS_BRANCH/vX.Y
- provider: script
skip_cleanup: true
env:
- RELEASE_TAG="$(echo $TRAVIS_TAG |cut -c1-4)"
on:
tags: true
repo: F5Networks/f5-openstack-heat-plugins
script:
- ./scripts/deploy-docs.sh publish-product-docs-to-prod openstack/heat-plugins/$TRAVIS_BRANCH $RELEASE_TAG
- provider: pypi
user: $PYPI_USER
password: $PYPI_PASSWORD
server: https://pypi.python.org/pypi
on:
all_branches: true
tags: true
python: 2.7
skip_cleanup: true
# deploy docs to s3
# if this is not a tagged release, the docs will deploy to /products/openstack/heat-plugins/$TRAVIS_BRANCH
- provider: script
skip_cleanup: true
on:
repo: F5Networks/f5-openstack-heat-plugins
branch: kilo
condition: $TRAVIS_TAG = ""
script:
- ./docs/doc_scripts/deploy-docs.sh publish-product-docs-to-prod openstack/heat-plugins $TRAVIS_BRANCH
# if this is a tagged release, the docs go to /products/openstack/heat-plugins/$TRAVIS_BRANCH/vX.Y
- provider: script
skip_cleanup: true
env:
- RELEASE_TAG=$(echo $TRAVIS_TAG | cut -d . -f 1,2)
on:
tags: true
repo: F5Networks/f5-openstack-heat-plugins
script:
- ./scripts/deploy-docs.sh publish-product-docs-to-prod openstack/heat-plugins/$TRAVIS_BRANCH $RELEASE_TAG
notifications:
slack:
rooms:
Expand Down
36 changes: 6 additions & 30 deletions docs/doc_scripts/test-docs.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,17 @@
#!/usr/bin/env bash

html="make -C docs html"
grammar="write-good `find ./docs -not \( -path ./docs/drafts -prune \) -name '*.rst'` --passive --so --no-illusion --thereIs --cliches"

if [[ $TRAVIS != "" ]]; then
OUTPUT=$TRAVIS_BUILD_DIR/_build/linkcheck/output.txt
else
OUTPUT=docs/_build/linkcheck/output.txt
fi

goodjob() {
printf "%s\n" "$*" >&2

}
set -e
set -x

echo "Installing project dependencies"
pip install --user -r requirements.txt

linkcheck=$(make -C docs linkcheck | grep 'broken')

set -e
set -x

echo "Building docs with Sphinx"
$html
make -C docs clean
make -C docs html

echo "Checking grammar and style"
$grammar

[[ $grammar = "" ]] || goodjob "CONGRATULATIONS! You are a grammar wizard."
write-good `find ./docs -not \( -path ./docs/drafts -prune \) -name '*.rst'` --passive --so --no-illusion --thereIs --cliches

set +x
set +e
echo "Checking links"
if [[ $linkcheck == "" ]]; then
echo "Linkcheck succeeded"
else
echo "WARNING: linkcheck failed. Fix the following broken links:"
grep 'broken' $OUTPUT
fi
make -C docs linkcheck | grep "broken" || true

0 comments on commit 7ac64d9

Please sign in to comment.