X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blobdiff_plain;f=jjb%2Fopnfvdocs%2Fdocs-rtd.yaml;h=bfb9d63ec2fe8e074aa5bb1579d685ce7a56d02e;hp=c78e7f0f6e47a79adf15300cfcc31637caf5b545;hb=c04f88ca91b7612c70bcae9c8a70a98d5bd46c6e;hpb=e0e8397f4fa90f168ec8a3a4a91980e033fea8f7 diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index c78e7f0f6..bfb9d63ec 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -1,12 +1,19 @@ +--- - project: name: docs-rtd jobs: - - 'docs-merge-rtd-{stream}' - - 'docs-verify-rtd-{stream}' + - 'docs-merge-rtd-{stream}' + - 'docs-verify-rtd-{stream}' stream: - - master: - branch: 'master' + - master: + branch: 'master' + - fraser: + branch: 'stable/{stream}' + - danube: + branch: 'stable/{stream}' + - euphrates: + branch: 'stable/{stream}' project: 'opnfvdocs' rtdproject: 'opnfv' @@ -18,28 +25,30 @@ project-type: freestyle parameters: - - label: - name: SLAVE_LABEL - default: 'lf-build1' - description: 'Slave label on Jenkins' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/releng - description: 'Git URL to use on this Jenkins Slave' - scm: - - git-scm + - label: + name: SLAVE_LABEL + default: 'lf-build1' + description: 'Slave label on Jenkins' + - project-parameter: + project: '{project}' + branch: '{branch}' triggers: - - gerrit-trigger-change-merged: - project: '**' - branch: '{branch}' - files: 'docs/**/*.*' + - gerrit-trigger-change-merged: + project: '**' + branch: '{branch}' + files: 'docs/**/*.*' builders: - - shell: !include-raw: docs-post-rtd.sh + - 'remove-old-docs-from-opnfv-artifacts' + - shell: | + if [ $GERRIT_BRANCH == "master" ]; then + RTD_BUILD_VERSION=latest + else + RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}} + fi + curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/opnfvdocsdemo + - job-template: name: 'docs-verify-rtd-{stream}' @@ -47,42 +56,50 @@ project-type: freestyle parameters: - - label: - name: SLAVE_LABEL - default: 'lf-build2' - description: 'Slave label on Jenkins' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/opnfvdocs - description: 'Git URL to use on this Jenkins Slave' + - label: + name: SLAVE_LABEL + default: 'lf-build2' + description: 'Slave label on Jenkins' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/opnfvdocs + description: 'Git URL to use on this Jenkins Slave' + scm: - - git-scm-with-submodules: - branch: '{branch}' + - git-scm-with-submodules: + branch: '{branch}' triggers: - - gerrit-trigger-patchset-created: - server: 'gerrit.opnfv.org' - project: '**' - branch: '{branch}' - files: 'docs/**/*.rst' - - timed: 'H H * * *' + - gerrit-trigger-patchset-created: + server: 'gerrit.opnfv.org' + project: '**' + branch: '{branch}' + files: 'docs/**/*.*' builders: - - shell: | - if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then - cd docs/submodules/$GERRIT_PROJECT - git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD - else - git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD - fi - - shell: | - sudo pip install virtualenv - virtualenv $WORKSPACE/venv - . $WORKSPACE/venv/bin/activate - pip install --upgrade pip - pip freeze - pip install tox - tox -edocs + - shell: | + if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then + cd docs/submodules/$GERRIT_PROJECT + git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD + cd - + else + git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD + fi + if [ -d docs/subdmodules ]; then + for project in docs/submodules/*; do + cd $project && git submodule deinit -f . && cd - + done + fi + - shell: | + sudo -H pip install virtualenv + virtualenv $WORKSPACE/venv + . $WORKSPACE/venv/bin/activate + pip install --upgrade pip + pip freeze + pip install tox + sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini + tox -edocs + - 'upload-review-docs'