Merge "cleanup releng-macros"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Thu, 5 Jan 2017 04:54:54 +0000 (04:54 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 5 Jan 2017 04:54:54 +0000 (04:54 +0000)
1  2 
jjb/global/releng-macros.yml

@@@ -1,4 -1,15 +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
              default: '{branch}'
              description: "JJB configured GERRIT_BRANCH parameter"
  
- - wrapper:
-     name: ssh-agent-wrapper
-     wrappers:
-         - ssh-agent-credentials:
-             users:
-                 - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e'
  - scm:
      name: git-scm
      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
      triggers:
@@@ -79,6 -79,7 +79,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:
                    - branch-compare-type: 'ANT'
                      branch-pattern: '**/{branch}'
  
- - publisher:
-     name: archive-artifacts
-     publishers:
-         - archive:
-             artifacts: '{artifacts}'
-             allow-empty: true
-             fingerprint: true
-             latest-only: true
- # New Releng macros
+ - wrapper:
+     name: ssh-agent-wrapper
+     wrappers:
+         - ssh-agent-credentials:
+             users:
+                 - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e'
  
  - builder:
      name: build-html-and-pdf-docs-output
              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
  
+ - publisher:
+     name: archive-artifacts
+     publishers:
+         - archive:
+             artifacts: '{artifacts}'
+             allow-empty: true
+             fingerprint: true
+             latest-only: true