X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fopnfvdocs%2Fdocs-rtd.yaml;h=e15b09812b8740d434b8f3ff53007bfb792caf81;hb=25e73c4cf7a3e617ab0015d1ce61f51d07befade;hp=bf6d0012b13a9650c30b6d19ab531964e98b572d;hpb=e506b11af38429d9a5602f7ea22ccd473074f4c7;p=releng.git diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index bf6d0012b..e15b09812 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -1,14 +1,17 @@ +--- - 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' - - danube: - branch: 'stable/{stream}' + - master: + branch: 'master' + - danube: + branch: 'stable/{stream}' + - euphrates: + branch: 'stable/{stream}' project: 'opnfvdocs' rtdproject: 'opnfv' @@ -20,28 +23,29 @@ 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 + - 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}' @@ -49,42 +53,42 @@ 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/**/*.*' - - 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 + 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