diff options
author | Deepshikha <dkhandel@redhat.com> | 2017-07-14 11:30:34 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2017-07-17 12:36:30 +0000 |
commit | 8389e0d18bad7fa76c8ac4651c1e9aee07e06518 (patch) | |
tree | 31c487471dea1d6092e217f5b3be1de9c24be361 /build-gluster-org | |
parent | 0945968628e859f138df50edf8f139d54a014614 (diff) |
Added a cppcheck job to jenkins pipelines
Change-Id: I9466288a31c07870ffb2af9087465cb5d44b6270
Signed-off-by: Deepshikha <dkhandel@redhat.com>
Diffstat (limited to 'build-gluster-org')
-rw-r--r-- | build-gluster-org/jobs/cppcheck.yml | 47 | ||||
-rw-r--r-- | build-gluster-org/scripts/cppcheck.sh | 8 |
2 files changed, 55 insertions, 0 deletions
diff --git a/build-gluster-org/jobs/cppcheck.yml b/build-gluster-org/jobs/cppcheck.yml new file mode 100644 index 0000000..c9e7b4e --- /dev/null +++ b/build-gluster-org/jobs/cppcheck.yml @@ -0,0 +1,47 @@ +- job: + name: cppcheck + node: smoke7 + description: Run cppcheck analysis on gluster code + project-type: freestyle + concurrent: true + + scm: + - git: + branches: + - $GERRIT_BRANCH + refspec: $GERRIT_REFSPEC + choosing-strategy: gerrit + url: https://github.com/gluster/glusterfs + + properties: + - discard-after-x: + x: 30 + - one-build-per-node + + triggers: + - timed: "H 0 * * *" + + builders: + - shell: !include-raw: ../scripts/cppcheck.sh + + publishers: + - cppcheck: + pattern: "**/cppcheck.xml" + display: + - sum: true + - error: true + - warning: true + - information: true + + parameters: + - string: + default: refs/heads/master + description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' + name: GERRIT_REFSPEC + - string: + default: master + description: 'Name of the branch you want to build from. We usually build from master' + name: GERRIT_BRANCH + + wrappers: + - timestamps diff --git a/build-gluster-org/scripts/cppcheck.sh b/build-gluster-org/scripts/cppcheck.sh new file mode 100644 index 0000000..7e6e629 --- /dev/null +++ b/build-gluster-org/scripts/cppcheck.sh @@ -0,0 +1,8 @@ +#!/bin/bash +./autogen.sh +./configure +RESULT="$WORKSPACE/results" +mkdir $RESULT +cppcheck --enable=all --inconclusive --xml --xml-version=2 . 2>"$RESULT/cppcheck.xml" + + |