summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorAric Gardner <agardner@linuxfoundation.org>2017-02-08 13:34:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-08 13:34:21 +0000
commit061fe62c5eed47f14b5d2c782346be3c66f41ce6 (patch)
treeb9737af306db3b826e448fb35331e8022ee050e1 /jjb
parenteabda5925636340865f5af11b12a6ac0887c5b46 (diff)
parentfd8d915b212fb8adc943a74b537b5b5efffeaaad (diff)
Merge "Add new jobs for doc merge and verify"
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/releng-macros.yml7
-rw-r--r--jjb/opnfvdocs/docs-post-rtd.sh7
-rw-r--r--jjb/opnfvdocs/docs-rtd.yaml69
3 files changed, 79 insertions, 4 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index 23c243522..175d82fb4 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -72,9 +72,8 @@
triggers:
- timed: ''
-# NOTE: unused macro, but we may use this for some jobs.
- trigger:
- name: gerrit-trigger-patch-submitted
+ name: gerrit-trigger-patchset-created
triggers:
- gerrit:
server-name: 'gerrit.opnfv.org'
@@ -88,13 +87,13 @@
comment-contains-value: 'recheck'
projects:
- project-compare-type: 'ANT'
- project-pattern: '{name}'
+ project-pattern: '{project}'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
- trigger:
- name: gerrit-trigger-patch-merged
+ name: gerrit-trigger-change-merged
triggers:
- gerrit:
server-name: 'gerrit.opnfv.org'
diff --git a/jjb/opnfvdocs/docs-post-rtd.sh b/jjb/opnfvdocs/docs-post-rtd.sh
new file mode 100644
index 000000000..7faa26f38
--- /dev/null
+++ b/jjb/opnfvdocs/docs-post-rtd.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+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/{rtdproject}
diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml
new file mode 100644
index 000000000..7ff8cd162
--- /dev/null
+++ b/jjb/opnfvdocs/docs-rtd.yaml
@@ -0,0 +1,69 @@
+- project:
+ name: docs-rtd
+ jobs:
+ - 'docs-merge-rtd-{stream}'
+ - 'docs-verify-rtd-{stream}'
+
+ stream:
+ - danube:
+ branch: 'master'
+ - colorado:
+ branch: 'stable/colorado'
+
+ project: 'opnfvdocs'
+ rtdproject: 'opnfv'
+ # TODO: Archive Artifacts
+
+- job-template:
+ name: 'docs-merge-rtd-{stream}'
+
+ project-type: freestyle
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ scm:
+ - git-scm
+
+ triggers:
+ - gerrit-trigger-change-merged
+
+ builders:
+ - shell: !include-raw: docs-post-rtd.sh
+
+- job-template:
+ name: 'docs-verify-rtd-{stream}'
+
+ project-type: freestyle
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ scm:
+ - git-scm
+
+ triggers:
+ - gerrit-trigger-patchset-created:
+ server: 'gerrit.opnfv.org'
+ project: '**'
+ branch: '{branch}'
+ files: 'docs/**/*.rst'
+ - timed: 'H H * * *'
+
+ builders:
+ - shell: |
+ if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
+ cd opnfvdocs/submodules/$GERRIT_PROJECT
+ git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+ else
+ git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+ fi
+ - shell: |
+ virtualenv $WORKSPACE/venv
+ source $WORKSPACE/venv/bin/activate
+ pip install --upgrade pip
+ pip freeze
+ pip install tox
+ tox -edocs \ No newline at end of file