X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fglobal%2Freleng-macros.yml;h=89909b0090c7d9151bf8701080ed9b2c81d4be73;hb=76d12ac2d4bfd964f8a2851983aaa0098df380d8;hp=7647a35d34762b93c26427dff7b11241c8f2f0fc;hpb=dfbf8fafa2db6abe10e29a3781424fb77747896b;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 7647a35d3..89909b009 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -1,4 +1,15 @@ -# OLD Releng macros +# Releng macros +# +# NOTE: make sure macros are listed in execution ordered. +# +# 1. parameters/properties +# 2. scm +# 3. triggers +# 4. wrappers +# 5. prebuilders (maven only, configured like Builders) +# 6. builders (maven, freestyle, matrix, etc..) +# 7. postbuilders (maven only, configured like Builders) +# 8. publishers/reporters/notifications - parameter: name: project-parameter @@ -24,12 +35,14 @@ default: '{branch}' description: "JJB configured GERRIT_BRANCH parameter" -- wrapper: - name: ssh-agent-wrapper - wrappers: - - ssh-agent-credentials: - users: - - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' +- property: + name: logrotate-default + properties: + - build-discarder: + days-to-keep: 60 + num-to-keep: 200 + artifact-days-to-keep: 60 + artifact-num-to-keep: 200 - scm: name: git-scm @@ -59,6 +72,7 @@ triggers: - timed: '' +# NOTE: unused macro, but we may use this for some jobs. - trigger: name: gerrit-trigger-patch-submitted triggers: @@ -79,6 +93,7 @@ - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' +# NOTE: unused macro, but we may use this for some jobs. - trigger: name: gerrit-trigger-patch-merged triggers: @@ -95,16 +110,36 @@ - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' -- publisher: - name: archive-artifacts - publishers: - - archive: - artifacts: '{artifacts}' - allow-empty: true - fingerprint: true - latest-only: true +- trigger: + name: 'experimental' + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'check-experimental' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: 'tests/**' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + silent-start: true -# New Releng macros +- wrapper: + name: ssh-agent-wrapper + wrappers: + - ssh-agent-credentials: + users: + - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' - builder: name: build-html-and-pdf-docs-output @@ -366,6 +401,9 @@ set -o xtrace export PATH=$PATH:/usr/local/bin/ + # install python packages + pip install "yamllint==1.6.0" + # generate and upload lint log echo "Running yaml code on $PROJECT ..." @@ -375,8 +413,6 @@ # Get number of yaml violations. If none, this will be an # empty string: "" find . \ - -path './releng_yamllint' -prune -o \ - -path './.tox' -prune -o \ -type f -name "*.yml" -print \ -o -name "*.yaml" -print | \ xargs yamllint > yaml-violation.log || true @@ -388,3 +424,11 @@ sed -r -i '4,$s/^/ /g' lint.log fi +- publisher: + name: archive-artifacts + publishers: + - archive: + artifacts: '{artifacts}' + allow-empty: true + fingerprint: true + latest-only: true