This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |