Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Documentation Building to Jenkins #80

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/docs-src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Sphinx==3.2.1
recommonmark==0.6.0
sphinx-rtd-theme==0.5.0
2 changes: 1 addition & 1 deletion docs/docs-src/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# Autodocc config
# Autodoc config
autoclass_content = 'both' # Document both - __init__ and class def
autodoc_member_order = "groupwise"
autodoc_typehints = "description"
Expand Down
18 changes: 18 additions & 0 deletions jenkinsfile.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
def repository = 'hydro-serving-sdk'

def buildAndPushDocs = {
sh """#!/bin/bash
python3 -m venv docs_venv
source docs_venv/bin/activate
python setup.py install
pip install -r docs/docs-src/requirements.txt
make -C docs/docs-src github
git add docs/*
git commit -m "Documentation Rebuilt"
git push
deactivate
"""
}


def buildAndPublishReleaseFunction = {

configFileProvider([configFile(fileId: 'PYPIDeployConfiguration', targetLocation: '.pypirc', variable: 'PYPI_SETTINGS')]) {
sh """#!/bin/bash
python3 -m venv venv
Expand All @@ -12,6 +28,8 @@ def buildAndPublishReleaseFunction = {
python -m twine upload --config-file ${env.WORKSPACE}/.pypirc -r pypi ${env.WORKSPACE}/dist/*
"""
}

buildAndPushDocs()
}

def buildFunction = {
Expand Down