af81aacb230fa53fb9c1596bc14ff3c67b22b5b7
[releng.git] / jjb / joid / joid-ci-jobs.yml
1 ########################
2 # Job configuration for joid
3 ########################
4 - project:
5
6     name: 'joid'
7
8     project: '{name}'
9
10     installer: '{name}'
11
12 #--------------------------------
13 # BRANCH ANCHORS
14 #--------------------------------
15     master: &master
16         stream: master
17         branch: '{stream}'
18         gs-pathname: ''
19     brahmaputra: &brahmaputra
20         stream: brahmaputra
21         branch: 'stable/{stream}'
22         gs-pathname: '/{stream}'
23 #--------------------------------
24 # POD, INSTALLER, AND BRANCH MAPPING
25 #--------------------------------
26 #      Current Mapping
27 #--------------------------------
28 #  everything runs against master branch
29 #--------------------------------
30     pod:
31         - intel-pod5:
32             <<: *master
33         - orange-pod2:
34             <<: *master
35 #--------------------------------
36 #     Milestone E Mapping
37 #     !!!DO NOT ENABLE!!!
38 #--------------------------------
39 #        brahmaputra
40 #--------------------------------
41 #        - intel-pod5:
42 #            <<: *brahmaputra
43 #--------------------------------
44 #           master
45 #--------------------------------
46 #        - intel-pod6:
47 #            <<: *master
48 #        - orange-pod2:
49 #            <<: *master
50 #--------------------------------
51
52 # please check the triggers before enabling any of the controllers!!!
53     sdn-controller:
54         - 'nosdn':
55             disabled: true
56         - 'odl':
57             disabled: false
58         - 'onos':
59             disabled: true
60         - 'opencontrail':
61             disabled: true
62
63     jobs:
64         - 'joid-{sdn-controller}-{pod}-daily-{stream}'
65         - 'joid-deploy-{pod}-daily-{stream}'
66
67 ########################
68 # job templates
69 ########################
70 - job-template:
71     name: 'joid-{sdn-controller}-{pod}-daily-{stream}'
72
73     project-type: multijob
74
75     disabled: '{obj:disabled}'
76
77     concurrent: false
78
79     wrappers:
80         - build-name:
81             name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
82
83     triggers:
84         - 'joid-{pod}-trigger'
85
86     parameters:
87         - project-parameter:
88             project: '{project}'
89         - '{pod}-defaults'
90         - '{installer}-defaults'
91         - string:
92             name: SDN_CONTROLLER
93             default: '{sdn-controller}'
94         - string:
95             name: OPNFV_FEATURE
96             default: 'none'
97
98     scm:
99         - git-scm:
100             credentials-id: '{ssh-credentials}'
101             refspec: ''
102             branch: '{branch}'
103
104     builders:
105         - '{installer}-multijob-{pod}-builder':
106             pod: '{pod}'
107             stream: '{stream}'
108
109 - job-template:
110     name: 'joid-deploy-{pod}-daily-{stream}'
111
112     disabled: false
113
114     concurrent: false
115
116     wrappers:
117         - build-name:
118             name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
119
120     parameters:
121         - project-parameter:
122             project: '{project}'
123         - '{pod}-defaults'
124         - '{installer}-defaults'
125
126     scm:
127         - git-scm:
128             credentials-id: '{ssh-credentials}'
129             refspec: ''
130             branch: '{branch}'
131
132     builders:
133         - '{pod}-builder'
134
135 ########################
136 # multijob builder macros
137 ########################
138 # intel-pod5 is CI POD so full CI will run on it
139 # deploy, functest, yardstick
140 - builder:
141     name: joid-multijob-intel-pod5-builder
142     builders:
143         - multijob:
144             name: deploy
145             condition: SUCCESSFUL
146             projects:
147                 - name: 'joid-deploy-{pod}-daily-{stream}'
148                   current-parameters: true
149                   git-revision: true
150                   kill-phase-on: FAILURE
151         - multijob:
152             name: functest
153             condition: COMPLETED
154             projects:
155                 - name: 'functest-joid-{pod}-daily-{stream}'
156                   current-parameters: true
157                   kill-phase-on: NEVER
158 # yardstick placeholder
159 #        - multijob:
160 #            name: yardstick
161 #            condition: COMPLETED
162 #            projects:
163 #                - name: 'yardstick-joid-{pod}-daily-{stream}'
164 #                  current-parameters: true
165 #                  kill-phase-on: NEVER
166
167 # orange-pod2 is NOT a CI POD so only the selected jobs will run
168 # deploy and functest currently
169 - builder:
170     name: joid-multijob-orange-pod2-builder
171     builders:
172         - multijob:
173             name: deploy
174             condition: SUCCESSFUL
175             projects:
176                 - name: 'joid-deploy-{pod}-daily-{stream}'
177                   current-parameters: true
178                   git-revision: true
179                   kill-phase-on: FAILURE
180         - multijob:
181             name: functest
182             condition: COMPLETED
183             projects:
184                 - name: 'functest-joid-{pod}-daily-{stream}'
185                   current-parameters: true
186                   kill-phase-on: NEVER
187 ########################
188 # builder macros
189 ########################
190 - builder:
191     name: intel-pod5-builder
192     builders:
193         - shell: |
194             #!/bin/bash
195             echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER"
196             echo "Please note that this is a quick try to see how joid deployment works"
197             echo
198             echo "Executing clean.sh"
199             cd $WORKSPACE/ci
200             ./clean.sh
201             echo
202             echo "Executing 02-maasdeploy.sh intelpod5"
203             ./02-maasdeploy.sh intelpod5
204             echo
205             echo "Executing deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5"
206             ./deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5
207
208 - builder:
209     name: orange-pod2-builder
210     builders:
211         - shell: |
212             #!/bin/bash
213             echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER"
214             echo "Please note that this is WIP generic builder"
215             echo
216             echo "Executing clean.sh"
217             cd $WORKSPACE/ci
218             ./clean.sh
219         - shell:
220             !include-raw ./joid-deploy.sh
221 ########################
222 # trigger macros
223 ########################
224 - trigger:
225     name: 'joid-intel-pod5-trigger'
226     triggers:
227         - timed: '0 3 * * *'
228 # timer trigger is commented out since we do not know if the automatic runs should
229 # be enabled on orange-pod2
230 - trigger:
231     name: 'joid-orange-pod2-trigger'
232     triggers:
233         - timed: '#0 3 * * *'