[doctor] enable joid jobs
[releng.git] / jjb / global / releng-macros.yml
index ce307e6..7e11d92 100644 (file)
             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)"
+
+- 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
@@ -42,7 +51,7 @@
             credentials-id: '$SSH_CREDENTIAL_ID'
             url: '$GIT_BASE'
             branches:
-                - 'origin/$GERRIT_BRANCH'
+                - 'origin/$BRANCH'
             timeout: 15
 
 - scm:
     triggers:
         - timed: ''
 
+- trigger:
+    name: 'weekly-trigger-disabled'
+    triggers:
+        - timed: ''
+
 # NOTE: unused macro, but we may use this for some jobs.
 - trigger:
     name: gerrit-trigger-patch-submitted
                   - branch-compare-type: 'ANT'
                     branch-pattern: '**/{branch}'
 
+- 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
+
 - wrapper:
     name: ssh-agent-wrapper
     wrappers:
             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 ..."
 
             # 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
               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: