1 # Copyright (c) 2021 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
18 # Keep 'parameter' entries ordered alphabetically, please.
25 description: "Architecture parameter"
28 name: compiler-parameter
33 description: "CC parameter, can be gnu or clang"
36 name: make-parallel-jobs-parameter
39 name: MAKE_PARALLEL_JOBS
40 default: '{make-parallel-jobs}'
41 description: "The number of cores to use for builds."
44 name: make-test-os-parameter
48 default: '{make-test-os}'
49 description: "The OS on which 'make test' is run."
52 name: csit-fail-on-crc-mismatch-parameter
55 name: FDIO_CSIT_FAIL_ON_CRC_MISMATCH
56 default: '{fail-on-crc-mismatch}'
57 description: "If true, CRC is checked, else compatibility is tested."
60 name: csit-perf-trial-duration-parameter
63 name: CSIT_PERF_TRIAL_DURATION
64 default: "{csit-perf-trial-duration}"
65 description: "Duration of a trial measurement in BMRR tests."
68 name: csit-perf-trial-multiplicity-parameter
71 name: CSIT_PERF_TRIAL_MULTIPLICITY
72 default: "{csit-perf-trial-multiplicity}"
73 description: "Number of subsamples for BMRR tests."
76 name: gerrit-csit-refspec-parameter
81 # yamllint disable-line rule:line-length
82 description: "GERRIT_REFSPEC parameter to override separately cloned CSIT repository, leave empty for autodetection / no override."
85 name: gerrit-event-comment-text-parameter
88 name: GERRIT_EVENT_COMMENT_TEXT
90 # yamllint disable-line rule:line-length
91 description: "GERRIT_EVENT_COMMENT_TEXT parameter not given by trigger"
94 name: gerrit-event-type-parameter
97 name: GERRIT_EVENT_TYPE
99 description: "GERRIT_EVENT_TYPE parameter not given by trigger"
102 name: gerrit-parameter
107 description: "JJB configured GERRIT_BRANCH parameter"
110 name: gerrit-project-parameter
115 description: "GERRIT_PROJECT parameter if not given by trigger"
118 name: gerrit-refspec-parameter
123 description: "GERRIT_REFSPEC parameter not given by trigger"
126 name: is-csit-vpp-job-parameter
129 name: IS_CSIT_VPP_JOB
130 default: '{is-csit-vpp-job}'
131 description: "Parameter is True if this is a CSIT vpp job."
138 # yamllint disable-line rule:line-length
139 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
140 description: 'Maven selector to be used by shell scripts'
143 name: maven-project-parameter
148 description: 'Maven selector to be used by shell scripts'
156 description: "mode parameter to be used in shell scripts."
164 description: "OS parameter"
167 name: project-parameter
172 # yamllint disable-line rule:line-length
173 description: "JJB configured PROJECT parameter to identify a Gerrit project"
176 name: stream-parameter
181 description: "Stream job parameter to be used in shell scripts."
189 description: "Topology parameter"
190 # [end] Keep 'parameter' entries ordered alphabetically, please.
193 # Keep 'scm' entries ordered alphabetically, please.
195 name: gerrit-trigger-scm
198 credentials-id: '{credentials-id}'
202 - 'origin/$GERRIT_BRANCH'
204 choosing-strategy: '{choosing-strategy}'
207 name: gerrit-trigger-scm-recursive
210 credentials-id: '{credentials-id}'
214 - 'origin/$GERRIT_BRANCH'
216 choosing-strategy: '{choosing-strategy}'
218 recursive: '{submodule-recursive}'
224 credentials-id: '{credentials-id}'
231 # [end] Keep 'scm' entries ordered alphabetically, please.
234 # Keep 'wrapper' entries ordered alphabetically, please.
244 # This wrapper is required for all jobs as it configures the wrappers
245 # needed by the fd.io infra.
246 name: fdio-infra-wrappers
250 timeout: '{build-timeout}'
251 timeout-var: 'BUILD_TIMEOUT'
254 - ssh-agent-credentials:
256 - 'jenkins-gerrit-credentials'
263 # This wrapper is used for all jobs that require no-activity timeouts
264 name: fdio-infra-wrappers-non-activity-timeout
268 timeout: '{build-timeout}'
271 - ssh-agent-credentials:
273 - 'jenkins-gerrit-credentials'
278 # [end] Keep 'wrapper' entries ordered alphabetically, please.
281 # Keep 'trigger' entries ordered alphabetically, please.
283 name: gerrit-trigger-checkstyle
284 # Comes from VPP, some verify jobs wait for checkstyle to pass.
285 # This macro is to be used for such verify jobs which are voting.
288 server-name: 'Primary'
290 - comment-added-contains-event:
291 comment-contains-value: 'checkstyle_success'
293 - project-compare-type: 'ANT'
294 project-pattern: '{name}'
296 - branch-compare-type: 'ANT'
297 branch-pattern: '**/{branch}'
300 name: gerrit-trigger-checkstyle-nonvoting
301 # Comes from VPP, some verify jobs wait for checkstyle to pass.
302 # This macro is to be used for such verify jobs which are non-voting.
305 server-name: 'Primary'
307 - comment-added-contains-event:
308 comment-contains-value: 'checkstyle_success'
310 - project-compare-type: 'ANT'
311 project-pattern: '{name}'
313 - branch-compare-type: 'ANT'
314 branch-pattern: '**/{branch}'
321 gerrit-build-successful-verified-value: 1
322 gerrit-build-failed-verified-value: 1
323 gerrit-build-unstable-verified-value: 1
324 gerrit-build-notbuilt-verified-value: 1
327 name: gerrit-trigger-csit-perftest
328 # Manual trigger common for csit-vpp and vpp-csit perf jobs.
331 server-name: 'Primary'
333 - comment-added-contains-event:
334 comment-contains-value: '{trigger-word}'
336 - project-compare-type: 'ANT'
337 project-pattern: '{project}'
339 - branch-compare-type: 'ANT'
340 branch-pattern: '**/{branch}'
342 successful: '{skip-vote}'
343 failed: '{skip-vote}'
344 unstable: '{skip-vote}'
345 notbuilt: '{skip-vote}'
348 name: gerrit-trigger-csit-vpp-devicetest-full
349 # Comes from CSIT, for automatic jobs running device tests with VPP builds.
350 # The job acts as an automatic verify job for CSIT contributions.
353 server-name: 'Primary'
355 # The main way the job is triggered automatically on patch upload.
356 # Gated by tox job, so we do not spend resources on WiP changes.
357 - comment-added-contains-event:
358 comment-contains-value: 'tox_success'
359 # Manual trigger to allow testing WiP changes with selected tags.
360 - comment-added-contains-event:
361 comment-contains-value: 'csit-devicetest'
362 # A comment with "recheck" restarts tox job, so no condition here.
364 - project-compare-type: 'ANT'
365 project-pattern: '{project}'
367 - branch-compare-type: 'ANT'
368 branch-pattern: '**/{branch}'
370 successful: '{skip-vote}'
371 failed: '{skip-vote}'
372 unstable: '{skip-vote}'
373 notbuilt: '{skip-vote}'
376 name: gerrit-trigger-csit-vpp-devicetest-manual
377 # Comes from CSIT, for manual jobs running "device" tests with VPP builds.
378 # The job acts as a manual (optional) verify job for CSIT contributions.
381 server-name: 'Primary'
383 - comment-added-contains-event:
384 comment-contains-value: 'csit-devicetest'
386 - project-compare-type: 'ANT'
387 project-pattern: '{project}'
389 - branch-compare-type: 'ANT'
390 branch-pattern: '**/{branch}'
392 successful: '{skip-vote}'
393 failed: '{skip-vote}'
394 unstable: '{skip-vote}'
395 notbuilt: '{skip-vote}'
398 name: gerrit-trigger-manually-triggered
401 server-name: 'Primary'
403 - comment-added-contains-event:
404 comment-contains-value: '{comment-trigger-value}'
406 - project-compare-type: 'ANT'
407 project-pattern: '{name}'
409 - branch-compare-type: 'ANT'
410 branch-pattern: '**/{branch}'
413 name: gerrit-trigger-patch-merged
416 server-name: 'Primary'
418 - change-merged-event
419 - comment-added-contains-event:
420 comment-contains-value: 'remerge'
422 - project-compare-type: 'ANT'
423 project-pattern: '{name}'
425 - branch-compare-type: 'ANT'
426 branch-pattern: '**/{branch}'
427 # Force Jenkins always vote the values it should already have voted
428 # during the prior verify phase
430 gerrit-build-started-verified-value: 1
431 gerrit-build-successful-verified-value: 1
432 gerrit-build-failed-verified-value: 1
433 gerrit-build-unstable-verified-value: 1
434 gerrit-build-notbuilt-verified-value: 1
435 gerrit-build-started-codereview-value: 0
436 gerrit-build-successful-codereview-value: 0
437 gerrit-build-failed-codereview-value: 0
438 gerrit-build-unstable-codereview-value: 0
439 gerrit-build-notbuilt-codereview-value: 0
442 name: gerrit-trigger-patch-submitted
445 server-name: 'Primary'
447 - patchset-created-event:
448 exclude-drafts: 'true'
449 exclude-trivial-rebase: 'false'
450 exclude-no-code-change: 'false'
451 - draft-published-event
452 - comment-added-contains-event:
453 comment-contains-value: 'recheck'
454 - comment-added-contains-event:
455 comment-contains-value: 'reverify'
457 - project-compare-type: 'ANT'
458 project-pattern: '{name}'
460 - branch-compare-type: 'ANT'
461 branch-pattern: '**/{branch}'
464 name: gerrit-trigger-os-patch-merged
467 server-name: 'Primary'
469 - comment-added-contains-event:
470 comment-contains-value: 'os-merge'
472 - project-compare-type: 'ANT'
473 project-pattern: '{name}'
475 - branch-compare-type: 'ANT'
476 branch-pattern: '**/{branch}'
477 # Force Jenkins always vote the values it should already have voted
478 # during the prior verify phase
480 gerrit-build-started-verified-value: 1
481 gerrit-build-successful-verified-value: 1
482 gerrit-build-failed-verified-value: 1
483 gerrit-build-unstable-verified-value: 1
484 gerrit-build-notbuilt-verified-value: 1
485 gerrit-build-started-codereview-value: 0
486 gerrit-build-successful-codereview-value: 0
487 gerrit-build-failed-codereview-value: 0
488 gerrit-build-unstable-codereview-value: 0
489 gerrit-build-notbuilt-codereview-value: 0
492 name: gerrit-trigger-os-trivial-patch-submitted
495 server-name: 'Primary'
497 - comment-added-contains-event:
498 comment-contains-value: 'os-check'
499 - comment-added-contains-event:
500 comment-contains-value: 'os-verify'
502 - project-compare-type: 'ANT'
503 project-pattern: '{name}'
505 - branch-compare-type: 'ANT'
506 branch-pattern: '**/{branch}'
509 name: gerrit-trigger-trivial-patch-submitted
512 server-name: 'Primary'
514 - patchset-created-event:
515 exclude-drafts: 'true'
516 exclude-trivial-rebase: 'false'
517 exclude-no-code-change: 'true'
518 - draft-published-event
519 - comment-added-contains-event:
520 comment-contains-value: 'recheck'
521 - comment-added-contains-event:
522 comment-contains-value: 'reverify'
524 - project-compare-type: 'ANT'
525 project-pattern: '{name}'
527 - branch-compare-type: 'ANT'
528 branch-pattern: '**/{branch}'
531 name: gerrit-trigger-trivial-patch-submitted-skip-vote
534 server-name: 'Primary'
536 - patchset-created-event:
537 exclude-drafts: 'true'
538 exclude-trivial-rebase: 'false'
539 exclude-no-code-change: 'true'
540 - draft-published-event
541 - comment-added-contains-event:
542 comment-contains-value: 'recheck'
543 - comment-added-contains-event:
544 comment-contains-value: 'reverify'
546 - project-compare-type: 'ANT'
547 project-pattern: '{name}'
549 - branch-compare-type: 'ANT'
550 branch-pattern: '**/{branch}'
558 name: gerrit-trigger-vpp-csit-devicetest-full
559 # Comes from VPP, for automated jobs running "device" tests with CSIT code.
560 # The job acts as an automatic verify job for VPP contributions.
563 server-name: 'Primary'
565 - comment-added-contains-event:
566 comment-contains-value: 'checkstyle_success'
567 - comment-added-contains-event:
568 comment-contains-value: 'devicetest'
570 - project-compare-type: 'ANT'
571 project-pattern: '{name}'
573 - branch-compare-type: 'ANT'
574 branch-pattern: '**/{branch}'
576 successful: '{skip-vote}'
577 failed: '{skip-vote}'
578 unstable: '{skip-vote}'
579 notbuilt: '{skip-vote}'
582 name: gerrit-trigger-vpp-csit-devicetest-manual
583 # Comes from VPP, for manual jobs running "device" tests with CSIT code.
584 # The job acts as a manual (optional) verify job for VPP contributions.
587 server-name: 'Primary'
589 - comment-added-contains-event:
590 comment-contains-value: 'devicetest'
592 - project-compare-type: 'ANT'
593 project-pattern: '{name}'
595 - branch-compare-type: 'ANT'
596 branch-pattern: '**/{branch}'
598 successful: '{skip-vote}'
599 failed: '{skip-vote}'
600 unstable: '{skip-vote}'
601 notbuilt: '{skip-vote}'
602 # [end] Keep 'trigger' entries ordered alphabetically, please.
605 # Keep 'publisher' entries ordered alphabetically, please.
607 name: archive-artifacts
610 artifacts: '{artifacts}'
616 name: csit-trending-failed
619 # yamllint disable-line rule:line-length
620 recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
623 subject: '{branch}: Failed tests as of $BUILD_TIMESTAMP'
624 # yamllint disable-line rule:line-length
626 Following tests failed in the last trending job runs, listed per testbed type.
628 ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-failed-tests.txt"}}
633 name: csit-trending-failed-job
636 # yamllint disable-line rule:line-length
637 recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
640 subject: '{branch}: The build number $BUILD_NUMBER of the job $JOB_NAME failed'
641 # yamllint disable-line rule:line-length
643 For more information see $BUILD_URL.
648 name: csit-trending-progressions
651 # yamllint disable-line rule:line-length
652 recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
655 subject: '{branch}: Progressions as of $BUILD_TIMESTAMP'
656 # yamllint disable-line rule:line-length
658 Following progressions occured in the last trending job runs, listed per testbed type.
660 ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-progressions.txt"}}
665 name: csit-trending-regressions
668 # yamllint disable-line rule:line-length
669 recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
672 subject: '{branch}: Regressions as of $BUILD_TIMESTAMP'
673 # yamllint disable-line rule:line-length
675 Following regressions occured in the last trending job runs, listed per testbed type.
677 ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-regressions.txt"}}
682 name: email-notification
685 recipients: 'nobody@projectrotterdam.info'
687 content-type: default
688 # yamllint disable-line rule:line-length
689 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
691 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
693 Check console output at $BUILD_URL to view the results.
701 name: fdio-infra-publish-docs
702 # macro to finish up a build.
704 # Handles the following:
705 # - Shipping docs S3 logs repository
706 # - Cleanup workspace
718 - fdio-infra-ship-docs
719 mark-unstable-if-failed: true
722 # Do not clean up *.jenkins-trigger files for jobs that use a
723 # properties file as input for triggering another build.
724 - "**/*.jenkins-trigger"
728 name: fdio-infra-publish
729 # macro to finish up a build.
731 # Handles the following:
732 # - Shipping logs to Nexus or S3 logs repository
733 # - Cleanup workspace
745 - shell: !include-raw: scripts/post_build_executor_info.sh
746 - shell: !include-raw: scripts/post_build_deploy_archives.sh
747 - fdio-infra-ship-backup-logs
748 - fdio-infra-ship-logs
749 mark-unstable-if-failed: true
752 # Do not clean up *.jenkins-trigger files for jobs that use a
753 # properties file as input for triggering another build.
754 - "**/*.jenkins-trigger"
761 exec-pattern: '**/**.exec'
762 class-pattern: '**/classes'
763 source-pattern: '**/src/main/java'
764 # yamllint disable-line rule:line-length
765 exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
776 name: retry-build-on-builder-error
785 output-path: '{output-path}'
788 # [end] Keep 'publisher' entries ordered alphabetically, please.
791 # Keep 'builder' entries ordered alphabetically, please.
793 name: ci-management-check-unicode
796 $WORKSPACE/scripts/check-unicode.sh jjb/
799 name: fdio-infra-ship-backup-logs
801 - config-file-provider:
803 - file-id: "jenkins-s3-log-ship"
804 target: $HOME/.aws/credentials
805 - shell: !include-raw:
806 - scripts/publish_library_py.sh
807 - shell: !include-raw:
808 - scripts/publish_backup_logs.sh
809 - shell: !include-raw:
810 - ../global-jjb/shell/logs-clear-credentials.sh
813 name: fdio-infra-ship-docs
815 - config-file-provider:
817 - file-id: "jenkins-s3-docs-ship"
818 target: $HOME/.aws/credentials
819 - shell: !include-raw:
820 - scripts/terraform_s3_docs_ship.sh
821 - shell: !include-raw:
822 - scripts/publish_docs.sh
823 - shell: !include-raw:
824 - ../global-jjb/shell/logs-clear-credentials.sh
827 name: fdio-infra-ship-logs
829 - config-file-provider:
831 - file-id: "jenkins-s3-log-ship"
832 target: $HOME/.aws/credentials
833 - shell: !include-raw:
834 - scripts/publish_library_py.sh
835 - shell: !include-raw:
836 - scripts/publish_logs.sh
837 - shell: !include-raw:
838 - ../global-jjb/shell/logs-clear-credentials.sh
839 - description-setter:
840 regexp: "(^S3 build logs: .*)"
843 name: packer-validate
845 - config-file-provider:
847 - file-id: 'packer-cloud-env'
849 # yamllint disable rule:line-length
853 varfiles="../packer/vars/*"
854 templates="../packer/templates/*"
855 provision="../packer/provision/*.sh"
856 for v in $varfiles; do
857 [[ "${v##*/}" =~ ^(cloud-env.*)$ ]] && continue
858 for t in $templates; do
859 export PACKER_LOG="yes" && \
860 export PACKER_LOG_PATH="packer-validate-${v##*/}-${t##*/}.log" && \
861 packer.io validate -var-file=$CLOUDENV \
863 if [ $? -ne 0 ]; then
868 for p in $provision; do
869 /bin/bash -n $p > provision-validate-${p##*/}.log 2>&1
870 if [ $? -ne 0 ]; then
879 - config-file-provider:
881 - file-id: 'packer-cloud-env'
886 export PACKER_LOG="yes" && \
887 export PACKER_LOG_PATH="packer-build.log" && \
888 packer.io build -var-file=$CLOUDENV \
889 -var-file=../packer/vars/{platform}.json \
890 ../packer/templates/{template}.json
893 name: provide-maven-settings
895 - config-file-provider:
897 - file-id: '{global-settings-file}'
898 variable: 'GLOBAL_SETTINGS_FILE'
899 - file-id: '{settings-file}'
900 variable: 'SETTINGS_FILE'
901 # [end] Keep 'builder' entries ordered alphabetically, please.