X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fglobal%2Freleng-macros.yml;h=06152fe6bc108ff2f97f8e26c59484b9171ecbf9;hb=ee25be73d1a5c58bc98a4550f67bd3d059bacbfa;hp=7647a35d34762b93c26427dff7b11241c8f2f0fc;hpb=cd91b3544add8312b3163e991f1919da247ac73b;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 7647a35d3..06152fe6b 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 @@ -15,21 +26,23 @@ name: GS_BASE_PROXY default: build.opnfv.org/artifacts.opnfv.org/$PROJECT description: "URL to Google Storage proxy" - -- parameter: - name: gerrit-parameter - parameters: + - string: + name: BRANCH + default: '{branch}' + description: "JJB configured BRANCH parameter (e.g. master, stable/danube)" - string: name: GERRIT_BRANCH default: '{branch}' - description: "JJB configured GERRIT_BRANCH parameter" + description: "JJB configured GERRIT_BRANCH parameter (deprecated)" -- 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 @@ -38,7 +51,7 @@ credentials-id: '$SSH_CREDENTIAL_ID' url: '$GIT_BASE' branches: - - 'origin/$GERRIT_BRANCH' + - 'origin/$BRANCH' timeout: 15 - scm: @@ -55,10 +68,11 @@ - timed: '' - trigger: - name: 'weekly-trigger-disabled' + name: 'dovetail-weekly-trigger' triggers: - - timed: '' + - timed: 'H H * * 0' +# 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,35 @@ - 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 -# New Releng macros +- wrapper: + name: ssh-agent-wrapper + wrappers: + - ssh-agent-credentials: + users: + - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' - builder: name: build-html-and-pdf-docs-output @@ -366,6 +400,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 +412,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 +423,17 @@ sed -r -i '4,$s/^/ /g' lint.log fi +- builder: + name: clean-workspace-log + builders: + - shell: | + find $WORKSPACE -type f -print -name '*.log' | xargs rm -f + +- publisher: + name: archive-artifacts + publishers: + - archive: + artifacts: '{artifacts}' + allow-empty: true + fingerprint: true + latest-only: true