Disable non-voting VPP jobs preparing to make them periodic 03/31203/1
authorDave Wallace <dwallacelf@gmail.com>
Tue, 9 Feb 2021 22:19:58 +0000 (17:19 -0500)
committerDave Wallace <dwallacelf@gmail.com>
Tue, 9 Feb 2021 22:19:58 +0000 (17:19 -0500)
- Original attempt to convert non-voting jobs [0] failed when
  applied while non-voting jobs were executing and was reverted.
  This patch is a refactoring of [0] which disables non-voting job
  triggers.  After it has been merged and all non-voting jobs
  have completed and the trigger disabling verified, another
  patch will be pushed which enables commented out triggers.

  [0] https://gerrit.fd.io/r/c/ci-management/+/31105

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I4cc2de88e21f6ed3e2b7bb43494c760fcd27519c

jjb/vpp/vpp.yaml

index cb31378..f5e6eee 100644 (file)
 #     vpp-x86_64, vpp-aarch64, vpp-csit
 #
 # NOTES:
-#   - The 'branch-head-refspec' attribute is used for sandbox testing.
+#   - The 'branch-refspec' attribute is used for sandbox testing.
 #         Use the get_gerrit_refspec() bash function in
-#         .../ci-management/docker/scripts/lib_common.sh
+#         .../ci-management/extras/bash/sandbox_test_functions.sh
 #         to query gerrit for the refspec of HEAD in a branch.
 #         TODO: see if there is a refspec that works without requiring
 #               use of get_gerrit_refspec and hand entering the result
 #               in the WebUI 'Build With Parameters' gerrit refspec field.
-#   - Use the following to import get_gerrit_refspec into a bash shell
-#         from the ci-management directory:
-#         $ eval "$(grep -A12 get_gerrit ./docker/scripts/lib_common.sh)"
 # [end] NOTES
 
 # VPP-CHECKSTYLE-X86_64 PROJECT
           branch: 'master'
           os: 'ubuntu2004'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2009':
           branch: 'stable/2009'
           os: 'ubuntu1804'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
           os: 'ubuntu1804'
       - '2101':
           branch: 'stable/2101'
           os: 'ubuntu1804'
           repo-stream-part: 'stable.2101'
-          branch-head-refspec: ''
+          branch-refspec: ''
     executor-arch: 'x86_64'
 # [end] VPP-CHECKSTYLE-X86_64 PROJECT
 
       - 'vpp-merge-{stream}-{os}-{executor-arch}'
     project: 'vpp'
     make-parallel-jobs: '4'
-    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
     stream:
       - master:
           branch: 'master'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2009':
           branch: 'stable/2009'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2101':
           branch: 'stable/2101'
           repo-stream-part: 'stable.2101'
-          branch-head-refspec: ''
+          branch-refspec: ''
     os:
       - ubuntu1804:
           repo-os-part: 'ubuntu.bionic.main'
       - 'vpp-merge-{stream}-{os}-{executor-arch}'
     project: 'vpp'
     make-parallel-jobs: '4'
-    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
     stream:
       - '2009':
           branch: 'stable/2009'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
     os:
       - centos7:
           repo-os-part: 'centos7'
       - 'vpp-merge-{stream}-{os}-{executor-arch}'
     project: 'vpp'
     make-parallel-jobs: '4'
-    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
     stream:
       - master:
           branch: 'master'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2009':
           branch: 'stable/2009'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2101':
           branch: 'stable/2101'
           repo-stream-part: 'stable.2101'
-          branch-head-refspec: ''
+          branch-refspec: ''
     os:
       - centos8:
           repo-os-part: 'centos8'
 
 # VPP-DEBUG-X86_64 PROJECT
 #
-# Currently a Non-Voting job due to intermittent failures.
+# Currently a periodic job due to intermittent failures.
 # Limiting branches to master and 2009, since other branches
 # may not get fixes for the intermittent failures.
 #
       - 'vpp-debug-verify-{stream}-{os}-{executor-arch}'
     project: 'vpp'
     make-parallel-jobs: '4'
-    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
+    comment-trigger-value: 'debug-verify'
     stream:
       - master:
           branch: 'master'
+          # Once per hour
+          periodicity: 'H * * * *'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: 'refs/changes/01/31201/2'
       - '2009':
           branch: 'stable/2009'
+          # Once per day
+          periodicity: 'H H * * *'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
     os:
       - ubuntu2004:
           repo-os-part: 'ubuntu.focal.main'
 # Beta jobs are experimental jobs for testing new OS versions on master.
 #
 # They are only manually triggered.  Either using the Jenkins WebUI
-# 'Build with Parameters' to run a single job or adding 'vpp-beta-verify'
-# or 'vpp-beta-merge' as a comment to run all beta verify or merge jobs.
+# 'Build with Parameters' to run a single job or adding 'beta-verify'
+# or 'beta-merge' as a comment to run all beta verify or merge jobs.
 #
 # Once testing  is complete, the os is moved to the current
 # 'vpp-os-in-XXXX-x86_64' project. If no OSes are being
 #    name: vpp-beta-x86_64
 #    jobs:
 #      - 'vpp-beta-verify-{stream}-{os}-{executor-arch}':
-#          comment-trigger-value: 'vpp-beta-verify'
+#          comment-trigger-value: 'beta-verify'
 #      - 'vpp-beta-merge-{stream}-{os}-{executor-arch}':
-#          comment-trigger-value: 'vpp-beta-merge'
+#          comment-trigger-value: 'beta-merge'
 #    project: 'vpp'
 #    make-parallel-jobs: '4'
-#    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+#    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
 #    stream:
 #      - master:
 #          branch: 'master'
 #          repo-stream-part: 'master'
-#          branch-head-refspec: ''
+#          branch-refspec: ''
 #    os:
 #      - debian10:
 #          repo-os-part: 'buster'
       - master:
           branch: 'master'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2009':
           branch: 'stable/2009'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2101':
           branch: 'stable/2101'
           repo-stream-part: 'stable.2101'
-          branch-head-refspec: ''
+          branch-refspec: ''
 # [end] VPP-GCC-X86_64 PROJECT
 
 # VPP-AARCH64 PROJECT
       - 'vpp-merge-{stream}-{os}-{executor-arch}'
     project: 'vpp'
     make-parallel-jobs: '16'
-    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
     stream:
       - master:
           branch: 'master'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2009':
           branch: 'stable/2009'
           repo-stream-part: 'stable.2009'
-          branch-head-refspec: ''
+          branch-refspec: ''
       - '2101':
           branch: 'stable/2101'
           repo-stream-part: 'stable.2101'
-          branch-head-refspec: ''
+          branch-refspec: ''
     os:
       - centos8:
           repo-os-part: 'centos8'
 #
 #    project: 'vpp'
 #    make-parallel-jobs: '16'
-#    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+#    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
 #    stream:
 #      - master:
 #          branch: 'master'
 #          repo-stream-part: 'master'
-#          branch-head-refspec: ''
+#          branch-refspec: ''
 #      - '2009':
 #          branch: 'stable/2009'
 #          repo-stream-part: 'stable.2009'
-#          branch-head-refspec: ''
+#          branch-refspec: ''
 #    os:
 #      - ubuntu2004:
 #          repo-os-part: 'ubuntu.focal.main'
 # Beta jobs are experimental jobs for testing new OS versions on master.
 #
 # They are only manually triggered.  Either using the Jenkins WebUI
-# 'Build with Parameters' to run a single job or adding 'vpp-beta-verify'
-# or 'vpp-beta-merge' as a comment to run all beta verify or merge jobs.
+# 'Build with Parameters' to run a single job or adding 'beta-verify'
+# or 'beta-merge' as a comment to run all beta verify or merge jobs.
 #
 # Once testing  is complete, the os is moved to the current
 # 'vpp-os-in-XXXX-aarch64' project. If no OSes are being
           comment-trigger-value: 'beta-merge'
     project: 'vpp'
     make-parallel-jobs: '16'
-    archive-artifacts: '/tmp/vpp-failed-unittests/*/* **/core'
+    archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
     stream:
       - master:
           branch: 'master'
           repo-stream-part: 'master'
-          branch-head-refspec: ''
+          branch-refspec: ''
     os:
       - ubuntu2004:
           repo-os-part: 'ubuntu.focal.main'
     executor-arch: aarch64
 # [end] VPP-BETA-AARCH64 PROJECT
 
-# VPP-CSIT-PERPATCH PROJECT
+# VPP-CSIT-VERIFY PROJECT
 - project:
-    name: vpp-csit-perpatch
+    name: vpp-csit-verify
     jobs:
-      - 'vpp-csit-verify-device-{stream}-{device-node-arch}':
+      - 'vpp-csit-verify-device-perpatch':
           make-parallel-jobs: '32'
+          exclude:
+            - device-node-arch: '1n-tx2'
+      - 'vpp-csit-verify-device-periodic':
+          make-parallel-jobs: '32'
+          periodicity: 'H * * * *'
+          skip-vote: 'true'
+          comment-trigger-value: 'devicetest-periodic'
+          exclude:
+            - stream: '2009'
+            - stream: '2101'
+            - device-node-arch: '1n-skx'
       - 'vpp-csit-verify-perf-{stream}-{node-arch}'
     project: 'vpp'
     os: ubuntu1804
       - 1n-skx
       - 1n-tx2:
           device-executor: 'vpp-csit-arm-ubuntu18'
-          skip-vote: 'true'
     node-arch:
       - 2n-clx
       - 2n-skx
           executor: 'ubuntu1804arm-s'
           make-parallel-jobs: '16'
 
-# [end] VPP-CSIT-PERPATCH PROJECT
+# [end] VPP-CSIT-VERIFY PROJECT
 
 # VPP-CSIT-API-CRC PROJECT
 #
       - gerrit-parameter:
           branch: '{branch}'
       - gerrit-refspec-parameter:
-          refspec: '{branch-head-refspec}'
+          refspec: '{branch-refspec}'
       - os-parameter:
           os: '{os}'
       - project-parameter:
       - gerrit-parameter:
           branch: '{branch}'
       - gerrit-refspec-parameter:
-          refspec: '{branch-head-refspec}'
+          refspec: '{branch-refspec}'
       - make-parallel-jobs-parameter:
           make-parallel-jobs: '{make-parallel-jobs}'
       - os-parameter:
       - gerrit-parameter:
           branch: '{branch}'
       - gerrit-refspec-parameter:
-          refspec: '{branch-head-refspec}'
+          refspec: '{branch-refspec}'
       - make-parallel-jobs-parameter:
           make-parallel-jobs: '{make-parallel-jobs}'
       - os-parameter:
       - fdio-infra-wrappers:
           build-timeout: '{build-timeout}'
 
-    triggers:
-      # TODO: Ensure all supported jobs pass reliably before
-      #       enabling voting.
-      - gerrit-trigger-checkstyle-nonvoting:
-          name: '{project}'
-          branch: '{branch}'
+# TODO: Uncomment and merge as part 2 of process to convert non-voting
+# jobs to periodic.
+#    triggers:
+#      - timed: '{periodicity}'
+#          skip-vote:
+#            successful: true
+#            failed: true
+#            unstable: true
+#            notbuilt: true
+#      - gerrit-trigger-manually-triggered:
+#          comment-trigger-value: '{comment-trigger-value}'
+#          name: '{project}'
+#          branch: '{branch}'
 
     builders:
       - shell:
 
     publishers:
       - fdio-infra-publish
-# [end] VPP-DEBUG-VERIFY JOB TEMPLATE
+# [end] VPP-DEBUG-VERIFY-PERIODIC JOB TEMPLATE
 
 # VPP-MERGE JOB TEMPLATE
 - job-template:
       - gerrit-parameter:
           branch: '{branch}'
       - gerrit-refspec-parameter:
-          refspec: '{branch-head-refspec}'
+          refspec: '{branch-refspec}'
       - make-parallel-jobs-parameter:
           make-parallel-jobs: '{make-parallel-jobs}'
       - os-parameter:
     scm:
       - gerrit-trigger-scm:
           credentials-id: 'jenkins-gerrit-credentials'
-          refspec: ''
+          refspec: '$GERRIT_REFSPEC'
           choosing-strategy: 'default'
 
     wrappers:
       - gerrit-parameter:
           branch: '{branch}'
       - gerrit-refspec-parameter:
-          refspec: '{branch-head-refspec}'
+          refspec: '{branch-refspec}'
       - make-parallel-jobs-parameter:
           make-parallel-jobs: '{make-parallel-jobs}'
       - os-parameter:
       - fdio-infra-publish
 # [end] VPP-GCC-VERIFY JOB TEMPLATE
 
-# VPP-CSIT-VERIFY-DEVICE JOB TEMPLATE
+# VPP-CSIT-VERIFY-DEVICE-PERIODIC JOB TEMPLATE
+- job-template:
+    name: 'vpp-csit-verify-device-{stream}-{device-node-arch}'
+    id: 'vpp-csit-verify-device-periodic'
+    description: |
+      <ul>
+          <li>executor
+              <ul>
+                  <li>{device-executor}
+              </ul>
+      </ul>
+
+    project-type: freestyle
+    node: '{device-executor}'
+    concurrent: true
+    archive-artifacts: '**/csit_current/**/*.*'
+    latest-only: false
+
+    build-discarder:
+      daysToKeep: '{build-days-to-keep}'
+      numToKeep: 100
+      artifactDaysToKeep: '{build-artifact-days-to-keep}'
+      artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    # Please keep parameters in alphabetical order
+    parameters:
+      - archive-artifacts-parameter:
+          artifacts: '{archive-artifacts}'
+      - gerrit-csit-refspec-parameter
+      - gerrit-event-comment-text-parameter
+      - gerrit-event-type-parameter
+      - gerrit-parameter:
+          branch: '{branch}'
+      - gerrit-refspec-parameter
+      - make-parallel-jobs-parameter:
+          make-parallel-jobs: '{make-parallel-jobs}'
+      - os-parameter:
+          os: '{os}'
+      - project-parameter:
+          project: '{project}'
+      - repo-name-parameter:
+          repo-name: '{repo-stream-part}.ubuntu.bionic.main'
+      - stream-parameter:
+          stream: '{stream}'
+
+    scm:
+      - gerrit-trigger-scm:
+          credentials-id: 'jenkins-gerrit-credentials'
+          refspec: '$GERRIT_REFSPEC'
+          choosing-strategy: 'default'
+
+    wrappers:
+      - fdio-infra-wrappers:
+          build-timeout: '90'
+
+# TODO: Uncomment and merge as part 2 of process to convert non-voting
+# jobs to periodic.
+#    triggers:
+#      - timed: '{periodicity}'
+#          skip-vote:
+#            successful: true
+#            failed: true
+#            unstable: true
+#            notbuilt: true
+#      - gerrit-trigger-manually-triggered:
+#          comment-trigger-value: '{comment-trigger-value}'
+#          name: '{project}'
+#          branch: '{branch}'
+
+    builders:
+      - shell:
+          !include-raw-escape:
+          - ../scripts/setup_executor_env.sh
+      - shell:
+          !include-raw-escape:
+          - ../scripts/setup_vpp_ubuntu_docker_test.sh
+      - shell:
+          !include-raw-escape:
+          - ../scripts/setup_vpp_dpdk_dev_env.sh
+      - shell:
+          !include-raw-escape:
+          - ../scripts/vpp/csit-device.sh
+
+    publishers:
+      - robot-report:
+          output-path: 'archives'
+
+      - fdio-infra-shiplogs:
+          maven-version: 'mvn36'
+# [end] VPP-CSIT-VERIFY-DEVICE-PERIODIC JOB TEMPLATE
+
+# VPP-CSIT-VERIFY-DEVICE-PERPATCH JOB TEMPLATE
 - job-template:
     name: 'vpp-csit-verify-device-{stream}-{device-node-arch}'
+    id: 'vpp-csit-verify-device-perpatch'
     description: |
       <ul>
           <li>executor
 
       - fdio-infra-shiplogs:
           maven-version: 'mvn36'
-# [end] VPP-CSIT-VERIFY-DEVICE JOB TEMPLATE
+# [end] VPP-CSIT-VERIFY-DEVICE-PERPATCH JOB TEMPLATE
 
 # VPP-CSIT-VERIFY-PERF JOB TEMPLATE
 - job-template: