Temporarily disable apex daily
[releng.git] / jjb / apex / apex.yaml.j2
1 ---
2 - project:
3     name: 'apex'
4     project: 'apex'
5     jobs:
6       - 'apex-fetch-logs-{stream}'
7       - 'apex-runner-cperf-{stream}'
8       - 'apex-virtual-{stream}'
9       - 'apex-deploy-{platform}-{stream}'
10       - 'apex-daily-{stream}'
11       - 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}'
12       - 'apex-fdio-promote-daily-{stream}'
13       - 'apex-{scenario}-baremetal-{scenario_stream}'
14       - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
15       - 'apex-upload-snapshot'
16       - 'apex-create-snapshot'
17       - 'apex-fetch-snap-info'
18       - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
19     # stream:    branch with - in place of / (eg. stable-arno)
20     # branch:    branch (eg. stable/arno)
21     stream:
22       - master: &master
23           branch: 'master'
24           gs-pathname: ''
25           build-slave: 'apex-build-master'
26           virtual-slave: 'apex-virtual-master'
27           baremetal-slave: 'apex-baremetal-master'
28           verify-scenario: 'os-nosdn-nofeature-noha'
29           scenario_stream: 'master'
30           disable_daily: true
31           disable_promote: true
32       - hunter: &hunter
33           branch: 'stable/hunter'
34           gs-pathname: '/hunter'
35           build-slave: 'apex-build-master'
36           virtual-slave: 'apex-virtual-master'
37           baremetal-slave: 'apex-baremetal-master'
38           verify-scenario: 'os-nosdn-nofeature-ha'
39           scenario_stream: 'hunter'
40           disable_daily: true
41           disable_promote: true
42       - gambia: &gambia
43           branch: 'stable/gambia'
44           gs-pathname: '/gambia'
45           build-slave: 'apex-build-master'
46           virtual-slave: 'apex-virtual-master'
47           baremetal-slave: 'apex-baremetal-master'
48           verify-scenario: 'os-nosdn-nofeature-ha'
49           scenario_stream: 'gambia'
50           disable_daily: true
51           disable_promote: true
52       - fraser: &fraser
53           branch: 'stable/fraser'
54           gs-pathname: '/fraser'
55           build-slave: 'apex-build-master'
56           virtual-slave: 'apex-virtual-master'
57           baremetal-slave: 'apex-baremetal-master'
58           verify-scenario: 'os-nosdn-nofeature-ha'
59           scenario_stream: 'fraser'
60           disable_daily: true
61           disable_promote: true
62       - euphrates: &euphrates
63           branch: 'stable/euphrates'
64           gs-pathname: '/euphrates'
65           build-slave: 'apex-build-master'
66           virtual-slave: 'apex-virtual-master'
67           baremetal-slave: 'apex-baremetal-master'
68           verify-scenario: 'os-odl-nofeature-ha'
69           scenario_stream: 'euphrates'
70           disable_daily: true
71           disable_promote: true
72       - danube: &danube
73           branch: 'stable/danube'
74           gs-pathname: '/danube'
75           build-slave: 'apex-build-danube'
76           virtual-slave: 'apex-virtual-danube'
77           baremetal-slave: 'apex-baremetal-danube'
78           verify-scenario: 'os-odl_l3-nofeature-ha'
79           scenario_stream: 'danube'
80           disabled: true
81           disable_daily: true
82           disable_promote: true
83
84     scenario:
85       {%- for stream in scenarios %}
86       {%- for scenario in scenarios[stream] %}
87       - '{{scenario}}':
88           <<: *{{stream}}
89       {%- endfor %}
90       {%- endfor %}
91
92     platform:
93       - 'baremetal'
94       - 'virtual'
95
96     os_version:
97       - 'queens':
98           os_scenario: 'nofeature'
99           odl_branch: 'stable/oxygen'
100       - 'rocky':
101           os_scenario: 'rocky'
102           odl_branch: 'stable/oxygen'
103       - 'master':
104           os_scenario: 'nofeature'
105           odl_branch: 'stable/fluorine'
106
107     topology:
108       - 'noha'
109       - 'ha'
110       - 'noha-allinone'
111
112     snap_type:
113       - csit:
114           sdn: 'odl'
115       - functest:
116           sdn: 'nosdn'
117 # Fetch Logs Job
118 - job-template:
119     name: 'apex-fetch-logs-{stream}'
120
121     concurrent: true
122
123     disabled: false
124     scm:
125       - git-scm-gerrit
126     parameters:
127       - project-parameter:
128           project: '{project}'
129           branch: '{branch}'
130       - apex-parameter:
131           gs-pathname: '{gs-pathname}'
132     # yamllint enable rule:line-length
133     properties:
134       - logrotate-default
135       - throttle:
136           max-per-node: 1
137           max-total: 10
138           option: 'project'
139
140     builders:
141       - 'apex-fetch-logs'
142
143 - job-template:
144     name: 'apex-runner-cperf-{stream}'
145
146     # runner cperf job
147     project-type: 'multijob'
148     node: 'intel-pod2'
149
150     disabled: false
151
152     parameters:
153       - apex-parameter:
154           gs-pathname: '{gs-pathname}'
155       - project-parameter:
156           project: '{project}'
157           branch: '{branch}'
158       - string:
159           name: GIT_BASE
160           default: https://gerrit.opnfv.org/gerrit/$PROJECT
161           description: "Used for overriding the GIT URL coming from parameters macro."
162
163     scm:
164       - git-scm
165
166     properties:
167       - logrotate-default
168       - build-blocker:
169           use-build-blocker: false
170           blocking-level: 'NODE'
171           blocking-jobs:
172             - 'apex-deploy.*'
173       - throttle:
174           max-per-node: 1
175           max-total: 10
176           option: 'project'
177
178     builders:
179       - description-setter:
180           description: "Deployed on $NODE_NAME"
181       - multijob:
182           name: 'Baremetal Deploy'
183           condition: ALWAYS
184           projects:
185             - name: 'apex-deploy-baremetal-{stream}'
186               node-parameters: false
187               current-parameters: true
188               predefined-parameters: |
189                 GERRIT_BRANCH=$GERRIT_BRANCH
190                 GERRIT_REFSPEC=
191                 OPNFV_CLEAN=yes
192                 DEPLOY_SCENARIO={verify-scenario}
193               kill-phase-on: FAILURE
194               abort-all-job: true
195               git-revision: false
196       - multijob:
197           name: CPERF
198           condition: SUCCESSFUL
199           projects:
200             - name: 'cperf-apex-intel-pod2-daily-master'
201               node-parameters: true
202               current-parameters: false
203               predefined-parameters:
204                 DEPLOY_SCENARIO={verify-scenario}
205               kill-phase-on: NEVER
206               abort-all-job: false
207               git-revision: false
208
209 # Deploy job
210 - job-template:
211     name: 'apex-deploy-{platform}-{stream}'
212
213     concurrent: true
214
215     disabled: false
216     quiet-period: 30
217     scm:
218       - git-scm-gerrit
219
220     wrappers:
221       - timeout:
222           timeout: 140
223           fail: true
224
225     parameters:
226       - '{project}-{platform}-{stream}-defaults'
227       - project-parameter:
228           project: '{project}'
229           branch: '{branch}'
230       - apex-parameter:
231           gs-pathname: '{gs-pathname}'
232       - string:
233           name: DEPLOY_SCENARIO
234           default: '{verify-scenario}'
235           description: "Scenario to deploy with."
236       # yamllint disable rule:line-length
237       - string:
238           name: OPNFV_CLEAN
239           default: 'no'
240           description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
241
242     # yamllint enable rule:line-length
243     properties:
244       - logrotate-default
245       - build-blocker:
246           use-build-blocker: true
247           blocking-level: 'NODE'
248           blocking-jobs:
249             - 'apex-deploy.*'
250             - 'functest.*'
251             - 'yardstick.*'
252             - 'dovetail.*'
253             - 'storperf.*'
254             - 'odl-netvirt.*'
255       - throttle:
256           max-per-node: 1
257           max-total: 10
258           option: 'project'
259
260     builders:
261       - description-setter:
262           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
263       - 'apex-download-artifact'
264       - 'apex-deploy'
265       - 'clean-workspace'
266
267
268 # Virtual Deploy and Test
269 - job-template:
270     name: 'apex-virtual-{stream}'
271
272     project-type: 'multijob'
273
274     concurrent: true
275
276     disabled: false
277
278     scm:
279       - git-scm-gerrit
280
281     parameters:
282       - '{project}-defaults'
283       - '{project}-virtual-{stream}-defaults'
284       - 'functest-suite-parameter'
285       - project-parameter:
286           project: '{project}'
287           branch: '{branch}'
288       - apex-parameter:
289           gs-pathname: '{gs-pathname}'
290       - string:
291           name: DEPLOY_SCENARIO
292           default: '{verify-scenario}'
293           description: "Scenario to deploy with."
294       - string:
295           name: ARTIFACT_VERSION
296           default: dev
297           description: "Used for overriding the ARTIFACT_VERSION"
298
299     properties:
300       - logrotate-default
301       - build-blocker:
302           use-build-blocker: true
303           blocking-level: 'NODE'
304           blocking-jobs:
305             - 'apex-runner.*'
306             - 'apex-run.*'
307             - 'apex-virtual-.*'
308             - 'apex-verify-gate-.*'
309             - 'odl-netvirt.*'
310             - 'apex-.*-promote.*'
311       - throttle:
312           max-per-node: 1
313           max-total: 10
314           option: 'project'
315
316     builders:
317       - description-setter:
318           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
319       - multijob:
320           name: deploy-virtual
321           condition: SUCCESSFUL
322           projects:
323             - name: 'apex-deploy-virtual-{stream}'
324               current-parameters: false
325               predefined-parameters: |
326                 ARTIFACT_VERSION=$ARTIFACT_VERSION
327                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
328                 OPNFV_CLEAN=yes
329                 GERRIT_BRANCH=$GERRIT_BRANCH
330                 GERRIT_REFSPEC=$GERRIT_REFSPEC
331                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
332                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
333                 PROMOTE=$PROMOTE
334               node-parameters: true
335               kill-phase-on: FAILURE
336               abort-all-job: true
337               git-revision: true
338       - multijob:
339           name: functest-smoke
340           condition: ALWAYS
341           projects:
342             - name: 'functest-apex-virtual-suite-{stream}'
343               current-parameters: false
344               predefined-parameters: |
345                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
346                 FUNCTEST_MODE=$FUNCTEST_MODE
347                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
348                 GERRIT_BRANCH=$GERRIT_BRANCH
349                 GERRIT_REFSPEC=$GERRIT_REFSPEC
350                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
351                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
352               node-parameters: true
353               kill-phase-on: NEVER
354               abort-all-job: true
355               git-revision: false
356       - multijob:
357           name: apex-fetch-logs
358           projects:
359             - name: 'apex-fetch-logs-{stream}'
360               current-parameters: false
361               predefined-parameters: |
362                 GERRIT_BRANCH=$GERRIT_BRANCH
363                 GERRIT_REFSPEC=$GERRIT_REFSPEC
364                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
365                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
366               node-parameters: true
367               kill-phase-on: NEVER
368               abort-all-job: true
369               git-revision: false
370
371 # Baremetal Deploy and Test
372 - job-template:
373     name: 'apex-{scenario}-baremetal-{scenario_stream}'
374
375     project-type: 'multijob'
376
377     disabled: false
378
379     scm:
380       - git-scm
381
382     parameters:
383       - '{project}-defaults'
384       - '{project}-baremetal-{scenario_stream}-defaults'
385       - project-parameter:
386           project: '{project}'
387           branch: '{branch}'
388       - apex-parameter:
389           gs-pathname: '{gs-pathname}'
390       - string:
391           name: DEPLOY_SCENARIO
392           default: '{scenario}'
393           description: "Scenario to deploy with."
394
395     properties:
396       - logrotate-default
397       - build-blocker:
398           use-build-blocker: true
399           blocking-level: 'NODE'
400           blocking-jobs:
401             - 'apex-verify.*'
402             - 'apex-runner.*'
403             - 'apex-.*-promote.*'
404             - 'apex-run.*'
405             - 'apex-.+-baremetal-.+'
406       - throttle:
407           max-per-node: 1
408           max-total: 10
409           option: 'project'
410
411     builders:
412       - description-setter:
413           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
414       - multijob:
415           name: 'Baremetal Deploy'
416           condition: SUCCESSFUL
417           execution-type: SEQUENTIALLY
418           projects:
419             - name: 'apex-deploy-baremetal-{scenario_stream}'
420               node-parameters: true
421               current-parameters: true
422               predefined-parameters: |
423                 OPNFV_CLEAN=yes
424                 GERRIT_BRANCH=$GERRIT_BRANCH
425                 GERRIT_REFSPEC=
426                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
427               kill-phase-on: NEVER
428               abort-all-job: true
429               git-revision: false
430             - name: 'apex-fetch-logs-{scenario_stream}'
431               current-parameters: true
432               predefined-parameters: |
433                 GERRIT_BRANCH=$GERRIT_BRANCH
434                 GERRIT_REFSPEC=
435               node-parameters: true
436               kill-phase-on: NEVER
437               abort-all-job: true
438               git-revision: false
439       - shell:
440           !include-raw-escape: ./apex-functest-scenario.sh
441       - inject:
442           properties-file: functest_scenario
443           override-build-parameters: true
444       - multijob:
445           name: 'OPNFV Test Suite'
446           condition: ALWAYS
447           projects:
448             - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
449               node-parameters: true
450               current-parameters: false
451               predefined-parameters: |
452                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
453                 DOCKER_TAG=$DOCKER_TAG
454               kill-phase-on: NEVER
455               abort-all-job: true
456               git-revision: false
457       - multijob:
458           name: apex-fetch-logs
459           projects:
460             - name: 'apex-fetch-logs-{scenario_stream}'
461               current-parameters: true
462               predefined-parameters: |
463                 GERRIT_BRANCH=$GERRIT_BRANCH
464                 GERRIT_REFSPEC=
465               node-parameters: true
466               kill-phase-on: NEVER
467               abort-all-job: true
468               git-revision: false
469     publishers:
470       - groovy-postbuild:
471           script:
472             !include-raw-escape: ./update-build-result.groovy
473
474 # Baremetal test job
475 - job-template:
476     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
477
478     project-type: 'multijob'
479
480     disabled: false
481
482     parameters:
483       - '{project}-defaults'
484       - '{project}-baremetal-{scenario_stream}-defaults'
485       - project-parameter:
486           project: '{project}'
487           branch: '{branch}'
488       - apex-parameter:
489           gs-pathname: '{gs-pathname}'
490       - string:
491           name: DEPLOY_SCENARIO
492           default: '{scenario}'
493           description: "Scenario to deploy with."
494       - string:
495           name: DOCKER_TAG
496           default: ''
497           description: Default docker tag to pass to functest
498
499     properties:
500       - logrotate-default
501       - build-blocker:
502           use-build-blocker: true
503           blocking-level: 'NODE'
504           blocking-jobs:
505             - 'apex-verify.*'
506             - 'apex-runner.*'
507             - 'apex-run.*'
508             - 'apex-testsuite-.+-baremetal-.+'
509       - throttle:
510           max-per-node: 1
511           max-total: 10
512           option: 'project'
513
514     builders:
515       - description-setter:
516           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
517       - multijob:
518           name: Functest
519           condition: ALWAYS
520           projects:
521             - name: 'functest-apex-baremetal-daily-{scenario_stream}'
522               node-parameters: true
523               current-parameters: false
524               predefined-parameters: |
525                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
526                 DOCKER_TAG=$DOCKER_TAG
527               kill-phase-on: NEVER
528               abort-all-job: false
529               git-revision: false
530       - multijob:
531           name: Yardstick
532           condition: ALWAYS
533           projects:
534             - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
535               node-parameters: true
536               current-parameters: false
537               predefined-parameters:
538                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
539               kill-phase-on: NEVER
540               abort-all-job: false
541               git-revision: false
542       - multijob:
543           name: Dovetail-default-mandatory
544           condition: ALWAYS
545           projects:
546             - name: 'dovetail-apex-baremetal-default-mandatory-{scenario_stream}'
547               node-parameters: true
548               current-parameters: false
549               predefined-parameters:
550                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
551               kill-phase-on: NEVER
552               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
553               abort-all-job: false
554               git-revision: false
555       - multijob:
556           name: Dovetail-default-optional
557           condition: ALWAYS
558           projects:
559             - name: 'dovetail-apex-baremetal-default-optional-{scenario_stream}'
560               node-parameters: true
561               current-parameters: false
562               predefined-parameters:
563                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
564               kill-phase-on: NEVER
565               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
566               abort-all-job: false
567               git-revision: false
568       - multijob:
569           name: Dovetail-proposed_tests
570           condition: ALWAYS
571           projects:
572             - name: 'dovetail-apex-baremetal-proposed_tests-optional-{scenario_stream}'
573               node-parameters: true
574               current-parameters: false
575               predefined-parameters:
576                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
577               kill-phase-on: NEVER
578               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
579               abort-all-job: false
580               git-revision: false
581       - multijob:
582           name: StorPerf
583           condition: ALWAYS
584           projects:
585             - name: 'storperf-apex-baremetal-daily-{scenario_stream}'
586               node-parameters: true
587               current-parameters: false
588               predefined-parameters:
589                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
590               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/"
591               kill-phase-on: NEVER
592               abort-all-job: false
593               git-revision: false
594 # Build status is always success due conditional plugin prefetching
595 # build status before multijob phases execute
596 #        - conditional-step:
597 #            condition-kind: current-status
598 #            condition-worst: SUCCESS
599 #            condtion-best: SUCCESS
600 #            on-evaluation-failure: mark-unstable
601 #            steps:
602 #                - shell: 'echo "Tests Passed"'
603
604 - job-template:
605     name: 'apex-daily-{stream}'
606
607     # Job template for daily build
608     #
609     # Required Variables:
610     #     stream:    branch with - in place of / (eg. stable)
611     #     branch:    branch (eg. stable)
612     project-type: 'multijob'
613
614     disabled: '{obj:disable_daily}'
615
616     scm:
617       - git-scm
618
619     parameters:
620       - '{project}-defaults'
621       - '{project}-baremetal-{stream}-defaults'
622       - project-parameter:
623           project: '{project}'
624           branch: '{branch}'
625       - apex-parameter:
626           gs-pathname: '{gs-pathname}'
627
628     properties:
629       - logrotate-default
630       - build-blocker:
631           use-build-blocker: true
632           blocking-level: 'NODE'
633           blocking-jobs:
634             - 'apex-daily.*'
635
636     triggers:
637       - 'apex-{stream}'
638
639     builders:
640       - multijob:
641           name: build
642           condition: SUCCESSFUL
643           projects:
644             - name: 'apex-build-{stream}'
645               current-parameters: false
646               predefined-parameters: |
647                 GERRIT_BRANCH=$GERRIT_BRANCH
648                 GERRIT_REFSPEC=
649                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
650                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
651               node-parameters: true
652               kill-phase-on: FAILURE
653               abort-all-job: true
654               git-revision: true
655       - multijob:
656           name: 'Verify and upload ISO'
657           condition: SUCCESSFUL
658           projects:
659             - name: 'apex-verify-iso-{stream}'
660               current-parameters: false
661               predefined-parameters: |
662                 BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
663                 GERRIT_BRANCH=$GERRIT_BRANCH
664                 GERRIT_REFSPEC=
665                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
666                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
667               node-parameters: true
668               kill-phase-on: FAILURE
669               abort-all-job: true
670               git-revision: true
671       - apex-builder-{stream}
672
673 # snapshot info fetch
674 - job-template:
675     name: 'apex-fetch-snap-info'
676
677     disabled: false
678
679     parameters:
680       - '{project}-defaults'
681
682     builders:
683       - shell:
684           !include-raw-escape: ./apex-fetch-snap-info.sh
685
686 # snapshot create
687 - job-template:
688     name: 'apex-create-snapshot'
689
690     disabled: false
691
692     parameters:
693       - '{project}-defaults'
694
695     builders:
696       - shell:
697           !include-raw-escape: ./apex-snapshot-create.sh
698
699 # snapshot upload
700 - job-template:
701     name: 'apex-upload-snapshot'
702
703     disabled: false
704
705     parameters:
706       - '{project}-defaults'
707
708     builders:
709       - inject:
710           properties-content: ARTIFACT_TYPE=snapshot
711       - 'apex-upload-artifact'
712
713 # CSIT promote
714 - job-template:
715     name: 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}'
716
717     # Job template for promoting CSIT Snapshots
718     #
719     # Required Variables:
720     #     stream:    branch with - in place of / (eg. stable)
721     #     branch:    branch (eg. stable)
722     node: '{virtual-slave}'
723     project-type: 'multijob'
724     disabled: '{disable_promote}'
725
726     scm:
727       - git-scm
728
729     parameters:
730       - project-parameter:
731           project: '{project}'
732           branch: '{branch}'
733       - apex-parameter:
734           gs-pathname: '{gs-pathname}'
735       - string:
736           name: ARTIFACT_VERSION
737           default: dev
738           description: "Used for overriding the ARTIFACT_VERSION"
739       - string:
740           name: PROMOTE
741           default: 'True'
742           description: "Used for overriding the PROMOTE"
743       - string:
744           name: GS_URL
745           default: 'artifacts.opnfv.org/apex/{os_version}/{topology}'
746           description: "User for overriding GS_URL from apex params"
747       - string:
748           name: OS_VERSION
749           default: '{os_version}'
750           description: OpenStack version short name
751       - string:
752           name: ODL_BRANCH
753           default: '{odl_branch}'
754           description: ODL branch being used
755       - string:
756           name: FORCE_PROMOTE
757           default: 'False'
758           description: "Used to force promotion and skip CSIT"
759       - string:
760           name: SNAP_TYPE
761           default: '{snap_type}'
762           description: Type of snapshot to promote
763     properties:
764       - build-blocker:
765           use-build-blocker: true
766           blocking-level: 'NODE'
767           blocking-jobs:
768             - 'apex-verify.*'
769             - 'apex-runner.*'
770             - 'apex-daily.*'
771             - 'apex-.*-promote.*'
772             - 'odl-netvirt.*'
773       - throttle:
774           max-per-node: 1
775           max-total: 10
776           option: 'project'
777
778     triggers:
779       - '{stream}-{snap_type}-{os_version}'
780
781     builders:
782       - multijob:
783           name: apex-virtual-deploy
784           condition: SUCCESSFUL
785           projects:
786             - name: 'apex-deploy-virtual-{stream}'
787               current-parameters: true
788               predefined-parameters: |
789                 DEPLOY_SCENARIO=os-{sdn}-{os_scenario}-{topology}-{snap_type}
790                 OPNFV_CLEAN=yes
791                 GERRIT_BRANCH=$GERRIT_BRANCH
792                 GERRIT_REFSPEC=$GERRIT_REFSPEC
793                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
794                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
795               node-parameters: true
796               kill-phase-on: FAILURE
797               abort-all-job: true
798               git-revision: true
799       - multijob:
800           name: fetch snapshot info
801           condition: SUCCESSFUL
802           projects:
803             - name: 'apex-fetch-snap-info'
804               current-parameters: true
805               node-parameters: true
806               kill-phase-on: FAILURE
807               abort-all-job: true
808               git-revision: false
809       - multijob:
810           name: test phase
811           condition: SUCCESSFUL
812           execution-type: SEQUENTIALLY
813           projects:
814             - name: cperf-apex-csit-master
815               predefined-parameters: |
816                 ODL_BRANCH=$ODL_BRANCH
817                 RC_FILE_PATH=/tmp/snap/overcloudrc
818                 NODE_FILE_PATH=/tmp/snap/node.yaml
819                 SSH_KEY_PATH=/tmp/snap/id_rsa
820                 ODL_CONTAINERIZED=true
821                 OS_VERSION=$OS_VERSION
822                 SKIP_CSIT=$FORCE_PROMOTE
823                 SNAP_TYPE=$SNAP_TYPE
824               node-parameters: true
825               kill-phase-on: NEVER
826               abort-all-job: false
827               enable-condition: "def m = '$SNAP_TYPE' ==~ /csit/"
828             - name: cperf-upload-logs-csit
829               predefined-parameters: |
830                 ODL_BRANCH=$ODL_BRANCH
831                 OS_VERSION=$OS_VERSION
832                 SNAP_TYPE=$SNAP_TYPE
833               node-parameters: true
834               kill-phase-on: FAILURE
835               abort-all-job: false
836               enable-condition: "def m = '$SNAP_TYPE' ==~ /csit/"
837             - name: 'functest-apex-virtual-suite-{stream}'
838               current-parameters: false
839               predefined-parameters: |
840                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
841                 DOCKER_TAG=$DOCKER_TAG
842                 FUNCTEST_SUITE_NAME=tempest_smoke
843                 FUNCTEST_MODE=testcase
844                 GERRIT_BRANCH=$GERRIT_BRANCH
845                 GERRIT_REFSPEC=$GERRIT_REFSPEC
846                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
847                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
848               node-parameters: true
849               kill-phase-on: NEVER
850               enable-condition: "def m = '$SNAP_TYPE' ==~ /functest/"
851               abort-all-job: true
852               git-revision: false
853             - name: 'apex-fetch-logs-{stream}'
854               current-parameters: false
855               predefined-parameters: |
856                 GERRIT_BRANCH=$GERRIT_BRANCH
857                 GERRIT_REFSPEC=$GERRIT_REFSPEC
858                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
859                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
860               node-parameters: true
861               kill-phase-on: NEVER
862               abort-all-job: true
863               git-revision: false
864       - multijob:
865           name: create snapshot
866           condition: SUCCESSFUL
867           projects:
868             - name: 'apex-create-snapshot'
869               current-parameters: true
870               node-parameters: true
871               kill-phase-on: FAILURE
872               abort-all-job: true
873               git-revision: false
874       - multijob:
875           name: upload snapshot
876           condition: SUCCESSFUL
877           projects:
878             - name: 'apex-upload-snapshot'
879               current-parameters: true
880               node-parameters: true
881               kill-phase-on: FAILURE
882               abort-all-job: true
883               git-revision: false
884
885 # FDIO promote
886 - job-template:
887     name: 'apex-fdio-promote-daily-{stream}'
888
889     # Job template for promoting CSIT Snapshots
890     #
891     # Required Variables:
892     #     stream:    branch with - in place of / (eg. stable)
893     #     branch:    branch (eg. stable)
894     node: '{virtual-slave}'
895     project-type: 'multijob'
896     disabled: false
897
898     scm:
899       - git-scm
900
901     parameters:
902       - project-parameter:
903           project: '{project}'
904           branch: '{branch}'
905       - apex-parameter:
906           gs-pathname: '{gs-pathname}'
907
908     properties:
909       - build-blocker:
910           use-build-blocker: true
911           blocking-level: 'NODE'
912           blocking-jobs:
913             - 'apex-verify.*'
914             - 'apex-deploy.*'
915             - 'apex-runner.*'
916             - 'apex-daily.*'
917
918     builders:
919       - multijob:
920           name: build
921           condition: SUCCESSFUL
922           projects:
923             - name: 'apex-build-{stream}'
924               current-parameters: false
925               predefined-parameters: |
926                 GERRIT_BRANCH=$GERRIT_BRANCH
927                 GERRIT_REFSPEC=$GERRIT_REFSPEC
928                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
929                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
930               node-parameters: false
931               kill-phase-on: FAILURE
932               abort-all-job: true
933               git-revision: true
934       - multijob:
935           name: deploy-virtual
936           condition: SUCCESSFUL
937           projects:
938             - name: 'apex-deploy-virtual-{stream}'
939               current-parameters: false
940               predefined-parameters: |
941                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
942                 OPNFV_CLEAN=yes
943                 GERRIT_BRANCH=$GERRIT_BRANCH
944                 GERRIT_REFSPEC=$GERRIT_REFSPEC
945                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
946                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
947                 PROMOTE=True
948               node-parameters: true
949               kill-phase-on: FAILURE
950               abort-all-job: true
951               git-revision: false
952       - multijob:
953           name: create snapshot
954           condition: SUCCESSFUL
955           projects:
956             - name: 'apex-create-snapshot'
957               current-parameters: false
958               predefined-parameters: |
959                 SNAP_TYPE=fdio
960               node-parameters: true
961               kill-phase-on: FAILURE
962               abort-all-job: true
963               git-revision: false
964       - multijob:
965           name: upload snapshot
966           condition: SUCCESSFUL
967           projects:
968             - name: 'apex-upload-snapshot'
969               current-parameters: false
970               predefined-parameters: |
971                 SNAP_TYPE=fdio
972               node-parameters: true
973               kill-phase-on: FAILURE
974               abort-all-job: true
975               git-revision: false
976
977 # Flex job
978 - job-template:
979     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
980
981     project-type: 'multijob'
982
983     disabled: true
984
985     node: 'flex-pod2'
986
987     scm:
988       - git-scm
989
990     triggers:
991       - 'apex-{stream}'
992
993     parameters:
994       - '{project}-defaults'
995       - project-parameter:
996           project: '{project}'
997           branch: '{branch}'
998       - apex-parameter:
999           gs-pathname: '{gs-pathname}'
1000       - string:
1001           name: DEPLOY_SCENARIO
1002           default: 'os-nosdn-nofeature-ha'
1003           description: "Scenario to deploy with."
1004       - string:
1005           name: GIT_BASE
1006           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1007           description: 'Git URL to use on this Jenkins Slave'
1008       - string:
1009           name: SSH_KEY
1010           default: /root/.ssh/id_rsa
1011           description: 'SSH key to use for Apex'
1012
1013     properties:
1014       - logrotate-default
1015       - build-blocker:
1016           use-build-blocker: true
1017           blocking-level: 'NODE'
1018           blocking-jobs:
1019             - 'apex-verify.*'
1020             - 'apex-runner.*'
1021             - 'apex-.*-promote.*'
1022             - 'apex-run.*'
1023             - 'apex-.+-baremetal-.+'
1024       - throttle:
1025           max-per-node: 1
1026           max-total: 10
1027           option: 'project'
1028
1029     builders:
1030       - description-setter:
1031           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
1032       - multijob:
1033           name: 'Baremetal Deploy'
1034           condition: SUCCESSFUL
1035           projects:
1036             - name: 'apex-deploy-baremetal-{stream}'
1037               node-parameters: true
1038               current-parameters: true
1039               predefined-parameters: |
1040                 OPNFV_CLEAN=yes
1041                 GERRIT_BRANCH=$GERRIT_BRANCH
1042                 GERRIT_REFSPEC=
1043                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1044               kill-phase-on: FAILURE
1045               abort-all-job: true
1046               git-revision: false
1047       - multijob:
1048           name: Yardstick
1049           condition: ALWAYS
1050           projects:
1051             - name: 'yardstick-apex-baremetal-daily-{stream}'
1052               node-parameters: true
1053               current-parameters: false
1054               predefined-parameters:
1055                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1056               kill-phase-on: NEVER
1057               abort-all-job: false
1058               git-revision: false
1059
1060
1061 ########################
1062 # parameter macros
1063 ########################
1064 - parameter:
1065     name: apex-parameter
1066     parameters:
1067       - string:
1068           name: ARTIFACT_NAME
1069           default: 'latest'
1070           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1071       - string:
1072           name: ARTIFACT_VERSION
1073           default: 'daily'
1074           description: "Artifact version type"
1075       - string:
1076           name: BUILD_DIRECTORY
1077           default: $WORKSPACE/.build
1078           description: "Directory where the build artifact will be located upon the completion of the build."
1079       - string:
1080           name: CACHE_DIRECTORY
1081           default: $HOME/opnfv/apex-cache{gs-pathname}
1082           description: "Directory where the cache to be used during the build is located."
1083       # yamllint disable rule:line-length
1084       - string:
1085           name: GIT_BASE
1086           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1087           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1088       # yamllint enable rule:line-length
1089       - string:
1090           name: GS_PATHNAME
1091           default: '{gs-pathname}'
1092           description: "Version directory where opnfv artifacts are stored in gs repository"
1093       - string:
1094           name: GS_URL
1095           default: $GS_BASE{gs-pathname}
1096           description: "URL to Google Storage."
1097       - string:
1098           name: PROMOTE
1099           default: 'False'
1100           description: "Flag to know if we should promote/upload snapshot artifacts."
1101
1102 ########################
1103 # builder macros
1104 ########################
1105 {% for stream in scenarios %}
1106 # {{ stream }} Builder
1107 - builder:
1108     name: apex-builder-{{ stream }}
1109     builders:
1110       - multijob:
1111           name: Baremetal Deploy and Test Phase
1112           condition: SUCCESSFUL
1113           projects:
1114 {%- for scenario in scenarios[stream] %}
1115             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1116               node-parameters: false
1117               current-parameters: false
1118               predefined-parameters: |
1119                 OPNFV_CLEAN=yes
1120               kill-phase-on: NEVER
1121               abort-all-job: true
1122               git-revision: false
1123 {%- endfor %}
1124 {% endfor -%}
1125
1126 - builder:
1127     name: 'apex-upload-artifact'
1128     builders:
1129       - shell:
1130           !include-raw: ./apex-upload-artifact.sh
1131
1132 - builder:
1133     name: 'apex-download-artifact'
1134     builders:
1135       - shell:
1136           !include-raw: ./apex-download-artifact.sh
1137
1138 - builder:
1139     name: 'apex-deploy'
1140     builders:
1141       - shell:
1142           !include-raw: ./apex-deploy.sh
1143
1144 - builder:
1145     name: 'apex-fetch-logs'
1146     builders:
1147       - shell:
1148           !include-raw: ./apex-fetch-logs.sh
1149
1150 #######################
1151 # trigger macros
1152 # timed is in format: 'min hour daymonth month dayweek'
1153 ########################
1154 - trigger:
1155     name: 'apex-master'
1156     triggers:
1157       - timed: '0 0 1-31/2 * *'
1158
1159 - trigger:
1160     name: 'apex-hunter'
1161     triggers:
1162       - timed: '0 4 2-30/2 * *'
1163
1164 - trigger:
1165     name: 'apex-gambia'
1166     triggers:
1167       - timed: '0 4 2-30/2 * *'
1168
1169 - trigger:
1170     name: 'apex-fraser'
1171     triggers:
1172       - timed: '0 0 2-30/2 * *'
1173
1174 - trigger:
1175     name: 'apex-euphrates'
1176     triggers:
1177       - timed: '0 0 2-30/2 * *'
1178
1179 - trigger:
1180     name: 'apex-danube'
1181     triggers:
1182       - timed: '0 3 1 1 7'
1183
1184 - trigger:
1185     name: 'master-csit-master'
1186     triggers:
1187       - timed: '0 5 * * *'
1188
1189 - trigger:
1190     name: 'master-csit-rocky'
1191     triggers:
1192       - timed: '0 5 * * *'
1193
1194 - trigger:
1195     name: 'master-csit-queens'
1196     triggers:
1197       - timed: ''
1198
1199 - trigger:
1200     name: 'hunter-csit-master'
1201     triggers:
1202       - timed: ''
1203
1204 - trigger:
1205     name: 'hunter-csit-rocky'
1206     triggers:
1207       - timed: '0 5 * * *'
1208
1209 - trigger:
1210     name: 'hunter-csit-queens'
1211     triggers:
1212       - timed: ''
1213
1214 - trigger:
1215     name: 'gambia-csit-master'
1216     triggers:
1217       - timed: ''
1218
1219 - trigger:
1220     name: 'gambia-csit-rocky'
1221     triggers:
1222       - timed: ''
1223
1224 - trigger:
1225     name: 'gambia-csit-queens'
1226     triggers:
1227       - timed: '0 5 * * *'
1228
1229 - trigger:
1230     name: 'fraser-csit-master'
1231     triggers:
1232       - timed: ''
1233
1234 - trigger:
1235     name: 'fraser-csit-rocky'
1236     triggers:
1237       - timed: ''
1238
1239 - trigger:
1240     name: 'fraser-csit-queens'
1241     triggers:
1242       - timed: ''
1243
1244 - trigger:
1245     name: 'euphrates-csit-master'
1246     triggers:
1247       - timed: ''
1248
1249 - trigger:
1250     name: 'euphrates-csit-rocky'
1251     triggers:
1252       - timed: ''
1253
1254 - trigger:
1255     name: 'euphrates-csit-queens'
1256     triggers:
1257       - timed: ''
1258
1259 - trigger:
1260     name: 'danube-csit-master'
1261     triggers:
1262       - timed: ''
1263
1264 - trigger:
1265     name: 'danube-csit-rocky'
1266     triggers:
1267       - timed: ''
1268
1269 - trigger:
1270     name: 'danube-csit-queens'
1271     triggers:
1272       - timed: ''
1273 - trigger:
1274     name: 'master-functest-master'
1275     triggers:
1276       - timed: '0 3 * * *'
1277
1278 - trigger:
1279     name: 'master-functest-rocky'
1280     triggers:
1281       - timed: '0 3 * * *'
1282
1283 - trigger:
1284     name: 'master-functest-queens'
1285     triggers:
1286       - timed: ''
1287
1288 - trigger:
1289     name: 'hunter-functest-master'
1290     triggers:
1291       - timed: ''
1292
1293 - trigger:
1294     name: 'hunter-functest-rocky'
1295     triggers:
1296       - timed: '0 3 * * *'
1297
1298 - trigger:
1299     name: 'hunter-functest-queens'
1300     triggers:
1301       - timed: ''
1302
1303 - trigger:
1304     name: 'gambia-functest-master'
1305     triggers:
1306       - timed: ''
1307
1308 - trigger:
1309     name: 'gambia-functest-rocky'
1310     triggers:
1311       - timed: ''
1312
1313 - trigger:
1314     name: 'gambia-functest-queens'
1315     triggers:
1316       - timed: '0 3 * * *'
1317
1318 - trigger:
1319     name: 'fraser-functest-master'
1320     triggers:
1321       - timed: ''
1322
1323 - trigger:
1324     name: 'fraser-functest-rocky'
1325     triggers:
1326       - timed: ''
1327
1328 - trigger:
1329     name: 'fraser-functest-queens'
1330     triggers:
1331       - timed: ''
1332
1333 - trigger:
1334     name: 'euphrates-functest-master'
1335     triggers:
1336       - timed: ''
1337
1338 - trigger:
1339     name: 'euphrates-functest-rocky'
1340     triggers:
1341       - timed: ''
1342
1343 - trigger:
1344     name: 'euphrates-functest-queens'
1345     triggers:
1346       - timed: ''
1347
1348 - trigger:
1349     name: 'danube-functest-master'
1350     triggers:
1351       - timed: ''
1352
1353 - trigger:
1354     name: 'danube-functest-rocky'
1355     triggers:
1356       - timed: ''
1357
1358 - trigger:
1359     name: 'danube-functest-queens'
1360     triggers:
1361       - timed: ''