1 # Copyright (c) 2020 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: csit-fail-on-crc-mismatch-parameter
47 name: FDIO_CSIT_FAIL_ON_CRC_MISMATCH
48 default: '{fail-on-crc-mismatch}'
49 description: "If true, CRC is checked, else compatibility is tested."
52 name: csit-perf-trial-duration-parameter
55 name: CSIT_PERF_TRIAL_DURATION
56 default: "{csit-perf-trial-duration}"
57 description: "Duration of a trial measurement in BMRR tests."
60 name: csit-perf-trial-multiplicity-parameter
63 name: CSIT_PERF_TRIAL_MULTIPLICITY
64 default: "{csit-perf-trial-multiplicity}"
65 description: "Number of subsamples for BMRR tests."
68 name: gerrit-csit-refspec-parameter
73 # yamllint disable-line rule:line-length
74 description: "GERRIT_REFSPEC parameter to override separately cloned CSIT repository, leave empty for autodetection / no override."
77 name: gerrit-event-comment-text-parameter
80 name: GERRIT_EVENT_COMMENT_TEXT
82 # yamllint disable-line rule:line-length
83 description: "GERRIT_EVENT_COMMENT_TEXT parameter not given by trigger"
86 name: gerrit-event-type-parameter
89 name: GERRIT_EVENT_TYPE
91 description: "GERRIT_EVENT_TYPE parameter not given by trigger"
94 name: gerrit-parameter
99 description: "JJB configured GERRIT_BRANCH parameter"
102 name: gerrit-project-parameter
107 description: "GERRIT_PROJECT parameter if not given by trigger"
110 name: gerrit-refspec-parameter
115 description: "GERRIT_REFSPEC parameter not given by trigger"
118 name: is-csit-vpp-job-parameter
121 name: IS_CSIT_VPP_JOB
122 default: '{is-csit-vpp-job}'
123 description: "Parameter is True if this is a CSIT vpp job."
130 # yamllint disable-line rule:line-length
131 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
132 description: 'Maven selector to be used by shell scripts'
135 name: maven-project-parameter
140 description: 'Maven selector to be used by shell scripts'
148 description: "OS parameter"
151 name: project-parameter
156 # yamllint disable-line rule:line-length
157 description: "JJB configured PROJECT parameter to identify a Gerrit project"
160 name: repo-name-parameter
164 default: '{repo-name}'
165 description: 'Name of repo to which to publish packaging'
168 name: stream-parameter
173 description: "Stream job parameter to be used in shell scripts."
181 description: "Topology parameter"
182 # [end] Keep 'parameter' entries ordered alphabetically, please.
185 # Keep 'scm' entries ordered alphabetically, please.
187 name: gerrit-trigger-scm
190 credentials-id: '{credentials-id}'
194 - 'origin/$GERRIT_BRANCH'
196 choosing-strategy: '{choosing-strategy}'
199 name: gerrit-trigger-scm-recursive
202 credentials-id: '{credentials-id}'
206 - 'origin/$GERRIT_BRANCH'
208 choosing-strategy: '{choosing-strategy}'
210 recursive: '{submodule-recursive}'
216 credentials-id: '{credentials-id}'
223 # [end] Keep 'scm' entries ordered alphabetically, please.
226 # Keep 'wrapper' entries ordered alphabetically, please.
236 # This wrapper is required for all jobs as it configures the wrappers
237 # needed by the fd.io infra.
238 name: fdio-infra-wrappers
242 timeout: '{build-timeout}'
243 timeout-var: 'BUILD_TIMEOUT'
246 - ssh-agent-credentials:
248 - 'jenkins-gerrit-credentials'
255 # This wrapper is used for all jobs that require no-activity timeouts
256 name: fdio-infra-wrappers-non-activity-timeout
260 timeout: '{build-timeout}'
263 - ssh-agent-credentials:
265 - 'jenkins-gerrit-credentials'
270 # [end] Keep 'wrapper' entries ordered alphabetically, please.
273 # Keep 'trigger' entries ordered alphabetically, please.
275 name: gerrit-trigger-checkstyle
276 # Comes from VPP, some verify jobs wait for checkstyle to pass.
277 # This macro is to be used for such verify jobs which are voting.
280 server-name: 'Primary'
282 - comment-added-contains-event:
283 comment-contains-value: 'checkstyle_success'
285 - project-compare-type: 'ANT'
286 project-pattern: '{name}'
288 - branch-compare-type: 'ANT'
289 branch-pattern: '**/{branch}'
292 name: gerrit-trigger-checkstyle-nonvoting
293 # Comes from VPP, some verify jobs wait for checkstyle to pass.
294 # This macro is to be used for such verify jobs which are non-voting.
297 server-name: 'Primary'
299 - comment-added-contains-event:
300 comment-contains-value: 'checkstyle_success'
302 - project-compare-type: 'ANT'
303 project-pattern: '{name}'
305 - branch-compare-type: 'ANT'
306 branch-pattern: '**/{branch}'
313 gerrit-build-successful-verified-value: 1
314 gerrit-build-failed-verified-value: 1
315 gerrit-build-unstable-verified-value: 1
316 gerrit-build-notbuilt-verified-value: 1
319 name: gerrit-trigger-csit-perftest
320 # Manual trigger common for csit-vpp and vpp-csit perf jobs.
323 server-name: 'Primary'
325 - comment-added-contains-event:
326 comment-contains-value: '{trigger-word}'
328 - project-compare-type: 'ANT'
329 project-pattern: '{project}'
331 - branch-compare-type: 'ANT'
332 branch-pattern: '**/{branch}'
334 successful: '{skip-vote}'
335 failed: '{skip-vote}'
336 unstable: '{skip-vote}'
337 notbuilt: '{skip-vote}'
340 name: gerrit-trigger-csit-vpp-devicetest-full
341 # Comes from CSIT, for automatic jobs running "device" tests with VPP builds.
342 # The job acts as an automatic verify job for CSIT contributions.
345 server-name: 'Primary'
347 - patchset-created-event:
348 exclude-drafts: 'true'
349 exclude-trivial-rebase: 'false'
350 exclude-no-code-change: 'false'
351 - draft-published-event
352 - comment-added-contains-event:
353 comment-contains-value: 'recheck'
354 - comment-added-contains-event:
355 comment-contains-value: 'reverify'
356 - comment-added-contains-event:
357 comment-contains-value: 'csit-devicetest'
359 - project-compare-type: 'ANT'
360 project-pattern: '{project}'
362 - branch-compare-type: 'ANT'
363 branch-pattern: '**/{branch}'
365 successful: '{skip-vote}'
366 failed: '{skip-vote}'
367 unstable: '{skip-vote}'
368 notbuilt: '{skip-vote}'
371 name: gerrit-trigger-csit-vpp-devicetest-manual
372 # Comes from CSIT, for manual jobs running "device" tests with VPP builds.
373 # The job acts as a manual (optional) verify job for CSIT contributions.
376 server-name: 'Primary'
378 - comment-added-contains-event:
379 comment-contains-value: 'csit-devicetest'
381 - project-compare-type: 'ANT'
382 project-pattern: '{project}'
384 - branch-compare-type: 'ANT'
385 branch-pattern: '**/{branch}'
387 successful: '{skip-vote}'
388 failed: '{skip-vote}'
389 unstable: '{skip-vote}'
390 notbuilt: '{skip-vote}'
393 name: gerrit-trigger-manually-triggered
396 server-name: 'Primary'
398 - comment-added-contains-event:
399 comment-contains-value: '{comment-trigger-value}'
401 - project-compare-type: 'ANT'
402 project-pattern: '{name}'
404 - branch-compare-type: 'ANT'
405 branch-pattern: '**/{branch}'
408 name: gerrit-trigger-patch-merged
411 server-name: 'Primary'
413 - change-merged-event
414 - comment-added-contains-event:
415 comment-contains-value: 'remerge'
417 - project-compare-type: 'ANT'
418 project-pattern: '{name}'
420 - branch-compare-type: 'ANT'
421 branch-pattern: '**/{branch}'
422 # Force Jenkins always vote the values it should already have voted
423 # during the prior verify phase
425 gerrit-build-started-verified-value: 1
426 gerrit-build-successful-verified-value: 1
427 gerrit-build-failed-verified-value: 1
428 gerrit-build-unstable-verified-value: 1
429 gerrit-build-notbuilt-verified-value: 1
430 gerrit-build-started-codereview-value: 0
431 gerrit-build-successful-codereview-value: 0
432 gerrit-build-failed-codereview-value: 0
433 gerrit-build-unstable-codereview-value: 0
434 gerrit-build-notbuilt-codereview-value: 0
437 name: gerrit-trigger-patch-submitted
440 server-name: 'Primary'
442 - patchset-created-event:
443 exclude-drafts: 'true'
444 exclude-trivial-rebase: 'false'
445 exclude-no-code-change: 'false'
446 - draft-published-event
447 - comment-added-contains-event:
448 comment-contains-value: 'recheck'
449 - comment-added-contains-event:
450 comment-contains-value: 'reverify'
452 - project-compare-type: 'ANT'
453 project-pattern: '{name}'
455 - branch-compare-type: 'ANT'
456 branch-pattern: '**/{branch}'
459 name: gerrit-trigger-os-patch-merged
462 server-name: 'Primary'
464 - comment-added-contains-event:
465 comment-contains-value: 'os-merge'
467 - project-compare-type: 'ANT'
468 project-pattern: '{name}'
470 - branch-compare-type: 'ANT'
471 branch-pattern: '**/{branch}'
472 # Force Jenkins always vote the values it should already have voted
473 # during the prior verify phase
475 gerrit-build-started-verified-value: 1
476 gerrit-build-successful-verified-value: 1
477 gerrit-build-failed-verified-value: 1
478 gerrit-build-unstable-verified-value: 1
479 gerrit-build-notbuilt-verified-value: 1
480 gerrit-build-started-codereview-value: 0
481 gerrit-build-successful-codereview-value: 0
482 gerrit-build-failed-codereview-value: 0
483 gerrit-build-unstable-codereview-value: 0
484 gerrit-build-notbuilt-codereview-value: 0
487 name: gerrit-trigger-os-trivial-patch-submitted
490 server-name: 'Primary'
492 - comment-added-contains-event:
493 comment-contains-value: 'os-check'
494 - comment-added-contains-event:
495 comment-contains-value: 'os-verify'
497 - project-compare-type: 'ANT'
498 project-pattern: '{name}'
500 - branch-compare-type: 'ANT'
501 branch-pattern: '**/{branch}'
504 name: gerrit-trigger-trivial-patch-submitted
507 server-name: 'Primary'
509 - patchset-created-event:
510 exclude-drafts: 'true'
511 exclude-trivial-rebase: 'false'
512 exclude-no-code-change: 'true'
513 - draft-published-event
514 - comment-added-contains-event:
515 comment-contains-value: 'recheck'
516 - comment-added-contains-event:
517 comment-contains-value: 'reverify'
519 - project-compare-type: 'ANT'
520 project-pattern: '{name}'
522 - branch-compare-type: 'ANT'
523 branch-pattern: '**/{branch}'
526 name: gerrit-trigger-trivial-patch-submitted-skip-vote
529 server-name: 'Primary'
531 - patchset-created-event:
532 exclude-drafts: 'true'
533 exclude-trivial-rebase: 'false'
534 exclude-no-code-change: 'true'
535 - draft-published-event
536 - comment-added-contains-event:
537 comment-contains-value: 'recheck'
538 - comment-added-contains-event:
539 comment-contains-value: 'reverify'
541 - project-compare-type: 'ANT'
542 project-pattern: '{name}'
544 - branch-compare-type: 'ANT'
545 branch-pattern: '**/{branch}'
553 name: gerrit-trigger-vpp-csit-devicetest-full
554 # Comes from VPP, for automated jobs running "device" tests with CSIT code.
555 # The job acts as an automatic verify job for VPP contributions.
558 server-name: 'Primary'
560 - comment-added-contains-event:
561 comment-contains-value: 'checkstyle_success'
562 - comment-added-contains-event:
563 comment-contains-value: 'devicetest'
565 - project-compare-type: 'ANT'
566 project-pattern: '{name}'
568 - branch-compare-type: 'ANT'
569 branch-pattern: '**/{branch}'
571 successful: '{skip-vote}'
572 failed: '{skip-vote}'
573 unstable: '{skip-vote}'
574 notbuilt: '{skip-vote}'
577 name: gerrit-trigger-vpp-csit-devicetest-manual
578 # Comes from VPP, for manual jobs running "device" tests with CSIT code.
579 # The job acts as a manual (optional) verify job for VPP contributions.
582 server-name: 'Primary'
584 - comment-added-contains-event:
585 comment-contains-value: 'devicetest'
587 - project-compare-type: 'ANT'
588 project-pattern: '{name}'
590 - branch-compare-type: 'ANT'
591 branch-pattern: '**/{branch}'
593 successful: '{skip-vote}'
594 failed: '{skip-vote}'
595 unstable: '{skip-vote}'
596 notbuilt: '{skip-vote}'
597 # [end] Keep 'trigger' entries ordered alphabetically, please.
600 # Keep 'publisher' entries ordered alphabetically, please.
602 name: archive-artifacts
605 artifacts: '{artifacts}'
611 name: email-notification
614 recipients: 'nobody@projectrotterdam.info'
616 content-type: default
617 # yamllint disable-line rule:line-length
618 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
620 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
622 Check console output at $BUILD_URL to view the results.
630 name: fdio-infra-shiplogs
631 # To archive things, the job will need to create an "archives" directory in
632 # the workspace and this macro will handle copying the contents of the
633 # archives directory.
635 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files to
636 # archive. You can pass globstar patterns for example "**/*.xml **/*.log" as
637 # the archive pattern. This is a space separated list of files to archive.
639 # Also ensure that the workspace is cleaned up at the end of the build.
651 - shell: !include-raw: include-raw-deploy-archives.sh
653 maven-version: '{maven-version}'
654 pom: '.archives/deploy-archives.xml'
655 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
656 settings: 'jenkins-log-archives-settings'
658 global-settings: 'global-settings'
659 global-settings-type: cfp
660 - description-setter:
661 regexp: '^Build logs: .*'
662 mark-unstable-if-failed: true
670 exec-pattern: '**/**.exec'
671 class-pattern: '**/classes'
672 source-pattern: '**/src/main/java'
673 # yamllint disable-line rule:line-length
674 exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
685 name: retry-build-on-builder-error
694 output-path: '{output-path}'
696 # [end] Keep 'publisher' entries ordered alphabetically, please.
699 # Keep 'builder' entries ordered alphabetically, please.
701 name: ci-management-check-unicode
704 $WORKSPACE/scripts/check-unicode.sh jjb/
707 name: fdio-infra-properties
710 days-to-keep: '{build-days-to-keep}'
711 num-to-keep: '{build-num-to-keep}'
714 name: packer-validate
716 - config-file-provider:
718 - file-id: 'packer-cloud-env'
720 # yamllint disable rule:line-length
724 varfiles="../packer/vars/*"
725 templates="../packer/templates/*"
726 provision="../packer/provision/*.sh"
727 for v in $varfiles; do
728 [[ "${v##*/}" =~ ^(cloud-env.*)$ ]] && continue
729 for t in $templates; do
730 export PACKER_LOG="yes" && \
731 export PACKER_LOG_PATH="packer-validate-${v##*/}-${t##*/}.log" && \
732 packer.io validate -var-file=$CLOUDENV \
734 if [ $? -ne 0 ]; then
739 for p in $provision; do
740 /bin/bash -n $p > provision-validate-${p##*/}.log 2>&1
741 if [ $? -ne 0 ]; then
750 - config-file-provider:
752 - file-id: 'packer-cloud-env'
757 export PACKER_LOG="yes" && \
758 export PACKER_LOG_PATH="packer-build.log" && \
759 packer.io build -var-file=$CLOUDENV \
760 -var-file=../packer/vars/{platform}.json \
761 ../packer/templates/{template}.json
764 name: provide-maven-settings
766 - config-file-provider:
768 - file-id: '{global-settings-file}'
769 variable: 'GLOBAL_SETTINGS_FILE'
770 - file-id: '{settings-file}'
771 variable: 'SETTINGS_FILE'
772 # [end] Keep 'builder' entries ordered alphabetically, please.