From 8295629d47d41e159d7370f4502d401f6aedaf81 Mon Sep 17 00:00:00 2001 From: Yuriy Gavrilin Date: Thu, 17 Sep 2020 16:42:26 +0300 Subject: [PATCH 1/4] add missing requirements for building a documentation --- docs/docs-src/requirements.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/docs-src/requirements.txt diff --git a/docs/docs-src/requirements.txt b/docs/docs-src/requirements.txt new file mode 100644 index 0000000..e69de29 From b39d44374c51872986c5936cf06c4b7ffa35b7e0 Mon Sep 17 00:00:00 2001 From: Yuriy Gavrilin Date: Thu, 17 Sep 2020 16:55:42 +0300 Subject: [PATCH 2/4] add buildAndPublishDocs func to jenkins --- jenkinsfile.groovy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jenkinsfile.groovy b/jenkinsfile.groovy index 93f399e..738a48d 100644 --- a/jenkinsfile.groovy +++ b/jenkinsfile.groovy @@ -1,5 +1,20 @@ 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 From 7c294e1ebbc992f21c917557d7d386d1e963eb60 Mon Sep 17 00:00:00 2001 From: Yuriy Gavrilin Date: Thu, 17 Sep 2020 16:59:10 +0300 Subject: [PATCH 3/4] add reqs for sphinx engine --- docs/docs-src/requirements.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/docs-src/requirements.txt b/docs/docs-src/requirements.txt index e69de29..3302acd 100644 --- a/docs/docs-src/requirements.txt +++ b/docs/docs-src/requirements.txt @@ -0,0 +1,3 @@ +Sphinx==3.2.1 +recommonmark==0.6.0 +sphinx-rtd-theme==0.5.0 \ No newline at end of file From 10447c5cf79ead83611386f514cadcea5f9aa812 Mon Sep 17 00:00:00 2001 From: Yuriy Gavrilin Date: Fri, 18 Sep 2020 10:59:19 +0300 Subject: [PATCH 4/4] add docs publishing to release step --- docs/docs-src/source/conf.py | 2 +- jenkinsfile.groovy | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/docs-src/source/conf.py b/docs/docs-src/source/conf.py index 2317844..2a264a4 100644 --- a/docs/docs-src/source/conf.py +++ b/docs/docs-src/source/conf.py @@ -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" diff --git a/jenkinsfile.groovy b/jenkinsfile.groovy index 738a48d..6f38d85 100644 --- a/jenkinsfile.groovy +++ b/jenkinsfile.groovy @@ -1,21 +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 -""" -} + 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 @@ -27,6 +28,8 @@ def buildAndPublishReleaseFunction = { python -m twine upload --config-file ${env.WORKSPACE}/.pypirc -r pypi ${env.WORKSPACE}/dist/* """ } + + buildAndPushDocs() } def buildFunction = {