summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs/opnfvdocs.yaml
blob: 3047a740ef3aa199311c43cdfed082fd4abe10a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
- scm:
    name: opnfvdocs-scm
    scm:
      - 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:
          trigger-on:
            - patchset-created-event
            - comment-added-contains-event:
                comment-contains-value: 'recheck'
            - comment-added-contains-event:
                comment-contains-value: 'reverify'
          projects:
            - project-compare-type: 'ANT'
              project-pattern: 'opnfvdocs'
              branches:
                - branch-compare-type: 'ANT'
                  branch-pattern: master
                - branch-compare-type: 'ANT'
                  branch-pattern: stable/nile

- job-template:
    name: opnfvdocs-verify-shellcheck
    parameters:
      - label:
          name: node
          default: opnfv-build
    scm:
      - opnfvdocs-scm:
          ref: $GERRIT_REFSPEC
    triggers:
      - opnfvdocs-patchset-created
    builders:
      - opnfvdocs-lint-bash-code

- project:
    name: opnfvdocs
    jobs:
      - opnfvdocs-verify-shellcheck