X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fglobal%2Freleng-macros.yml;h=92199d6e78b28226db391efd1a21cc85814b1cd5;hb=e12e86a0c94315675fccc577ee013953a4959fa9;hp=06152fe6bc108ff2f97f8e26c59484b9171ecbf9;hpb=8037af0e93b4c96620856e36709cae2ab3430a80;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 06152fe6b..92199d6e7 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -61,20 +61,32 @@ choosing-strategy: 'gerrit' refspec: '$GERRIT_REFSPEC' <<: *git-scm-defaults - +- scm: + name: git-scm-with-submodules + scm: + - git: + credentials-id: '$SSH_CREDENTIAL_ID' + url: '$GIT_BASE' + refspec: '' + branches: + - 'refs/heads/{branch}' + skip-tag: true + wipe-workspace: true + submodule: + recursive: true + timeout: 20 - trigger: name: 'daily-trigger-disabled' triggers: - timed: '' - trigger: - name: 'dovetail-weekly-trigger' + name: 'weekly-trigger-disabled' triggers: - - timed: 'H H * * 0' + - timed: '' -# NOTE: unused macro, but we may use this for some jobs. - trigger: - name: gerrit-trigger-patch-submitted + name: gerrit-trigger-patchset-created triggers: - gerrit: server-name: 'gerrit.opnfv.org' @@ -86,16 +98,25 @@ - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' projects: - project-compare-type: 'ANT' - project-pattern: '{name}' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: '{files}' + skip-vote: + successful: false + failed: false + unstable: false + notbuilt: false -# NOTE: unused macro, but we may use this for some jobs. - trigger: - name: gerrit-trigger-patch-merged + name: gerrit-trigger-change-merged triggers: - gerrit: server-name: 'gerrit.opnfv.org' @@ -105,10 +126,13 @@ comment-contains-value: 'remerge' projects: - project-compare-type: 'ANT' - project-pattern: '{name}' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: '{files}' - trigger: name: 'experimental' @@ -140,6 +164,14 @@ users: - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' +- wrapper: + name: fix-workspace-permissions + wrappers: + - pre-scm-buildstep: + - shell: | + #!/bin/bash + sudo chown -R $USER:$USER $WORKSPACE || exit 1 + - builder: name: build-html-and-pdf-docs-output builders: @@ -227,8 +259,11 @@ find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt +# To take advantage of this macro, have your build write +# out the file 'gerrit_comment.txt' with information to post +# back to gerrit and include this macro in the list of builders. - builder: - name: report-docs-build-result-to-gerrit + name: report-build-result-to-gerrit builders: - shell: | #!/bin/bash @@ -375,14 +410,14 @@ builders: - build-html-and-pdf-docs-output - upload-under-review-docs-to-opnfv-artifacts - - report-docs-build-result-to-gerrit + - report-build-result-to-gerrit - builder: name: upload-merged-docs builders: - build-html-and-pdf-docs-output - upload-generated-docs-to-opnfv-artifacts - - report-docs-build-result-to-gerrit + - report-build-result-to-gerrit - remove-old-docs-from-opnfv-artifacts - builder: @@ -427,7 +462,7 @@ name: clean-workspace-log builders: - shell: | - find $WORKSPACE -type f -print -name '*.log' | xargs rm -f + find $WORKSPACE -type f -name '*.log' | xargs rm -f - publisher: name: archive-artifacts @@ -437,3 +472,37 @@ allow-empty: true fingerprint: true latest-only: true + +- publisher: + name: publish-coverage + publishers: + - cobertura: + report-file: "coverage.xml" + only-stable: "true" + health-auto-update: "false" + stability-auto-update: "false" + zoom-coverage-chart: "true" + targets: + - files: + healthy: 10 + unhealthy: 20 + failing: 30 + - method: + healthy: 50 + unhealthy: 40 + failing: 30 + +# The majority of the email-ext plugin options are set to the default +# for this macro so they can be managed through Jenkins' global +# settings. +- publisher: + name: email-jenkins-admins-on-failure + publishers: + - email-ext: + content-type: text + attach-build-log: true + compress-log: true + always: false + failure: true + send-to: + - recipients