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: csit-fail-on-crc-mismatch-parameter
39 name: FDIO_CSIT_FAIL_ON_CRC_MISMATCH
40 default: '{fail-on-crc-mismatch}'
41 description: "If true, CRC is checked, else compatibility is tested."
44 name: csit-perf-trial-duration-parameter
47 name: CSIT_PERF_TRIAL_DURATION
48 default: "{csit-perf-trial-duration}"
49 description: "Duration of a trial measurement in BMRR tests."
52 name: csit-perf-trial-multiplicity-parameter
55 name: CSIT_PERF_TRIAL_MULTIPLICITY
56 default: "{csit-perf-trial-multiplicity}"
57 description: "Number of subsamples for BMRR tests."
60 name: gerrit-csit-refspec-parameter
65 # yamllint disable-line rule:line-length
66 description: "GERRIT_REFSPEC parameter to override separately cloned CSIT repository, leave empty for autodetection / no override."
69 name: gerrit-event-comment-text-parameter
72 name: GERRIT_EVENT_COMMENT_TEXT
74 # yamllint disable-line rule:line-length
75 description: "GERRIT_EVENT_COMMENT_TEXT parameter not given by trigger"
78 name: gerrit-event-type-parameter
81 name: GERRIT_EVENT_TYPE
83 description: "GERRIT_EVENT_TYPE parameter not given by trigger"
86 name: gerrit-parameter
91 description: "JJB configured GERRIT_BRANCH parameter"
94 name: gerrit-project-parameter
99 description: "GERRIT_PROJECT parameter if not given by trigger"
102 name: gerrit-refspec-parameter
107 description: "GERRIT_REFSPEC parameter not given by trigger"
110 name: is-csit-vpp-job-parameter
113 name: IS_CSIT_VPP_JOB
114 default: '{is-csit-vpp-job}'
115 description: "Parameter is True if this is a CSIT vpp job."
122 # yamllint disable-line rule:line-length
123 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
124 description: 'Maven selector to be used by shell scripts'
127 name: maven-project-parameter
132 description: 'Maven selector to be used by shell scripts'
140 description: "OS parameter"
143 name: project-parameter
148 # yamllint disable-line rule:line-length
149 description: "JJB configured PROJECT parameter to identify a Gerrit project"
152 name: repo-name-parameter
156 default: '{repo-name}'
157 description: 'Name of repo to which to publish packaging'
160 name: stream-parameter
165 description: "Stream job parameter to be used in shell scripts."
173 description: "Topology parameter"
174 # [end] Keep 'parameter' entries ordered alphabetically, please.
177 # Keep 'scm' entries ordered alphabetically, please.
179 name: gerrit-trigger-scm
182 credentials-id: '{credentials-id}'
186 - 'origin/$GERRIT_BRANCH'
188 choosing-strategy: '{choosing-strategy}'
191 name: gerrit-trigger-scm-recursive
194 credentials-id: '{credentials-id}'
198 - 'origin/$GERRIT_BRANCH'
200 choosing-strategy: '{choosing-strategy}'
202 recursive: '{submodule-recursive}'
208 credentials-id: '{credentials-id}'
215 # [end] Keep 'scm' entries ordered alphabetically, please.
218 # Keep 'wrapper' entries ordered alphabetically, please.
228 # This wrapper is required for all jobs as it configures the wrappers
229 # needed by the fd.io infra.
230 name: fdio-infra-wrappers
234 timeout: '{build-timeout}'
235 timeout-var: 'BUILD_TIMEOUT'
238 - ssh-agent-credentials:
240 - 'jenkins-gerrit-credentials'
247 # This wrapper is used for all jobs that require no-activity timeouts
248 name: fdio-infra-wrappers-non-activity-timeout
252 timeout: '{build-timeout}'
255 - ssh-agent-credentials:
257 - 'jenkins-gerrit-credentials'
262 # [end] Keep 'wrapper' entries ordered alphabetically, please.
265 # Keep 'trigger' entries ordered alphabetically, please.
267 name: gerrit-trigger-checkstyle
268 # Comes from VPP, some verify jobs wait for checkstyle to pass.
269 # This macro is to be used for such verify jobs which are voting.
272 server-name: 'Primary'
274 - comment-added-contains-event:
275 comment-contains-value: 'checkstyle_success'
277 - project-compare-type: 'ANT'
278 project-pattern: '{name}'
280 - branch-compare-type: 'ANT'
281 branch-pattern: '**/{branch}'
284 name: gerrit-trigger-checkstyle-nonvoting
285 # Comes from VPP, some verify jobs wait for checkstyle to pass.
286 # This macro is to be used for such verify jobs which are non-voting.
289 server-name: 'Primary'
291 - comment-added-contains-event:
292 comment-contains-value: 'checkstyle_success'
294 - project-compare-type: 'ANT'
295 project-pattern: '{name}'
297 - branch-compare-type: 'ANT'
298 branch-pattern: '**/{branch}'
305 gerrit-build-successful-verified-value: 1
306 gerrit-build-failed-verified-value: 1
307 gerrit-build-unstable-verified-value: 1
308 gerrit-build-notbuilt-verified-value: 1
311 name: gerrit-trigger-csit-perftest
312 # Comes from VPP, for jobs that do performance testing using CSIT code.
315 server-name: 'Primary'
317 - comment-added-contains-event:
318 comment-contains-value: 'perftest-{node-arch}'
320 - project-compare-type: 'ANT'
321 project-pattern: '{name}'
323 - branch-compare-type: 'ANT'
324 branch-pattern: '**/{branch}'
332 name: gerrit-trigger-csit-vpp-devicetest-full
333 # Comes from CSIT, for automatic jobs running "device" tests with VPP builds.
334 # The job acts as an automatic verify job for CSIT contributions.
337 server-name: 'Primary'
339 - patchset-created-event:
340 exclude-drafts: 'true'
341 exclude-trivial-rebase: 'false'
342 exclude-no-code-change: 'false'
343 - draft-published-event
344 - comment-added-contains-event:
345 comment-contains-value: 'recheck'
346 - comment-added-contains-event:
347 comment-contains-value: 'reverify'
348 - comment-added-contains-event:
349 comment-contains-value: 'csit-devicetest'
351 - project-compare-type: 'ANT'
352 project-pattern: '{project}'
354 - branch-compare-type: 'ANT'
355 branch-pattern: '**/{branch}'
357 successful: '{skip-vote}'
358 failed: '{skip-vote}'
359 unstable: '{skip-vote}'
360 notbuilt: '{skip-vote}'
363 name: gerrit-trigger-csit-vpp-devicetest-manual
364 # Comes from CSIT, for manual jobs running "device" tests with VPP builds.
365 # The job acts as a manual (optional) verify job for CSIT contributions.
368 server-name: 'Primary'
370 - comment-added-contains-event:
371 comment-contains-value: 'csit-devicetest'
373 - project-compare-type: 'ANT'
374 project-pattern: '{project}'
376 - branch-compare-type: 'ANT'
377 branch-pattern: '**/{branch}'
379 successful: '{skip-vote}'
380 failed: '{skip-vote}'
381 unstable: '{skip-vote}'
382 notbuilt: '{skip-vote}'
385 name: gerrit-trigger-manually-triggered
388 server-name: 'Primary'
390 - comment-added-contains-event:
391 comment-contains-value: '{comment-trigger-value}'
393 - project-compare-type: 'ANT'
394 project-pattern: '{name}'
396 - branch-compare-type: 'ANT'
397 branch-pattern: '**/{branch}'
400 name: gerrit-trigger-patch-merged
403 server-name: 'Primary'
405 - change-merged-event
406 - comment-added-contains-event:
407 comment-contains-value: 'remerge'
409 - project-compare-type: 'ANT'
410 project-pattern: '{name}'
412 - branch-compare-type: 'ANT'
413 branch-pattern: '**/{branch}'
414 # Force Jenkins always vote the values it should already have voted
415 # during the prior verify phase
417 gerrit-build-started-verified-value: 1
418 gerrit-build-successful-verified-value: 1
419 gerrit-build-failed-verified-value: 1
420 gerrit-build-unstable-verified-value: 1
421 gerrit-build-notbuilt-verified-value: 1
422 gerrit-build-started-codereview-value: 0
423 gerrit-build-successful-codereview-value: 0
424 gerrit-build-failed-codereview-value: 0
425 gerrit-build-unstable-codereview-value: 0
426 gerrit-build-notbuilt-codereview-value: 0
429 name: gerrit-trigger-patch-submitted
432 server-name: 'Primary'
434 - patchset-created-event:
435 exclude-drafts: 'true'
436 exclude-trivial-rebase: 'false'
437 exclude-no-code-change: 'false'
438 - draft-published-event
439 - comment-added-contains-event:
440 comment-contains-value: 'recheck'
441 - comment-added-contains-event:
442 comment-contains-value: 'reverify'
444 - project-compare-type: 'ANT'
445 project-pattern: '{name}'
447 - branch-compare-type: 'ANT'
448 branch-pattern: '**/{branch}'
451 name: gerrit-trigger-os-patch-merged
454 server-name: 'Primary'
456 - comment-added-contains-event:
457 comment-contains-value: 'os-merge'
459 - project-compare-type: 'ANT'
460 project-pattern: '{name}'
462 - branch-compare-type: 'ANT'
463 branch-pattern: '**/{branch}'
464 # Force Jenkins always vote the values it should already have voted
465 # during the prior verify phase
467 gerrit-build-started-verified-value: 1
468 gerrit-build-successful-verified-value: 1
469 gerrit-build-failed-verified-value: 1
470 gerrit-build-unstable-verified-value: 1
471 gerrit-build-notbuilt-verified-value: 1
472 gerrit-build-started-codereview-value: 0
473 gerrit-build-successful-codereview-value: 0
474 gerrit-build-failed-codereview-value: 0
475 gerrit-build-unstable-codereview-value: 0
476 gerrit-build-notbuilt-codereview-value: 0
479 name: gerrit-trigger-os-trivial-patch-submitted
482 server-name: 'Primary'
484 - comment-added-contains-event:
485 comment-contains-value: 'os-check'
486 - comment-added-contains-event:
487 comment-contains-value: 'os-verify'
489 - project-compare-type: 'ANT'
490 project-pattern: '{name}'
492 - branch-compare-type: 'ANT'
493 branch-pattern: '**/{branch}'
496 name: gerrit-trigger-trivial-patch-submitted
499 server-name: 'Primary'
501 - patchset-created-event:
502 exclude-drafts: 'true'
503 exclude-trivial-rebase: 'false'
504 exclude-no-code-change: 'true'
505 - draft-published-event
506 - comment-added-contains-event:
507 comment-contains-value: 'recheck'
508 - comment-added-contains-event:
509 comment-contains-value: 'reverify'
511 - project-compare-type: 'ANT'
512 project-pattern: '{name}'
514 - branch-compare-type: 'ANT'
515 branch-pattern: '**/{branch}'
518 name: gerrit-trigger-trivial-patch-submitted-skip-vote
521 server-name: 'Primary'
523 - patchset-created-event:
524 exclude-drafts: 'true'
525 exclude-trivial-rebase: 'false'
526 exclude-no-code-change: 'true'
527 - draft-published-event
528 - comment-added-contains-event:
529 comment-contains-value: 'recheck'
530 - comment-added-contains-event:
531 comment-contains-value: 'reverify'
533 - project-compare-type: 'ANT'
534 project-pattern: '{name}'
536 - branch-compare-type: 'ANT'
537 branch-pattern: '**/{branch}'
545 name: gerrit-trigger-vpp-csit-devicetest-full
546 # Comes from VPP, for automated jobs running "device" tests with CSIT code.
547 # The job acts as an automatic verify job for VPP contributions.
550 server-name: 'Primary'
552 - comment-added-contains-event:
553 comment-contains-value: 'checkstyle_success'
554 - comment-added-contains-event:
555 comment-contains-value: 'devicetest'
557 - project-compare-type: 'ANT'
558 project-pattern: '{name}'
560 - branch-compare-type: 'ANT'
561 branch-pattern: '**/{branch}'
563 successful: '{skip-vote}'
564 failed: '{skip-vote}'
565 unstable: '{skip-vote}'
566 notbuilt: '{skip-vote}'
569 name: gerrit-trigger-vpp-csit-devicetest-manual
570 # Comes from VPP, for manual jobs running "device" tests with CSIT code.
571 # The job acts as a manual (optional) verify job for VPP contributions.
574 server-name: 'Primary'
576 - comment-added-contains-event:
577 comment-contains-value: 'devicetest'
579 - project-compare-type: 'ANT'
580 project-pattern: '{name}'
582 - branch-compare-type: 'ANT'
583 branch-pattern: '**/{branch}'
585 successful: '{skip-vote}'
586 failed: '{skip-vote}'
587 unstable: '{skip-vote}'
588 notbuilt: '{skip-vote}'
589 # [end] Keep 'trigger' entries ordered alphabetically, please.
592 # Keep 'publisher' entries ordered alphabetically, please.
594 name: archive-artifacts
597 artifacts: '{artifacts}'
603 name: email-notification
606 recipients: 'nobody@projectrotterdam.info'
608 content-type: default
609 # yamllint disable-line rule:line-length
610 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
612 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
614 Check console output at $BUILD_URL to view the results.
622 name: fdio-infra-shiplogs
623 # To archive things, the job will need to create an "archives" directory in
624 # the workspace and this macro will handle copying the contents of the
625 # archives directory.
627 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files to
628 # archive. You can pass globstar patterns for example "**/*.xml **/*.log" as
629 # the archive pattern. This is a space separated list of files to archive.
631 # Also ensure that the workspace is cleaned up at the end of the build.
643 - shell: !include-raw: include-raw-deploy-archives.sh
645 maven-version: '{maven-version}'
646 pom: '.archives/deploy-archives.xml'
647 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
648 settings: 'jenkins-log-archives-settings'
650 global-settings: 'global-settings'
651 global-settings-type: cfp
652 - description-setter:
653 regexp: '^Build logs: .*'
654 mark-unstable-if-failed: true
662 exec-pattern: '**/**.exec'
663 class-pattern: '**/classes'
664 source-pattern: '**/src/main/java'
665 # yamllint disable-line rule:line-length
666 exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
677 name: retry-build-on-builder-error
686 output-path: '{output-path}'
688 # [end] Keep 'publisher' entries ordered alphabetically, please.
691 # Keep 'builder' entries ordered alphabetically, please.
693 name: ci-management-check-unicode
696 $WORKSPACE/scripts/check-unicode.sh jjb/
699 name: fdio-infra-properties
702 days-to-keep: '{build-days-to-keep}'
703 num-to-keep: '{build-num-to-keep}'
706 name: packer-validate
708 - config-file-provider:
710 - file-id: 'packer-cloud-env'
712 # yamllint disable rule:line-length
716 varfiles="../packer/vars/*"
717 templates="../packer/templates/*"
718 provision="../packer/provision/*.sh"
719 for v in $varfiles; do
720 [[ "${v##*/}" =~ ^(cloud-env.*)$ ]] && continue
721 for t in $templates; do
722 export PACKER_LOG="yes" && \
723 export PACKER_LOG_PATH="packer-validate-${v##*/}-${t##*/}.log" && \
724 packer.io validate -var-file=$CLOUDENV \
726 if [ $? -ne 0 ]; then
731 for p in $provision; do
732 /bin/bash -n $p > provision-validate-${p##*/}.log 2>&1
733 if [ $? -ne 0 ]; then
742 - config-file-provider:
744 - file-id: 'packer-cloud-env'
749 export PACKER_LOG="yes" && \
750 export PACKER_LOG_PATH="packer-build.log" && \
751 packer.io build -var-file=$CLOUDENV \
752 -var-file=../packer/vars/{platform}.json \
753 ../packer/templates/{template}.json
756 name: provide-maven-settings
758 - config-file-provider:
760 - file-id: '{global-settings-file}'
761 variable: 'GLOBAL_SETTINGS_FILE'
762 - file-id: '{settings-file}'
763 variable: 'SETTINGS_FILE'
764 # [end] Keep 'builder' entries ordered alphabetically, please.