jjb: Add coverity jobs
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 15 Mar 2017 15:43:43 +0000 (11:43 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Wed, 15 Mar 2017 15:43:43 +0000 (11:43 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
jobs/ctf-java.yml
jobs/jabberwocky.yml
jobs/libdelorean-java.yml
scripts/common/coverity.sh

index 1ed00347159ec0a7e580ea6dfa16d89e029162eb..f2575b87548a3a611c8842924c31a19c81a574f7 100644 (file)
@@ -1,5 +1,5 @@
 - defaults:
-    name: ctf-java
+    name: ctf-java-mvn
     description: |
       Nightly build of CTF Java.
 
       - github:
           url: https://github.com/{github_user}/{github_name}
 
+- defaults:
+    name: ctf-java
+    description: |
+      Nightly build of CTF Java.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    project-type: freestyle
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor
+
+    scm:
+      - git:
+          url: git://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - origin/{version}
+          skip-tag: true
+
+    triggers:
+      - pollscm:
+          cron: "@hourly"
+
+    properties:
+      - build-discarder:
+          num-to-keep: 2
+      - github:
+          url: https://github.com/{github_user}/{github_name}
+
 
 ## Templates
 - job-template:
     name: ctf-java_{version}_build
-    defaults: ctf-java
+    defaults: ctf-java-mvn
 
     publishers:
       - warnings:
           recipients: alex@voxpopuli.im
           matrix-trigger: only-parent
 
+- job-template:
+    name: ctf-java_{version}_coverity
+    defaults: ctf-java
+    node: 'x86-64'
+
+    triggers:
+      - pollscm:
+          cron: "@daily"
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor:
+          colormap: xterm
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: ctf-java_coverity_token
+              username: COVERITY_SCAN_PROJECT_NAME
+              password: COVERITY_SCAN_TOKEN
+
+    scm:
+      - git:
+          url: git://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - origin/{version}
+          skip-tag: true
+          basedir: src/ctf-java
+
+    builders:
+      - maven-target:
+          maven-version: "default"
+          goals: "-version"
+          private-repository: true
+          settings: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig277b7a2d-b7a6-4ae4-a32d-18c02514e9e4'
+      - shell:
+          !include-raw-escape: scripts/common/coverity.sh
+
+    publishers:
+      - workspace-cleanup
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
+
+
 ## Project
 - project:
     name: ctf-java
       - master
     jobs:
       - 'ctf-java_{version}_build'
+      - 'ctf-java_{version}_coverity':
+          version: master
index 9eca7d28cfc44ae0a04603fe2f51c376dd1083dd..de6f02cd8e7a186f7f7391ba51f0595b2fc2f261 100644 (file)
@@ -1,5 +1,5 @@
 - defaults:
-    name: jabberwocky
+    name: jabberwocky-mvn
     description: |
       Nightly build of Jabberwocky.
 
       - github:
           url: https://github.com/{github_user}/{github_name}
 
+- defaults:
+    name: jabberwocky
+    description: |
+      Nightly build of Jabberwocky.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    project-type: freestyle
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor
+
+    scm:
+      - git:
+          url: git://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - origin/{version}
+          skip-tag: true
+
+    triggers:
+      - pollscm:
+          cron: "@hourly"
+
+    properties:
+      - build-discarder:
+          num-to-keep: 2
+      - github:
+          url: https://github.com/{github_user}/{github_name}
+
 
 ## Templates
 - job-template:
     name: jabberwocky_{version}_build
-    defaults: jabberwocky
+    defaults: jabberwocky-mvn
 
     publishers:
       - warnings:
           recipients: alex@voxpopuli.im
           matrix-trigger: only-parent
 
+- job-template:
+    name: jabberwocky_{version}_coverity
+    defaults: jabberwocky
+    node: 'x86-64'
+
+    triggers:
+      - pollscm:
+          cron: "@daily"
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor:
+          colormap: xterm
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: jabberwocky_coverity_token
+              username: COVERITY_SCAN_PROJECT_NAME
+              password: COVERITY_SCAN_TOKEN
+
+    scm:
+      - git:
+          url: git://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - origin/{version}
+          skip-tag: true
+          basedir: src/jabberwocky
+
+    builders:
+      - maven-target:
+          maven-version: "default"
+          goals: "-version"
+          private-repository: true
+          settings: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig277b7a2d-b7a6-4ae4-a32d-18c02514e9e4'
+      - shell:
+          !include-raw-escape: scripts/common/coverity.sh
+
+    publishers:
+      - workspace-cleanup
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
+
+
 ## Project
 - project:
     name: jabberwocky
       - master
     jobs:
       - 'jabberwocky_{version}_build'
+      - 'jabberwocky_{version}_coverity':
+          version: master
index 68ee18de56e80dba60b381463732b28c0ef4fbb5..68c28c5437b3fd07e59af25341a3220d5028441c 100644 (file)
@@ -1,5 +1,5 @@
 - defaults:
-    name: libdelorean-java
+    name: libdelorean-java-mvn
     description: |
       Nightly build of libdelorean Java.
 
       - github:
           url: https://github.com/{github_user}/{github_name}
 
+- defaults:
+    name: libdelorean-java
+    description: |
+      Nightly build of libdelorean Java.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    project-type: freestyle
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor
+
+    scm:
+      - git:
+          url: git://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - origin/{version}
+          skip-tag: true
+
+    triggers:
+      - pollscm:
+          cron: "@hourly"
+
+    properties:
+      - build-discarder:
+          num-to-keep: 2
+      - github:
+          url: https://github.com/{github_user}/{github_name}
+
 
 ## Templates
 - job-template:
     name: libdelorean-java_{version}_build
-    defaults: libdelorean-java
+    defaults: libdelorean-java-mvn
 
     publishers:
       - warnings:
           recipients: alex@voxpopuli.im
           matrix-trigger: only-parent
 
+- job-template:
+    name: libdelorean-java_{version}_coverity
+    defaults: libdelorean-java
+    node: 'x86-64'
+
+    triggers:
+      - pollscm:
+          cron: "@daily"
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor:
+          colormap: xterm
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: libdelorean-java_coverity_token
+              username: COVERITY_SCAN_PROJECT_NAME
+              password: COVERITY_SCAN_TOKEN
+
+    scm:
+      - git:
+          url: git://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - origin/{version}
+          skip-tag: true
+          basedir: src/libdelorean-java
+
+    builders:
+      - maven-target:
+          maven-version: "default"
+          goals: "-version"
+          private-repository: true
+          settings: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig277b7a2d-b7a6-4ae4-a32d-18c02514e9e4'
+      - shell:
+          !include-raw-escape: scripts/common/coverity.sh
+
+    publishers:
+      - workspace-cleanup
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
+
+
 ## Project
 - project:
     name: libdelorean-java
       - master
     jobs:
       - 'libdelorean-java_{version}_build'
+      - 'libdelorean-java_{version}_coverity':
+          version: master
index 35352cffa63f86a25495e16bfb0cc802d466a06d..dae6b5420b85505b0aae51be2c2dbfdca637475a 100755 (executable)
@@ -52,27 +52,34 @@ export TMPDIR
 case "$COVERITY_SCAN_PROJECT_NAME" in
 babeltrace)
     CONF_OPTS="--enable-python-bindings --enable-python-bindings-doc"
+    BUILD_TYPE="autotools"
     ;;
 liburcu)
     CONF_OPTS=""
+    BUILD_TYPE="autotools"
     ;;
 lttng-modules)
     CONF_OPTS=""
+    BUILD_TYPE="autotools"
     ;;
 lttng-tools)
     CONF_OPTS=""
+    BUILD_TYPE="autotools"
     ;;
 lttng-ust)
     CONF_OPTS="--enable-java-agent-all --enable-python-agent"
+    BUILD_TYPE="autotools"
     export CLASSPATH="/usr/share/java/log4j-1.2.jar"
     ;;
-lttng-scope)
+lttng-scope|ctf-java|libdelorean-java|jabberwocky)
     CONF_OPTS=""
+    BUILD_TYPE="maven"
     MVN_BIN="$HOME/tools/hudson.tasks.Maven_MavenInstallation/default/bin/mvn"
     ;;
 *)
     echo "Generic project, no configure options."
     CONF_OPTS=""
+    BUILD_TYPE="autotools"
     ;;
 esac
 
@@ -153,9 +160,8 @@ fi
 
 # Build
 echo -e "\033[33;1mRunning Coverity Scan Analysis Tool...\033[0m"
-case "$COVERITY_SCAN_PROJECT_NAME" in
-lttng-scope)
-    export
+case "$BUILD_TYPE" in
+maven)
     cov-configure --java
     cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS "$MVN_BIN" \
       -s "$MVN_SETTINGS" \
@@ -166,9 +172,13 @@ lttng-scope)
       -DskipTests \
       clean verify
     ;;
-*)
+autotools)
     cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" V=1
     ;;
+*)
+    echo "Unsupported build type: $BUILD_TYPE"
+    exit 1
+    ;;
 esac
 
 
This page took 0.027828 seconds and 4 git commands to generate.