X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fopnfvdocs%2Fopnfvdocs.yaml;h=3047a740ef3aa199311c43cdfed082fd4abe10a4;hb=1ad167e03c2b2463e91e00379469307ef58c62a4;hp=988e66e1bd84e9c353b6fce147dc57d8c7b31a10;hpb=ba5bee5aa9413154a7821a79714dc0d51d0d9132;p=releng.git diff --git a/jjb/opnfvdocs/opnfvdocs.yaml b/jjb/opnfvdocs/opnfvdocs.yaml index 988e66e1b..3047a740e 100644 --- a/jjb/opnfvdocs/opnfvdocs.yaml +++ b/jjb/opnfvdocs/opnfvdocs.yaml @@ -1,117 +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 - - lakelse: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - - hunter: - 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." - - 'opnfv-build-defaults' - +- 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." - - 'opnfv-build-defaults' - + - 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