diff options
Diffstat (limited to 'jjb/opnfvdocs')
-rw-r--r-- | jjb/opnfvdocs/docs-rtd.yaml | 114 | ||||
-rw-r--r-- | jjb/opnfvdocs/opnfvdocs-views.yaml | 12 | ||||
-rw-r--r-- | jjb/opnfvdocs/opnfvdocs.yaml | 141 | ||||
-rw-r--r-- | jjb/opnfvdocs/project.cfg | 42 |
4 files changed, 56 insertions, 253 deletions
diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml deleted file mode 100644 index a239b4e4b..000000000 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ /dev/null @@ -1,114 +0,0 @@ ---- -- project: - name: docs-rtd - jobs: - - 'docs-merge-rtd-{stream}' - - 'docs-verify-rtd-{stream}' - - stream: - - master: - branch: 'master' - - fraser: - branch: 'stable/{stream}' - - danube: - branch: 'stable/{stream}' - - euphrates: - branch: 'stable/{stream}' - - project: 'opnfvdocs' - rtdproject: 'opnfv' - # TODO: Archive Artifacts - -- job-template: - name: 'docs-merge-rtd-{stream}' - - project-type: freestyle - - parameters: - - label: - name: SLAVE_LABEL - default: 'lf-build1' - description: 'Slave label on Jenkins' - all-nodes: false - node-eligibility: 'ignore-offline' - - project-parameter: - project: '{project}' - branch: '{branch}' - - triggers: - - gerrit-trigger-change-merged: - project: '**' - branch: '{branch}' - files: 'docs/**/*.*' - - builders: - - '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}' - - project-type: freestyle - - parameters: - - label: - name: SLAVE_LABEL - default: 'lf-build2' - description: 'Slave label on Jenkins' - all-nodes: false - node-eligibility: 'ignore-offline' - - 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}' - - triggers: - - gerrit-trigger-patchset-created: - server: 'gerrit.opnfv.org' - project: '**' - branch: '{branch}' - files: 'docs/**' - - builders: - - shell: | - if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then - # Temporary hacky solution to handle local builds for projects - # that already moved away from submodules - if ! cd docs/submodules/$GERRIT_PROJECT 2 > /dev/null; then - rm -rf .* * 2 > /dev/null - git clone ${{GIT_BASE/opnfvdocs/$GERRIT_PROJECT}} . - fi - 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' diff --git a/jjb/opnfvdocs/opnfvdocs-views.yaml b/jjb/opnfvdocs/opnfvdocs-views.yaml new file mode 100644 index 000000000..f33c728ed --- /dev/null +++ b/jjb/opnfvdocs/opnfvdocs-views.yaml @@ -0,0 +1,12 @@ +--- +- view: + name: opnfvdocs + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^opnfvdocs-.* diff --git a/jjb/opnfvdocs/opnfvdocs.yaml b/jjb/opnfvdocs/opnfvdocs.yaml index 5f08f69a4..3047a740e 100644 --- a/jjb/opnfvdocs/opnfvdocs.yaml +++ b/jjb/opnfvdocs/opnfvdocs.yaml @@ -1,115 +1,62 @@ --- -######################## -# Job configuration for opnfvdocs -######################## -- project: - - name: opnfvdocs - - project: '{name}' - - jobs: - - 'opnfvdocs-verify-shellcheck-{stream}' - - 'opnfvdocs-merge-shellcheck-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - fraser: &fraser - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -######################## -# job templates -######################## - -- job-template: - name: 'opnfvdocs-verify-shellcheck-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - string: - name: GIT_CLONE_BASE - default: ssh://gerrit.opnfv.org:29418 - description: "Used for overriding the GIT URL coming from parameters macro." - +- scm: + name: opnfvdocs-scm scm: - - git-scm-gerrit - + - git: + url: 'https://gerrit.opnfv.org/gerrit/opnfvdocs' + refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' + branches: + - '{ref}' + +- builder: + name: opnfvdocs-lint-bash-code + builders: + - shell: | + #!/bin/bash + echo "Checking bash code..." + for f in $(egrep '\.sh$' modified_files) + do + bash -n "$f" 2>> bash-violation.log + done + if [[ -s bash-violation.log ]]; then + echo -e "Bash syntax error(s)\n---" >> violation.log + sed -e 's/^/ /g' bash-violation.log >> violation.log + fi + +- trigger: + name: opnfvdocs-patchset-created triggers: - gerrit: - server-name: 'gerrit.opnfv.org' trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event + - patchset-created-event - comment-added-contains-event: comment-contains-value: 'recheck' - comment-added-contains-event: comment-contains-value: 'reverify' projects: - - project-compare-type: 'REG_EXP' - project-pattern: '{project}' + - project-compare-type: 'ANT' + project-pattern: 'opnfvdocs' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - - builders: - - lint-bash-code + branch-pattern: master + - branch-compare-type: 'ANT' + branch-pattern: stable/nile - job-template: - name: 'opnfvdocs-merge-shellcheck-{stream}' - - disabled: '{obj:disabled}' - + name: opnfvdocs-verify-shellcheck parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - string: - name: GIT_CLONE_BASE - default: ssh://gerrit.opnfv.org:29418 - description: "Used for overriding the GIT URL coming from parameters macro." - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon\ - \ the completion of the build." - + - label: + name: node + default: opnfv-build scm: - - git-scm - + - opnfvdocs-scm: + ref: $GERRIT_REFSPEC triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'REG_EXP' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - + - opnfvdocs-patchset-created builders: - - lint-bash-code + - opnfvdocs-lint-bash-code + +- project: + name: opnfvdocs + jobs: + - opnfvdocs-verify-shellcheck diff --git a/jjb/opnfvdocs/project.cfg b/jjb/opnfvdocs/project.cfg deleted file mode 100644 index 598269737..000000000 --- a/jjb/opnfvdocs/project.cfg +++ /dev/null @@ -1,42 +0,0 @@ -apex -armband -availability -bottlenecks -clover -compass4nfv -copper -conductor -container4nfv -daisy -doctor -domino -dovetail -dpacc -escalator -fastpathmetrics -fuel -functest -genesisreq -ipv6 -joid -kvmfornfv -lsoapi -moon -movie -multisite -octopus -onosfw -ovno -ovsnfv -parser -pharos -policytest -prediction -promise -qtip -sdnvpn -sfc -storperf -vnf_forwarding_graph -vswitchperf -yardstick |